Share via


IMultiMediaStream::GetMediaStream (Compact 2013)

3/26/2014

This method retrieves a media stream that has the specified purpose ID.

Syntax

HRESULT GetMediaStream(
  REFMSPID idPurpose,
  IMediaStream** ppMediaStream
);

Parameters

  • idPurpose
    [in] Value that specifies the desired stream.
  • ppMediaStream
    [out] Address of a pointer to an IMediaStream interface that will point to the desired media stream.

Return Value

Returns one of the following values.

Value

Description

E_POINTER

The ppMediaStream pointer is invalid.

MS_E_NOSTREAM

No stream has the specified purpose ID.

S_OK

Success.

Remarks

If a stream exists that matches the purpose ID in idPurpose, the ppMediaStream parameter points to the stream and increments its reference count.

MSPID_PrimaryVideo and MSPID_PrimaryAudio, which represent the primary video and audio streams, are the most commonly used purpose IDs.

Requirements

Header

dshow.h

Library

Strmiids.lib

See Also

Reference

IMultiMediaStream Interface