IMFASFProfile::GetStream method (wmcontainer.h)

Retrieves a stream from the profile by stream index, and/or retrieves the stream number for a stream index.

Syntax

HRESULT GetStream(
  [in]  DWORD              dwStreamIndex,
  [out] WORD               *pwStreamNumber,
  [out] IMFASFStreamConfig **ppIStream
);

Parameters

[in] dwStreamIndex

The index of the stream to retrieve. Stream indexes are sequential and zero-based. You can get the number of streams that are in the profile by calling the IMFASFProfile::GetStreamCount method.

[out] pwStreamNumber

Receives the stream number of the requested stream. Stream numbers are one-based and are not necessarily sequential. This parameter can be set to NULL if the stream number is not required.

[out] ppIStream

Receives a pointer to the IMFASFStreamConfig interface of the ASF stream configuration object. The caller must release the interface. This parameter can be NULL if you want to retrieve the stream number without accessing the stream configuration.

Return value

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.

Remarks

This method does not create a copy of the stream configuration object. The pointer that is retrieved points to the object within the profile object. You must not make any changes to the stream configuration object using this pointer, because doing so can affect the profile object in unexpected ways.

To change the configuration of the stream configuration object in the profile, you must first clone the stream configuration object by calling IMFASFStreamConfig::Clone. Make whatever changes are required to the clone of the object and then add the updated object by calling the IMFASFProfile::SetStream method.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header wmcontainer.h
Library Mfuuid.lib

See also

ASF Profile

IMFASFProfile

IMFASFProfile::GetStreamByNumber

IMFASFProfile::GetStreamCount

IMFASFProfile::RemoveStream

IMFASFProfile::SetStream

IMFASFStreamConfig