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 |
|
See also