Compartilhar via


IMediaSample::GetMediaTime

 
Microsoft DirectShow 9.0

IMediaSample::GetMediaTime

The GetMediaTime method retrieves the media times for this sample.

Syntax

  HRESULT GetMediaTime(
  LONGLONG *pTimeStart,
  LONGLONG *pTimeEnd
);

Parameters

pTimeStart

[out] Pointer to a variable that receives the media start time.

pTimeEnd

[out] Pointer to a variable that receives the media stop time.

Return Values

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

Return code Description
S_OK Success.
VFW_E_MEDIA_TIME_NOT_SET Media times are not set on this sample.

Remarks

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

Requirements

Header: Declared in Strmif.h; include Dshow.h.

Library: Use Strmiids.lib.

See Also