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 |
|
See also