CBaseMediaFilter.StreamTime method

The StreamTime method retrieves the current stream time.

Syntax

virtual HRESULT StreamTime(
  [ref] CRefTime &rtStream
);

Parameters

rtStream [ref]

Reference to a CRefTime object that receives the current stream time.

Return value

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

Return code Description
S_OK
Success.
VFW_E_NO_CLOCK
No reference clock is available.

Remarks

Stream time is defined as the current reference time (as given by the reference clock) minus the start time (specified by CBaseMediaFilter::m_tStart). A media sample's time stamp specifies the stream time when it should be rendered. If a sample with a time stamp less than the current stream time has not yet been rendered, it is late.

Requirements

Requirement Value
Header
Amfilter.h (include Streams.h)
Library
Strmbase.lib (retail builds);
Strmbasd.lib (debug builds)

See also

CBaseMediaFilter Class