Export (0) Print
Expand All

IMFCaptureSource::AddEffect method

Adds an effect to a capture stream.

Syntax


HRESULT AddEffect(
  [in]  DWORD dwSourceStreamIndex,
  [in]  IUnknown *pUnknown
);

Parameters

dwSourceStreamIndex [in]

The capture stream. The value can be any of the following.

ValueMeaning
0–0xFFFFFFFB

The zero-based index of a stream. To get the number of streams, call IMFCaptureSource::GetDeviceStreamCount.

MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM
0xFFFFFFFB

The first image stream.

MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM
0xFFFFFFFC

The first video stream.

MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM
0xFFFFFFFD

The first audio stream.

 

pUnknown [in]

A pointer to one of the following:

  • A Media Foundation transform (MFT) that exposes the IMFTransform interface.
  • An MFT activation object that exposes the IMFActivate interface.

Return value

This method can return one of these values.

Return codeDescription
S_OK

Success.

MF_E_INVALIDMEDIATYPE

No compatible media type could be found.

MF_E_INVALIDSTREAMNUMBER

The dwSourceStreamIndex parameter is invalid.

 

Remarks

The effect must be implemented as a Media Foundation Transform (MFT). The pUnknown parameter can point to an instance of the MFT, or to an activation object for the MFT. For more information, see Activation Objects.

The effect is applied to the stream before the data reaches the capture sinks.

Requirements

Minimum supported client

Windows 8 [desktop apps only]

Minimum supported server

Windows Server 2012 [desktop apps only]

Header

Mfcaptureengine.h

See also

IMFCaptureSource

 

 

Community Additions

ADD
Show:
© 2014 Microsoft