mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-06 08:39:34 +00:00
evr/mixer: Implement GetVideoProcessorCaps().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
0289b9c23a
commit
28423d79d4
|
@ -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");
|
||||
|
|
Loading…
Reference in a new issue