MFCreateVideoRendererActivate function (mfidl.h)
Creates an activation object for the enhanced video renderer (EVR) media sink.
Syntax
HRESULT MFCreateVideoRendererActivate(
[in] HWND hwndVideo,
[out] IMFActivate **ppActivate
);
Parameters
[in] hwndVideo
Handle to the window where the video will be displayed.
[out] ppActivate
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 code | Description |
---|---|
|
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.
Attribute | Description |
---|---|
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
Requirement | Value |
---|---|
Minimum supported client | Windows Vista [desktop apps only] |
Minimum supported server | Windows Server 2008 [desktop apps only] |
Target Platform | Windows |
Header | mfidl.h |
Library | Mf.lib |
DLL | Mf.dll |