Windows apps
Collapse the table of content
Expand the table of content
Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

IMFMediaEngine::GetDuration method

Gets the duration of the media resource.

Syntax


double GetDuration();

Parameters

This method has no parameters.

Return value

Returns the duration, in seconds. If no media data is available, the method returns not-a-number (NaN). If the duration is unbounded, the method returns an infinite value.

Remarks

This method corresponds to the duration attribute of the HTMLMediaElement interface in HTML5.

If the duration changes, the Media Engine sends an MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE event. See IMFMediaEngineNotify::EventNotify.

Requirements

Minimum supported client

Windows 8 [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2012 [desktop apps | Windows Store apps]

Minimum supported phone

Windows Phone 8

Header

Mfmediaengine.h

See also

IMFMediaEngine

 

 

Show:
© 2016 Microsoft