IFilterGraph3::SetSyncSourceEx method (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 SetSyncSourceEx
method establishes two reference clocks for the filter graph: a primary clock that is used by most of the filters, and a secondary clock that is used only by one specified filter.
Syntax
HRESULT SetSyncSourceEx(
[in] IReferenceClock *pClockForMostOfFilterGraph,
[in] IReferenceClock *pClockForFilter,
[in] IBaseFilter *pFilter
);
Parameters
[in] pClockForMostOfFilterGraph
Pointer to the IReferenceClock interface of the main reference clock. Every filter in the graph uses this clock, except for the filter specified by the pFilter parameter.
[in] pClockForFilter
Pointer to the IReferenceClock interface of the secondary clock. The filter specified by the pFilter parameter uses this clock.
[in] pFilter
Pointer to the IBaseFilter interface of a filter in the graph. This filter uses the secondary reference clock.
Return value
Returns and HRESULT value. Possible values include the following.
Return code | Description |
---|---|
|
Success. |
|
The filter graph is not stopped. |
Remarks
If the filter graph is running or paused, this method return VFW_E_NOT_STOPPED.
To clear both reference clocks, set all three parameters to NULL. To set a single clock for the entire graph, with no secondary clock, call the IMediaFilter::SetSyncSource method on the Filter Graph Manager.
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) |
Library | Strmiids.lib |