다음을 통해 공유


CBaseReferenceClock::AdvisePeriodic

 
Microsoft DirectShow 9.0

CBaseReferenceClock::AdvisePeriodic

The AdvisePeriodic method creates a periodic advise request. This method implements the IReferenceClock::AdvisePeriodic method.

Syntax

  HRESULT AdvisePeriodic(
    REFERENCE_TIME StartTime,
    REFERENCE_TIME PeriodTime,
    HSEMAPHORE hSemaphore,
    DWORD_PTR *pdwAdviseToken
);

Parameters

StartTime

Time of the first notification, in 100-nanosecond units. Must be greater than zero and less than MAX_TIME.

PeriodTime

Time between notifications, in 100-nanosecond units. Must be greater than zero.

hSemaphore

Handle to a semaphore, created by the caller.

pdwAdviseToken

Pointer to a variable that receives an identifier for the advise request.

Return Value

Returns one of the HRESULT values shown in the following table.

Value Description
S_OK Success
E_INVALIDARG Invalid time values
E_OUTOFMEMORY Failure
E_POINTER NULL pointer argument

Remarks

At each notification time, the clock releases the semaphore specified in the hSemaphore parameter. When no further notifications are required, call the CBaseReferenceClock::Unadvise method and pass the pdwAdviseToken value returned from this call.

Requirements

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

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

See Also