Microsoft DirectX 9.0

AMTimelineSrc.SetMediaLength2 Method

The SetMediaLength2 method specifies the duration of the source file.


    Length As Double



Media length, in seconds.

Error Codes

If the method fails, an error is raised.


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