## CRendererPosPassThru Class

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.

###

CRendererPosPassThru::CRendererPosPassThru

CRendererPosPassThru Class

Constructs a CRendererPosPassThru object.

CRendererPosPassThru(
const TCHAR *pName,
LPUNKNOWN pUnk,
HRESULT * phr,
IPin * pPin
);

##### Parameters

pName
  Name of the object used in the CRendererPosPassThru constructor for debugging purposes.
pUnk
  Pointer to the owner of this object.
phr
  Pointer to an HRESULT value for resulting information.
pPin
  Pointer to the input pin for the filter.

##### Return Values

No return value.

##### Remarks

Allocate the pName parameter in static memory. This name appears on the debugging terminal upon creation and deletion of the object.

###

CRendererPosPassThru::GetMediaTime

CRendererPosPassThru Class

Retrieves the current media start and end times registered in the object.

HRESULT GetMediaTime(
LONGLONG* pStartTime,
LONGLONG* pEndTime
);

##### Parameters

pStartTime
  Returned starting media time.
pEndTime
  Returned ending media time.

##### Return Values

Returns an HRESULT value from the call to CPosPassThru::ConvertTimeFormat for the start and end times.

##### Remarks

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.

###

CRendererPosPassThru::RegisterMediaTime

CRendererPosPassThru Class

Registers the media start and end times with the object.

HRESULT RegisterMediaTime(
IMediaSample *pMediaSample
),
HRESULT RegisterMediaTime(
LONGLONG pStartTime,
LONGLONG pEndTime
);

##### Parameters

pMediaSample
  IMediaSample object containing the media times.
pStartTime
  Returned starting media time.
pEndTime
  Returned ending media time.

##### Return Values

Returns VFW_E_MEDIA_TIME_NOT_SET if the sample does not have its media times set. Otherwise, returns and HRESULT from the call to IMediaSample::GetTime.

###

CRendererPosPassThru::ResetMediaTime

CRendererPosPassThru Class

Resets the object's media start and end times.

HRESULT ResetMediaTime(void);

##### Return Values

Returns NOERROR.

##### Remarks

Sets the start and stop times to zero.

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.