Microsoft DirectX 9.0 |
The CAMSchedule class implements a scheduler for reference clocks.
Requirements
Header: Declared in Dsschedule.h; include Streams.h.
Library: Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).
Public Methods | |
CAMSchedule | Constructor method. |
~CAMSchedule | Destructor method. Virtual. |
GetAdviseCount | Retrieves the number of pending advise requests. |
GetNextAdviseTime | Retrieves the time of the next advise request. |
AddAdvisePacket | Adds an advise request to the list of pending requests. |
Unadvise | Removes an advise request. |
Advise | Dispatches all requests that are scheduled for a specified time or earlier. |
GetEvent | Retrieves an event handle, which is used to signal a change in the next advise time. |
Remarks
This helper object maintains a list of advise requests for a reference clock. The CBaseReferenceClock class uses it to help schedule advise requests. Clocks use this object in the following manner:
In step 2, either the event is signaled, or the wait times out. If the event is signaled, it means that a new request was added to the front of the list. The worker thread must calculate a new time-out value. On the other hand, if the wait times out, it means that an advise request has come due and must be dispatched. The call to Advise in step 5 handles both cases.