Restarting Processing in AVStream

AVStream stops processing if any of the following conditions are true:

  • In a pin-centric environment, no data is currently available on the pin.

  • In a filter-centric environment, at least one pin for which the Flags member of the KSPIN_DESCRIPTOR_EX structure does not set KSPIN_FLAG_FRAMES_NOT_REQUIRED_FOR_PROCESSING, does not have data waiting to be processed. By default, this flag is not set.

  • The minidriver's processing dispatch callback routine returns STATUS_PENDING, regardless of frame availability. Note that the processing dispatch can be either AVStrMiniFilterProcess or AVStrMiniPinProcess, depending on whether the minidriver implements pin-centric processing or filter-centric processing.

AVStream initiates processing when new data arrives into a previously empty queue. Therefore, if the minidriver's processing dispatch returns STATUS_PENDING when the associated queues are full, the minidriver will never be called on to resume processing. If the minidriver sets STATUS_PENDING, the minidriver must call KsPinAttemptProcessing or KsFilterAttemptProcessing to resume processing.

Do not return STATUS_SUCCESS from the processing dispatch if the minidriver does not actually process data. This causes AVStream to immediately call the minidriver again, resulting in an infinite loop between AVStream and the processing dispatch.

Send comments about this topic to Microsoft