IMFASFProfile::GetStreamByNumber method (wmcontainer.h)

Retrieves an Advanced Systems Format (ASF) stream configuration object for a stream in the profile. This method references the stream by stream number instead of stream index.

Syntax

HRESULT GetStreamByNumber(
  [in]  WORD               wStreamNumber,
  [out] IMFASFStreamConfig **ppIStream
);

Parameters

[in] wStreamNumber

The stream number for which to obtain the interface pointer.

[out] ppIStream

Receives a pointer to the IMFASFStreamConfig interface of the ASF stream configuration object. The caller must release the interface.

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::GetStream

IMFASFProfile::SetStream

IMFASFStreamConfig