IConfigAsfWriter2::StreamNumFromPin method

[The feature associated with this page, Windows Media Format 11 SDK, is a legacy feature. It has been superseded by Source Reader and Sink Writer. Source Reader and Sink Writer have been optimized for Windows 10 and Windows 11. Microsoft strongly recommends that new code use Source Reader and Sink Writer instead of Windows Media Format 11 SDK, when possible. Microsoft suggests that existing code that uses the legacy APIs be rewritten to use the new APIs if possible.]

The StreamNumFromPin method retrieves the stream number associated with the specified input pin.

Syntax

HRESULT StreamNumFromPin(
  [in]  IPin *pPin,
  [out] WORD *pwStreamNum
);

Parameters

pPin [in]

Pointer to the IPin interface on the input pin.

pwStreamNum [out]

Pointer that receives the stream number.

Return value

If the method succeeds, it returns S_OK. If it fails, it returns an HRESULT error code.

Remarks

Sometimes you may need to use the Windows Media Format SDK interfaces directly to manipulate a stream before running a filter graph. Because you cannot assume that an ASF stream number is the same as the DirectShow pin number, this method is provided.

See also

IConfigAsfWriter2 Interface