The third mutex is the processing mutex. Individual filters and pins have their own processing mutexes. AVStream independently acquires the processing mutex before processing at the filter and pin level, in order to synchronize access to processing-related structures. AVStream also acquires the processing mutex during other operations, including binding pins to a pipe section, sleep or wake power operations, and modifying descriptors. Minidrivers can manually acquire the mutex to perform a synchronous operation, such as processing or descriptor modification. A minidriver should obtain the processing mutex before making any change that cannot happen concurrently with processing.
As with the other two types of mutexes, process mutexes also are not obtained recursively. This means that if a minidriver attempts to grab the process mutex while processing, a deadlock occurs.
Do not use the processing mutex to suspend processing for long periods of time. Instead, manipulate the processing control gate directly by using the KsGateXxx functions.
As mentioned in Filter Control Mutex in AVStream, a thread that has taken a process mutex should not subsequently take the filter control mutex.
To manipulate the processing mutex, use the following functions:
KsFilterAcquireProcessingMutex, KsPinAcquireProcessingMutex, KsFilterReleaseProcessingMutex, KsPinReleaseProcessingMutex