Share via


CBaseStreamControl::SetSyncSource

 
Microsoft DirectShow 9.0

CBaseStreamControl::SetSyncSource

The SetSyncSource method notifies the base class of the current reference clock.

Syntax

  void SetSyncSource(
    IReferenceClock *pRefClock
);

Parameters

pRefClock

Pointer to the IReferenceClock interface of the reference clock.

Return Values

This method does not return a value.

Remarks

Call this method from inside the filter's IMediaFilter::SetSyncSource method. The CBaseStreamControl class uses the IReferenceClock interface to ensure that it does not discard samples too quickly.

Example Code

STDMETHODIMP CMyFilter::SetSyncSource(IReferenceClock *pClock)
{
    // Note: It's OK if pClock is NULL.

    m_pMyPin->SetSyncSource(pClock);
    return CBaseFilter::SetSyncSource(pClock);
}

Requirements

**  Header:** Declared in Strmctl.h; include Streams.h.

**  Library:** Use Strmbase.lib (retail builds) or Strmbasd.lib (debug builds).

See Also