Share via


CRendererPosPassThru::RegisterMediaTime

 
Microsoft DirectShow 9.0

CRendererPosPassThru::RegisterMediaTime

The RegisterMediaTime method caches the time stamps from the current sample.

Syntax

  HRESULT RegisterMediaTime(
    IMediaSample *pMediaSample
);

HRESULT RegisterMediaTime(
    LONGLONG StartTime,
    LONGLONG EndTime
);

Parameters

pMediaSample

Pointer to the IMediaSample interface of the sample.

StartTime

Sample start time, in 100-nanosecond units.

EndTime

Sample end time, in 100-nanosecond units.

Return Value

Returns an HRESULT value. Possible values include those listed in the following table.

Value Description
S_OK Success.
VFW_E_MEDIA_TIME_NOT_SET The sample is not time-stamped.

Remarks

This method stores the time stamps from the current sample. The CRendererPosPassThru::GetMediaTime method retrieves the same values.

The filter should call this method for each sample that it receives. The method is overloaded to accept either a pointer to the sample, or the time stamp values themselves.

Requirements

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

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

See Also

CRendererPosPassThru Class