Filter-Centric Processing
Filters that use filter-centric processing receive a processing dispatch when there are data frames available on each instantiated pin.
To implement filter-centric processing, provide a processing dispatch in the KSFILTER_DISPATCH table and omit processing dispatches in the KSPIN_DISPATCH tables. Once you have supplied all of the descriptor structures and registered them by calling KsInitializeDriver, you can instantiate and use your filter.
In this processing paradigm, pins still trigger processing attempts as described in pin-centric processing; however, the processing attempts are on the filter and these additional rules apply:
- A processing attempt will not succeed unless frames are available on every pin that does not specify KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING.
- A processing attempt will not succeed if a pin on the filter is in a state below the minimum processing level (normally this is KSSTATE_PAUSE, although it can be set to KSSTATE_RUN by specifying KSPIN_FLAG_PROCESS_IN_RUN_STATE_ONLY).
- A processing attempt will not succeed if the required number of pins as specified by InstancesNecessary (a member of KSPIN_DESCRIPTOR_EX) is not met.
- A processing attempt will not succeed if the minidriver has previously closed the process control gate of the filter by using the KsGate* functions.
The Avssamp sample in the DDK is a filter-centric capture driver.