IMFPresentationDescriptor::SelectStream Method

Selects a stream in the presentation.

Syntax

public:
HRESULT SelectStream(
         DWORD dwDescriptorIndex
)  

Parameters

dwDescriptorIndex
Type: DWORD 

The stream number to select, indexed from zero. To find the number of streams in the presentation, call IMFPresentationDescriptor::GetStreamDescriptorCount.

Return value

Type: HRESULT 

The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codes
Return code Description
S_OK The method succeeded.
E_INVALIDARG dwDescriptorIndex is out of range.

Refer to Media Foundation return codes.

Remarks

If a stream is selected, the media source will generate data for that stream. The media source will not generated data for deselected streams. To deselect a stream, call IMFPresentationDescriptor::DeselectStream.

To query whether a stream is selected, call IMFPresentationDescriptor::GetStreamDescriptorByIndex.

Requirements

Header: Declared in mfidl.h.

Library: Use mfuuid.lib.