evr: Add IMFVideoProcessor stub.

Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Nikolay Sivov 2020-06-29 15:43:37 +03:00 committed by Alexandre Julliard
parent 3a17ee9066
commit 881336569c
3 changed files with 137 additions and 7 deletions

View File

@ -49,6 +49,7 @@ struct video_mixer
IMFGetService IMFGetService_iface;
IMFVideoMixerBitmap IMFVideoMixerBitmap_iface;
IMFVideoPositionMapper IMFVideoPositionMapper_iface;
IMFVideoProcessor IMFVideoProcessor_iface;
LONG refcount;
struct input_stream inputs[MAX_MIXER_INPUT_STREAMS];
@ -95,6 +96,11 @@ static struct video_mixer *impl_from_IMFVideoPositionMapper(IMFVideoPositionMapp
return CONTAINING_RECORD(iface, struct video_mixer, IMFVideoPositionMapper_iface);
}
static struct video_mixer *impl_from_IMFVideoProcessor(IMFVideoProcessor *iface)
{
return CONTAINING_RECORD(iface, struct video_mixer, IMFVideoProcessor_iface);
}
static int video_mixer_compare_input_id(const void *a, const void *b)
{
const unsigned int *key = a;
@ -152,6 +158,10 @@ static HRESULT WINAPI video_mixer_transform_QueryInterface(IMFTransform *iface,
{
*obj = &mixer->IMFVideoPositionMapper_iface;
}
else if (IsEqualIID(riid, &IID_IMFVideoProcessor))
{
*obj = &mixer->IMFVideoProcessor_iface;
}
else
{
WARN("Unsupported interface %s.\n", debugstr_guid(riid));
@ -914,6 +924,129 @@ static const IMFVideoPositionMapperVtbl video_mixer_position_mapper_vtbl =
video_mixer_position_mapper_MapOutputCoordinateToInputStream,
};
static HRESULT WINAPI video_mixer_processor_QueryInterface(IMFVideoProcessor *iface, REFIID riid, void **obj)
{
struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface);
return IMFTransform_QueryInterface(&mixer->IMFTransform_iface, riid, obj);
}
static ULONG WINAPI video_mixer_processor_AddRef(IMFVideoProcessor *iface)
{
struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface);
return IMFTransform_AddRef(&mixer->IMFTransform_iface);
}
static ULONG WINAPI video_mixer_processor_Release(IMFVideoProcessor *iface)
{
struct video_mixer *mixer = impl_from_IMFVideoProcessor(iface);
return IMFTransform_Release(&mixer->IMFTransform_iface);
}
static HRESULT WINAPI video_mixer_processor_GetAvailableVideoProcessorModes(IMFVideoProcessor *iface, UINT *count,
GUID **modes)
{
FIXME("%p, %p, %p.\n", iface, count, modes);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetVideoProcessorCaps(IMFVideoProcessor *iface, GUID *mode,
DXVA2_VideoProcessorCaps *caps)
{
FIXME("%p, %s, %p.\n", iface, debugstr_guid(mode), caps);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetVideoProcessorMode(IMFVideoProcessor *iface, GUID *mode)
{
FIXME("%p, %p.\n", iface, mode);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_SetVideoProcessorMode(IMFVideoProcessor *iface, GUID *mode)
{
FIXME("%p, %s.\n", iface, debugstr_guid(mode));
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetProcAmpRange(IMFVideoProcessor *iface, DWORD prop, DXVA2_ValueRange *range)
{
FIXME("%p, %#x, %p.\n", iface, prop, range);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetProcAmpValues(IMFVideoProcessor *iface, DWORD flags, DXVA2_ProcAmpValues *values)
{
FIXME("%p, %#x, %p.\n", iface, flags, values);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_SetProcAmpValues(IMFVideoProcessor *iface, DWORD flags, DXVA2_ProcAmpValues *values)
{
FIXME("%p, %#x, %p.\n", iface, flags, values);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetFilteringRange(IMFVideoProcessor *iface, DWORD prop, DXVA2_ValueRange *range)
{
FIXME("%p, %#x, %p.\n", iface, prop, range);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetFilteringValue(IMFVideoProcessor *iface, DWORD prop, DXVA2_Fixed32 *value)
{
FIXME("%p, %#x, %p.\n", iface, prop, value);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_SetFilteringValue(IMFVideoProcessor *iface, DWORD prop, DXVA2_Fixed32 *value)
{
FIXME("%p, %#x, %p.\n", iface, prop, value);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_GetBackgroundColor(IMFVideoProcessor *iface, COLORREF *color)
{
FIXME("%p, %p.\n", iface, color);
return E_NOTIMPL;
}
static HRESULT WINAPI video_mixer_processor_SetBackgroundColor(IMFVideoProcessor *iface, COLORREF color)
{
FIXME("%p, %#x.\n", iface, color);
return E_NOTIMPL;
}
static const IMFVideoProcessorVtbl video_mixer_processor_vtbl =
{
video_mixer_processor_QueryInterface,
video_mixer_processor_AddRef,
video_mixer_processor_Release,
video_mixer_processor_GetAvailableVideoProcessorModes,
video_mixer_processor_GetVideoProcessorCaps,
video_mixer_processor_GetVideoProcessorMode,
video_mixer_processor_SetVideoProcessorMode,
video_mixer_processor_GetProcAmpRange,
video_mixer_processor_GetProcAmpValues,
video_mixer_processor_SetProcAmpValues,
video_mixer_processor_GetFilteringRange,
video_mixer_processor_GetFilteringValue,
video_mixer_processor_SetFilteringValue,
video_mixer_processor_GetBackgroundColor,
video_mixer_processor_SetBackgroundColor,
};
HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj)
{
TRACE("%p, %s, %s, %p.\n", owner, debugstr_guid(riid_device), debugstr_guid(riid), obj);
@ -943,6 +1076,7 @@ HRESULT evr_mixer_create(IUnknown *outer, void **out)
object->IMFGetService_iface.lpVtbl = &video_mixer_getservice_vtbl;
object->IMFVideoMixerBitmap_iface.lpVtbl = &video_mixer_bitmap_vtbl;
object->IMFVideoPositionMapper_iface.lpVtbl = &video_mixer_position_mapper_vtbl;
object->IMFVideoProcessor_iface.lpVtbl = &video_mixer_processor_vtbl;
object->refcount = 1;
object->input_count = 1;
video_mixer_init_input(&object->inputs[0]);

View File

@ -405,10 +405,8 @@ static void test_default_mixer(void)
IUnknown_Release(unk);
hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoProcessor, (void **)&unk);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
IUnknown_Release(unk);
IUnknown_Release(unk);
hr = IMFGetService_GetService(gs, &MR_VIDEO_MIXER_SERVICE, &IID_IMFVideoPositionMapper, (void **)&unk);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
@ -425,10 +423,8 @@ todo_wine
IUnknown_Release(unk);
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoProcessor, (void **)&unk);
todo_wine
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
if (SUCCEEDED(hr))
IUnknown_Release(unk);
IUnknown_Release(unk);
hr = IMFTransform_QueryInterface(transform, &IID_IMFVideoMixerControl, (void **)&unk);
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);

View File

@ -62,7 +62,7 @@ interface IMFVideoMixerBitmap : IUnknown
[
object,
uuid(6AB0000C-FECE-4d1f-A2AC-A9573530656E),
uuid(6ab0000c-fece-4d1f-a2ac-a9573530656e),
pointer_default(unique)
]
interface IMFVideoProcessor : IUnknown