Win32 Classes
A version of this page is also available for
4/8/2010
DirectShow implements several classes to handle Win32 threads, events, and critical sections. These include the following classes.
The following illustration shows these classes.
CAMEvent handles a Windows Embedded CE event as a C++ object. The methods in this class allow events to be put into the signaled state or reset to a nonsignaled state, and also allow a caller to block until an event is signaled. Events can also be cast to handles and passed to the WaitForMultipleObjects function.
CCritSec handles a Win32 critical section as a C++ object to provide intraprocess synchronization. Methods of this class allow you to create, lock, and unlock a critical section.
CAutoLock holds a critical section (a CCritSec object) for the scope of a block or function. The critical section is locked in the constructor and unlocked in the destructor.
CAMThread provides an abstract worker thread class enabling creation, synchronization, and communication with a worker thread.
CMsgThread provides support for a worker thread to which requests can be posted asynchronously instead of being sent directly. Messages, in the form of a CMsg object, can be posted to a CMsgThread object.
CMsg creates an object containing a message to be passed to a CMsgThread object.