IMFSourceReader::GetServiceForStream method

Queries the underlying media source or decoder for an interface.

Syntax


HRESULT GetServiceForStream(
  [in]   DWORD dwStreamIndex,
  [in]   REFGUID guidService,
  [in]   REFIID riid,
  [out]  LPVOID *ppvObject
);

Parameters

dwStreamIndex [in]

The stream or object to query. If the value is MF_SOURCE_READER_MEDIASOURCE, the method queries the media source. Otherwise, it queries the decoder that is associated with the specified stream. The following values are possible.

ValueMeaning
0–0xFFFFFFFB

The zero-based index of a stream.

MF_SOURCE_READER_FIRST_VIDEO_STREAM
0xFFFFFFFC

The first video stream.

MF_SOURCE_READER_FIRST_AUDIO_STREAM
0xFFFFFFFD

The first audio stream.

MF_SOURCE_READER_MEDIASOURCE
0xFFFFFFFF

The media source.

 

guidService [in]

A service identifier GUID. If the value is GUID_NULL, the method calls QueryInterface to get the requested interface. Otherwise, the method calls the IMFGetService::GetService method. For a list of service identifiers, see Service Interfaces.

riid [in]

The interface identifier (IID) of the interface being requested.

ppvObject [out]

Receives a pointer to the requested interface. The caller must release the interface.

Return value

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

This interface is available on Windows Vista if Platform Update Supplement for Windows Vista is installed.

Requirements

Minimum supported client

Windows 7, Windows Vista and Platform Update Supplement for Windows Vista [desktop apps | Windows Store apps]

Minimum supported server

Windows Server 2008 R2 [desktop apps | Windows Store apps]

Header

Mfreadwrite.h

See also

Service Interfaces
Source Reader
IMFSourceReader

 

 

Community Additions

ADD
Show:
© 2014 Microsoft