Selects a stream in the presentation.
public:
HRESULT SelectStream(
DWORD dwDescriptorIndex
)
dwDescriptorIndex
Type: DWORDÂ
The stream number to select, indexed from zero. To find the number of streams in the presentation, call IMFPresentationDescriptor::GetStreamDescriptorCount.
Type: HRESULTÂ
The method returns an HRESULT. Possible values include, but are not limited to, those in the following table.
| Return code | Description |
|---|---|
| S_OK | The method succeeded. |
| E_INVALIDARG | dwDescriptorIndex is out of range. |
Refer to Media Foundation return codes.
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.
Header: Declared in mfidl.h.
Library: Use mfuuid.lib.