Export (0) Print
Expand All
Expand Minimize
This topic has not yet been rated - Rate this topic

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

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Wmcontainer.h

See also

IMFAttributes::GetGUID
IMFAttributes::SetGUID
IMFPresentationDescriptor
Presentation Descriptor Attributes
ASF Header Object
Presentation Descriptors

 

 

Did you find this helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

ADD
Show:
© 2014 Microsoft. All rights reserved.