Microsoft DirectX 8.1 (C++)

CMediaSample::SetMediaTime

The SetMediaTime method sets the media times for this sample. This method implements the IMediaSample::SetMediaTime method.

Syntax

HRESULT SetMediaTime(
    LONGLONG *pStart,
    LONGLONG *pEnd
);

Parameters

pStart

Pointer to the media start time, or NULL.

pEnd

Pointer to the media stop time, or NULL.

Return Value

Returns S_OK.

Remarks

The media stop time must be greater than the media start time. Use NULL to invalidate the media times.

The pEnd parameter specifies an absolute media time, but the CMediaSample::m_MediaEnd member variable is calculated as an offset from pStart. In other words, m_MediaEnd = *pTimeEnd*pTimeStart.

For information about media times, see Time and Clocks in DirectShow.

See Also