IMFPresentationDescriptor::GetStreamDescriptorByIndex Method

Retrieves a stream descriptor for a stream in the presentation. The stream descriptor contains information about the stream.

Syntax

public:
HRESULT GetStreamDescriptorByIndex(
         DWORD dwIndex,
         BOOL *pfSelected,
         IMFStreamDescriptor **ppDescriptor
)  

Parameters

dwIndex
Type: DWORD 

Zero-based index of the stream. To find the number of streams in the presentation, call the IMFPresentationDescriptor::GetStreamDescriptorCount method.

pfSelected
Type: BOOL *

[out]

Receives a Boolean value. The value is TRUE if the stream is currently selected, or FALSE if the stream is currently deselected. If a stream is selected, the media source generates data for that stream when IMFMediaSource::Start is called. The media source will not generated data for deselected streams. To select a stream, call IMFPresentationDescriptor::SelectStream.To deselect a stream, call IMFPresentationDescriptor::DeselectStream.

ppDescriptor
Type: IMFStreamDescriptor **

[out, optional]

Receives a pointer to the stream descriptor’s IMFStreamDescriptor interface. 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

Requirements

Header: Declared in mfidl.h.

Library: Use mfuuid.lib.