IFilterGraph3::SetSyncSourceEx

 
Microsoft DirectShow 9.0

IFilterGraph3::SetSyncSourceEx

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(
    IReferenceClock *pClockForMostOfFilterGraph,
    IReferenceClock *pClockForFilter,
    IBaseFilter *pFilter
);

Parameters

pClockForMostOfFilterGraph

[in] 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.

pClockForFilter

[in] Pointer to the IReferenceClock interface of the secondary clock. The filter specified by the pFilter parameter uses this clock.

pFilter

[in]  Pointer to the IBaseFilter interface of a filter in the graph. This filter uses the secondary reference clock.

Return Values

Returns and HRESULT value. Possible values include the following.

Value Description
S_OK Success.
VFW_E_NOT_STOPPED 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

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

Library: Use Strmiids.lib.

See Also