Skip to content

Latest commit

 

History

History
118 lines (97 loc) · 3.47 KB

nf-control-imediaposition-get_duration.md

File metadata and controls

118 lines (97 loc) · 3.47 KB
UID title description helpviewer_keywords old-location tech.root ms.assetid ms.date ms.keywords req.header req.include-header req.target-type req.target-min-winverclnt req.target-min-winversvr req.kmdf-ver req.umdf-ver req.ddi-compliance req.unicode-ansi req.idl req.max-support req.namespace req.assembly req.type-library req.lib req.dll req.irql targetos req.typenames req.redist ms.custom f1_keywords dev_langs topic_type api_type api_location api_name
NF:control.IMediaPosition.get_Duration
IMediaPosition::get_Duration (control.h)
The get_Duration method retrieves the duration of the stream.
IMediaPosition interface [DirectShow]
get_Duration method
IMediaPosition.get_Duration
IMediaPosition::get_Duration
IMediaPositionget_Duration
control/IMediaPosition::get_Duration
dshow.imediaposition_get_duration
get_Duration
get_Duration method [DirectShow]
get_Duration method [DirectShow]
IMediaPosition interface
dshow\imediaposition_get_duration.htm
dshow
9971ca0e-a16d-4227-9efa-c965d501e6ef
4/26/2023
IMediaPosition interface [DirectShow],get_Duration method, IMediaPosition.get_Duration, IMediaPosition::get_Duration, IMediaPositionget_Duration, control/IMediaPosition::get_Duration, dshow.imediaposition_get_duration, get_Duration, get_Duration method [DirectShow], get_Duration method [DirectShow],IMediaPosition interface
control.h
Dshow.h
Windows
Windows 2000 Professional [desktop apps only]
Windows 2000 Server [desktop apps only]
Strmiids.lib
Windows
19H1
IMediaPosition::get_Duration
control/IMediaPosition::get_Duration
c++
APIRef
kbSyntax
COM
Strmiids.lib
Strmiids.dll
IMediaPosition.get_Duration

IMediaPosition::get_Duration

-description

[The feature associated with this page, DirectShow, is a legacy feature. It has been superseded by MediaPlayer, IMFMediaEngine, and Audio/Video Capture in Media Foundation. Those features have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use MediaPlayer, IMFMediaEngine and Audio/Video Capture in Media Foundation instead of DirectShow, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The get_Duration method retrieves the duration of the stream.

-parameters

-param plength [out]

Pointer to a variable that receives the total stream length, in seconds.

-returns

Returns an HRESULT value. Possible values include the following.

Return code Description
S_OK
Success.
E_NOTIMPL
Not implemented.
E_POINTER
NULL pointer argument.

-remarks

This method retrieves the duration of the stream at normal playback speed. Changing the playback rate does not affect the duration.

-see-also

Error and Success Codes

IMediaPosition Interface