IReferenceClockTimerControl Interface

 
Microsoft DirectShow 9.0

IReferenceClockTimerControl Interface

This topic applies to Windows Vista and later.

The IReferenceClockTimerControl interface changes the timer period used by a reference clock. This interface is exposed by the DirectShow System Reference Clock.

In addition to the methods inherited from IUnknown, the IReferenceClockTimerControl interface exposes the following methods.

Method Description
GetDefaultTimerResolution Returns the timer resolution that was requested by the reference clock.
SetDefaultTimerResolution Sets the minimum timer resolution.

Remarks

By default, the system reference clock in DirectShow sets the timer period to the minimum value allowed by the timer. Typically, this value is 1 millisecond.

The timer period is a global settings in Windows. A higher resolution can improve the accuracy of time-out intervals in wait functions. However, it can also reduce overall system performance, because the thread scheduler switches tasks more often. High resolutions can also prevent the CPU power management system from entering power-saving modes. Setting a higher resolution does not improve the accuracy of the high-resolution performance counter.

The main purpose of this interface is to override the reference clock's default timer setting. To do so, call SetDefaultTimerResolution with the value zero. This can result in a lower timer resolution, which might enable the user's computer to enter a power saving mode. (The actual behavior depends on many other factors, such as what other processes are running.) The DVD Navigator filter uses this interface as described here.

If a DirectShow filter requires a higher timer resolution, it should call timeBeginPeriod. Typically this requirement would apply only to renderer filters.

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.