Microsoft DirectX 8.1 (C++)

AMTimelineSrc.SetMediaLength2 Method

The AMTimelineSrc.SetMediaLength2 method specifies the duration of the source file.

Syntax

object.SetMediaLength2(
    Length As Double
)

Parameters

Length

Media length, in seconds.

Error Codes

If the method fails, an error is raised.

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 retrieving the MediaDet.StreamLength property.

See Also