Export (0) Print
Expand All
Expand Minimize

MF_PD_DURATION attribute

Specifies the duration of a presentation, in 100-nanosecond units.

Data type

UINT64

Treat as a LONGLONG value.

Remarks

Media sources can set this attribute on a presentation descriptor to indicate the duration of the presentation.

This attribute is a signed value, although it is stored as a UINT64. However, the attribute should never contain a negative value.

The GUID constant for this attribute is exported from mfuuid.lib.

Examples

The following example shows how to get the presentation duration from a media source.


HRESULT GetSourceDuration(IMFMediaSource *pSource, MFTIME *pDuration)
{
    *pDuration = 0;

    IMFPresentationDescriptor *pPD = NULL;

    HRESULT hr = pSource->CreatePresentationDescriptor(&pPD);
    if (SUCCEEDED(hr))
    {
        hr = pPD->GetUINT64(MF_PD_DURATION, (UINT64*)pDuration);
        pPD->Release();
    }
    return hr;
}


Requirements

Minimum supported client

Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 [desktop apps | Windows Store apps]

Header

Mfidl.h

See also

IMFAttributes::GetUINT64
IMFAttributes::SetUINT64
IMFPresentationDescriptor
Presentation Descriptor Attributes
Presentation Descriptors

 

 

Community Additions

ADD
Show:
© 2015 Microsoft