Creates a stream descriptor.
HRESULT MFCreateStreamDescriptor(
DWORD dwStreamIdentifier,
DWORD cMediaTypes,
_In_reads_(cMediaTypes)IMFMediaType **apMediaTypes,
_Outptr_ IMFStreamDescriptor **ppDescriptor
)
dwStreamIdentifier
Type: DWORD
Stream identifier.
cMediaTypes
Type: DWORD
Number of elements in the apMediaTypes array.
apMediaTypes
Type: In_reads(cMediaTypes)IMFMediaType **
Pointer to an array of IMFMediaType interface pointers. These pointers are used to initialize the media type handler for the stream descriptor.
ppDescriptor
Type: Outptr IMFStreamDescriptor **
Receives a pointer to the IMFStreamDescriptor interface of the new stream descriptor. The caller must release the interface.
Type: HRESULT
If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.
Refer to Media Foundation return codes.
If you are writing a custom media source, you can use this function to create stream descriptors for the source. This function automatically creates the stream descriptor media type handler and initializes it with the list of types given in apMediaTypes. The function does not set the current media type on the handler, however. To set the type, call IMFMediaTypeHandler::SetCurrentMediaType.
Header: Declared in mfidl.h.
Library: Use mfplat.lib.