IReferenceClockTimerControl interface (strmif.h)

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

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

Inheritance

The IReferenceClockTimerControl interface inherits from the IUnknown interface. IReferenceClockTimerControl also has these types of members:

Methods

The IReferenceClockTimerControl interface has these methods.

 
IReferenceClockTimerControl::GetDefaultTimerResolution

The GetDefaultTimerResolution method returns the timer resolution that was requested by the reference clock.
IReferenceClockTimerControl::SetDefaultTimerResolution

The SetDefaultTimerResolution method 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

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header strmif.h (include Dshow.h)