description | ms.assetid | title | ms.topic | ms.date | topic_type | api_name | api_type | api_location | ms.custom | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
CSourceSeeking.GetDuration method - The GetDuration method retrieves the duration of the stream. This method implements the IMediaSeeking::GetDuration method. |
074eb2d0-a7a3-4bc1-82e8-2f42c6d43dac |
CSourceSeeking.GetDuration method (Ctlutil.h) |
reference |
4/26/2023 |
|
|
|
|
UpdateFrequency5 |
[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 GetDuration
method retrieves the duration of the stream. This method implements the IMediaSeeking::GetDuration method.
HRESULT GetDuration(
LONGLONG *pDuration
);
-
pDuration
-
Pointer to a variable that receives the duration, in units of the current time format.
Returns one of the HRESULT values listed in the following table.
Return code | Description |
---|---|
|
Success |
|
NULL pointer value |
The duration is specified by the CSourceSeeking::m_rtDuration member variable.
Requirement | Value |
---|---|
Header |
|
Library |
|