MFCreatePresentationDescriptor

Creates a presentation descriptor.

Syntax

HRESULT MFCreatePresentationDescriptor(
         DWORD cStreamDescriptors,
         _In_reads_opt_(cStreamDescriptors)IMFStreamDescriptor **apStreamDescriptors,
         _Outptr_ IMFPresentationDescriptor **ppPresentationDescriptor
)  

Parameters

cStreamDescriptors
Type: DWORD 

Number of elements in the apStreamDescriptors array.

apStreamDescriptors
Type: In_reads_opt(cStreamDescriptors)IMFStreamDescriptor **

Array of IMFStreamDescriptor interface pointers. Each pointer represents a stream descriptor for one stream in the presentation.

ppPresentationDescriptor
Type: Outptr IMFPresentationDescriptor **

Receives a pointer to an IMFPresentationDescriptor interface of the presentation descriptor. The caller must release the interface.

Return value

Type: HRESULT 

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Refer to Media Foundation return codes.

Remarks

If you are writing a custom media source, you can use this function to create the source presentation descriptor. The presentation descriptor is created with no streams selected. Generally, a media source should select at least one stream by default. To select a stream, call IMFPresentationDescriptor::SelectStream.

Requirements

Header: Declared in mfidl.h.

Library: Use Mfplat.lib.