Export (0) Print
Expand All
Expand Minimize

MFCreateVideoRendererActivate function

Creates an activation object for the enhanced video renderer (EVR) media sink.

Syntax


HRESULT MFCreateVideoRendererActivate(
  _In_   HWND hwndVideo,
  _Out_  IMFActivate **ppActivate
);

Parameters

hwndVideo [in]

Handle to the window where the video will be displayed.

ppActivate [out]

Receives a pointer to the IMFActivate interface. Use this interface to create the EVR. The caller must release the interface.

Return value

The function returns an HRESULT. Possible values include, but are not limited to, those in the following table.

Return codeDescription
S_OK

The method succeeded.

 

Remarks

To create the EVR, call IMFActivate::ActivateObject on the retrieved IMFActivate pointer. (If you are using the Media Session, the Media Session automatically calls ActivateObject when you queue the topology.)

To configure the EVR, set any of the following attributes on the IMFActivate object before calling ActivateObject.

AttributeDescription
MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE Activation object for a custom mixer.
MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID CLSID for a custom mixer.
MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS Flags for creating a custom mixer.
MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE Activation object for a custom presenter.
MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID CLSID for a custom presenter.
MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS Flags for creating a custom presenter.

 

When IMFActivate::ActivateObject is called, the activation objects sets the video window on the EVR by calling IMFVideoDisplayControl::SetVideoPosition. Passing NULL for the hwndVideo parameter is not an error, but no video will render unless the EVR has a valid video window.

Requirements

Minimum supported client

Windows Vista [desktop apps only]

Minimum supported server

Windows Server 2008 [desktop apps only]

Header

Mfidl.h

Library

Mf.lib

DLL

Mf.dll

See also

Media Foundation Functions
Activation Objects
Enhanced Video Renderer

 

 

Community Additions

ADD
Show:
© 2014 Microsoft