CRendererPosPassThru Class

CRendererPosPassThru class hierarchy

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

CRendererPosPassThru Constructs a CRendererPosPassThru object.
GetMediaTime Retrieves 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.

Syntax

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

Parameters

pName
Pointer to the 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 Value

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.

Syntax

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

Parameters

pStartTime
Pointer to the returned starting media time.
pEndTime
Pointer to the returned ending media time.

Return Value

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.

Syntax

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

Parameters

pMediaSample
Pointer to the IMediaSample object containing the media times.
pStartTime
Pointer to the returned starting media time.
pEndTime
Pointer to the returned ending media time.

Return Value

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

CRendererPosPassThru::ResetMediaTime

CRendererPosPassThru Class

Resets the object's media start and end times.

Syntax

HRESULT ResetMediaTime(void);

Return Value

Returns NOERROR.

Remarks

Sets the start and stop times to zero.


Top of Page Top of Page
© 2000 Microsoft and/or its suppliers. All rights reserved. Terms of Use.