Commit 28423d79 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

evr/mixer: Implement GetVideoProcessorCaps().

parent 0289b9c2
......@@ -1956,9 +1956,30 @@ static HRESULT WINAPI video_mixer_processor_GetAvailableVideoProcessorModes(IMFV
static HRESULT WINAPI video_mixer_processor_GetVideoProcessorCaps(IMFVideoProcessor *iface, GUID *mode,
DXVA2_VideoProcessorCaps *caps)
{
FIXME("%p, %s, %p.\n", iface, debugstr_guid(mode), caps);
struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface);
IDirectXVideoProcessorService *service;
DXVA2_VideoDesc video_desc;
GUID subtype = { 0 };
HRESULT hr;
return E_NOTIMPL;
TRACE("%p, %s, %p.\n", iface, debugstr_guid(mode), caps);
EnterCriticalSection(&mixer->cs);
if (!mixer->inputs[0].media_type || !mixer->output.media_type)
hr = MF_E_TRANSFORM_TYPE_NOT_SET;
else if (SUCCEEDED(hr = video_mixer_get_processor_service(mixer, &service)))
{
video_mixer_init_dxva_videodesc(mixer->inputs[0].media_type, &video_desc);
IMFMediaType_GetGUID(mixer->output.media_type, &MF_MT_SUBTYPE, &subtype);
hr = IDirectXVideoProcessorService_GetVideoProcessorCaps(service, mode, &video_desc, subtype.Data1, caps);
IDirectXVideoProcessorService_Release(service);
}
LeaveCriticalSection(&mixer->cs);
return hr;
}
static HRESULT WINAPI video_mixer_processor_GetVideoProcessorMode(IMFVideoProcessor *iface, GUID *mode)
......
......@@ -1292,7 +1292,6 @@ static void test_default_mixer_type_negotiation(void)
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFVideoProcessor_GetVideoProcessorCaps(processor, (GUID *)&DXVA2_VideoProcSoftwareDevice, &caps);
todo_wine
ok(hr == MF_E_TRANSFORM_TYPE_NOT_SET, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetInputCurrentType(transform, 0, &media_type);
......@@ -1324,6 +1323,9 @@ static void test_default_mixer_type_negotiation(void)
ok(count > 0 && !!guids, "Unexpected modes data.\n");
CoTaskMemFree(guids);
hr = IMFVideoProcessor_GetVideoProcessorCaps(processor, (GUID *)&DXVA2_VideoProcSoftwareDevice, &caps);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
hr = IMFTransform_GetOutputCurrentType(transform, 0, &media_type2);
ok(hr == S_OK, "Unexpected hr %#lx.\n", hr);
ok(media_type == media_type2, "Unexpected media type instance.\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment