mf/evr: Provide device manager to the mixer.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
bdbae2ff5a
commit
29aecbef64
|
@ -21,6 +21,9 @@
|
|||
#include "mf_private.h"
|
||||
#include "uuids.h"
|
||||
#include "evr.h"
|
||||
#include "d3d9.h"
|
||||
#include "initguid.h"
|
||||
#include "dxva2api.h"
|
||||
|
||||
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
|
||||
|
||||
|
@ -903,6 +906,7 @@ static HRESULT video_renderer_create_presenter(IMFAttributes *attributes, IMFVid
|
|||
static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
|
||||
{
|
||||
IMFTopologyServiceLookupClient *lookup_client;
|
||||
IMFAttributes *attributes;
|
||||
HRESULT hr;
|
||||
|
||||
if (SUCCEEDED(hr = IMFTransform_QueryInterface(renderer->mixer, &IID_IMFTopologyServiceLookupClient,
|
||||
|
@ -947,6 +951,24 @@ static HRESULT video_renderer_configure_mixer(struct video_renderer *renderer)
|
|||
}
|
||||
}
|
||||
|
||||
/* Set device manager that presenter should have created. */
|
||||
if (SUCCEEDED(IMFTransform_QueryInterface(renderer->mixer, &IID_IMFAttributes, (void **)&attributes)))
|
||||
{
|
||||
IDirect3DDeviceManager9 *device_manager;
|
||||
unsigned int value;
|
||||
|
||||
if (SUCCEEDED(IMFAttributes_GetUINT32(attributes, &MF_SA_D3D_AWARE, &value)) && value)
|
||||
{
|
||||
if (SUCCEEDED(MFGetService((IUnknown *)renderer->presenter, &MR_VIDEO_ACCELERATION_SERVICE,
|
||||
&IID_IDirect3DDeviceManager9, (void **)&device_manager)))
|
||||
{
|
||||
IMFTransform_ProcessMessage(renderer->mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)device_manager);
|
||||
IDirect3DDeviceManager9_Release(device_manager);
|
||||
}
|
||||
}
|
||||
IMFAttributes_Release(attributes);
|
||||
}
|
||||
|
||||
return hr;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue