The IMediaSeeking interface is used to seek to a specific sample, frame, or indexed field. These values are indicated by a whole number, such as frame 20 of a sequence of 530. However, when asked for a reference start or end time (in seconds), the sample must have this information previously set. The CRendererPosPassThru class, implemented on the video renderer, performs this service because the renderer is responsible for keeping track of reference time and stream time.
Member Functions
Name | Description |
CRendererPosPassThru | Constructs a CRendererPosPassThru object. |
GetMediaTime | Returns the media start and end times registered in the object. |
RegisterMediaTime | Registers the media start and end times with the object. |
ResetMediaTime | Resets the object's media start and end times. |
Constructs a CRendererPosPassThru object.
CRendererPosPassThru(
const TCHAR *pName,
LPUNKNOWN pUnk,
HRESULT * phr,
IPin * pPin
);
No return value.
Allocate the pName parameter in static memory. This name appears on the debugging terminal upon creation and deletion of the object.
Retrieves the current media start and end times registered in the object.
HRESULT GetMediaTime(
LONGLONG* pStartTime,
LONGLONG* pEndTime
);
Returns an HRESULT value.
This member function returns the media times set by the CRendererPosPassThru::RegisterMediaTime member function. The starting media time is always returned. Set pEndTime to a nonzero value to retrieve the ending media time.
Registers the media start and end times with the object.
HRESULT RegisterMediaTime(
IMediaSample *pMediaSample
),
HRESULT RegisterMediaTime(
LONGLONG pStartTime,
LONGLONG pEndTime
);
Returns an HRESULT value. Returns VFW_E_MEDIA_TIME_NOT_SET if the sample does not have its media times set.
Resets the object's media start and end times.
HRESULT ResetMediaTime(void);
Returns an HRESULT value.
Sets the start and stop times to zero.
© 1997 Microsoft Corporation. All rights reserved. Terms of Use.