IAMTimelineSrc::SetMediaLength

 
Microsoft DirectShow 9.0

IAMTimelineSrc::SetMediaLength

The SetMediaLength method specifies the duration of the source file.

Syntax

  HRESULT SetMediaLength(
    REFERENCE_TIME Length
);

Parameters

Length

Media length, in 100-nanosecond units.

Return Value

Returns S_OK.

Remarks

You can avoid potential rendering errors by setting the media length before you set the media stop time. When you set the media stop time, DES checks it against the media length.

This method does not validate the Length parameter, but the value must equal the actual duration of the source file. Obtain the source file duration by calling IMediaDet::get_StreamLength.

Requirements

Header: Include Qedit.h. This header file is not compatible with Microsoft® Direct3D® headers later than version 7.

Library: Use strmiids.lib.

See Also