Skip to content

Latest commit

 

History

History
92 lines (56 loc) · 2.62 KB

mf-pd-asf-fileproperties-play-duration-attribute.md

File metadata and controls

92 lines (56 loc) · 2.62 KB
description ms.assetid title ms.topic ms.date
Specifies the time needed to play an Advanced Systems Format (ASF) file, in 100-nanosecond units.
3d36808b-aa13-4205-ad92-97e951ee827e
MF_PD_ASF_FILEPROPERTIES_PLAY_DURATION attribute (Wmcontainer.h)
reference
05/31/2018

MF_PD_ASF_FILEPROPERTIES_PLAY_DURATION attribute

Specifies the time needed to play an Advanced Systems Format (ASF) file, in 100-nanosecond units.

This value includes the preroll time. To retrieve the actual playback duration, get the value of the MF_PD_DURATION attribute. However, if the preroll value is greater than the play duration, the value of MF_PD_DURATION is zero.

Data type

UINT64

Remarks

This attribute applies to presentation descriptors for ASF content.

The IMFASFContentInfo::GeneratePresentationDescriptor method generates this attribute from the ASF metadata.

Examples

HRESULT GetPlayDuration(
    IMFASFContentInfo *pContentInfo,  // An initialized ContentInfo object. 
    UINT64 *pcbPlayDuration           // Receives the play duration.
    )
{
    IMFPresentationDescriptor* pPD = NULL;

    HRESULT hr = pContentInfo->GeneratePresentationDescriptor(&pPD);
    if (SUCCEEDED(hr))
    {
        hr = pPD->GetUINT64(MF_PD_ASF_FILEPROPERTIES_PLAY_DURATION, pcbPlayDuration);
        pPD->Release();
    }
    return hr;
}

Requirements

Requirement Value
Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2008 [desktop apps only]
Header
Wmcontainer.h

See also

Alphabetical List of Media Foundation Attributes

IMFAttributes::GetGUID

IMFAttributes::SetGUID

IMFPresentationDescriptor

Presentation Descriptor Attributes

ASF Header Object

Presentation Descriptors