evr: Added MFCreateVideoMixerAndPresenter().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
1caf8ade07
commit
9630f97798
|
@ -14,7 +14,7 @@
|
||||||
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader2
|
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader2
|
||||||
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader
|
@ stub MFCreateVideoMediaTypeFromVideoInfoHeader
|
||||||
@ stdcall MFCreateVideoMixer(ptr ptr ptr ptr)
|
@ stdcall MFCreateVideoMixer(ptr ptr ptr ptr)
|
||||||
@ stub MFCreateVideoMixerAndPresenter
|
@ stdcall MFCreateVideoMixerAndPresenter(ptr ptr ptr ptr ptr ptr)
|
||||||
@ stub MFCreateVideoOTA
|
@ stub MFCreateVideoOTA
|
||||||
@ stub MFCreateVideoPresenter2
|
@ stub MFCreateVideoPresenter2
|
||||||
@ stdcall MFCreateVideoPresenter(ptr ptr ptr ptr)
|
@ stdcall MFCreateVideoPresenter(ptr ptr ptr ptr)
|
||||||
|
|
|
@ -196,3 +196,31 @@ HRESULT WINAPI DllUnregisterServer(void)
|
||||||
{
|
{
|
||||||
return __wine_unregister_resources(instance_evr);
|
return __wine_unregister_resources(instance_evr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
HRESULT WINAPI MFCreateVideoMixerAndPresenter(IUnknown *mixer_outer, IUnknown *presenter_outer,
|
||||||
|
REFIID riid_mixer, void **mixer, REFIID riid_presenter, void **presenter)
|
||||||
|
{
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
TRACE("%p, %p, %s, %p, %s, %p.\n", mixer_outer, presenter_outer, debugstr_guid(riid_mixer), mixer,
|
||||||
|
debugstr_guid(riid_presenter), presenter);
|
||||||
|
|
||||||
|
if (!mixer || !presenter)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
|
*mixer = *presenter = NULL;
|
||||||
|
|
||||||
|
if (SUCCEEDED(hr = CoCreateInstance(&CLSID_MFVideoMixer9, mixer_outer, CLSCTX_INPROC_SERVER, riid_mixer, mixer)))
|
||||||
|
hr = CoCreateInstance(&CLSID_MFVideoPresenter9, presenter_outer, CLSCTX_INPROC_SERVER, riid_presenter, presenter);
|
||||||
|
|
||||||
|
if (FAILED(hr))
|
||||||
|
{
|
||||||
|
if (*mixer)
|
||||||
|
IUnknown_Release((IUnknown *)*mixer);
|
||||||
|
if (*presenter)
|
||||||
|
IUnknown_Release((IUnknown *)*presenter);
|
||||||
|
*mixer = *presenter = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
return hr;
|
||||||
|
}
|
||||||
|
|
|
@ -950,6 +950,18 @@ static void test_default_presenter(void)
|
||||||
IMFVideoPresenter_Release(presenter);
|
IMFVideoPresenter_Release(presenter);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void test_MFCreateVideoMixerAndPresenter(void)
|
||||||
|
{
|
||||||
|
IUnknown *mixer, *presenter;
|
||||||
|
HRESULT hr;
|
||||||
|
|
||||||
|
hr = MFCreateVideoMixerAndPresenter(NULL, NULL, &IID_IUnknown, (void **)&mixer, &IID_IUnknown, (void **)&presenter);
|
||||||
|
ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
|
||||||
|
|
||||||
|
IUnknown_Release(mixer);
|
||||||
|
IUnknown_Release(presenter);
|
||||||
|
}
|
||||||
|
|
||||||
START_TEST(evr)
|
START_TEST(evr)
|
||||||
{
|
{
|
||||||
CoInitialize(NULL);
|
CoInitialize(NULL);
|
||||||
|
@ -965,6 +977,7 @@ START_TEST(evr)
|
||||||
test_default_mixer_type_negotiation();
|
test_default_mixer_type_negotiation();
|
||||||
test_surface_sample();
|
test_surface_sample();
|
||||||
test_default_presenter();
|
test_default_presenter();
|
||||||
|
test_MFCreateVideoMixerAndPresenter();
|
||||||
|
|
||||||
CoUninitialize();
|
CoUninitialize();
|
||||||
}
|
}
|
||||||
|
|
|
@ -299,7 +299,8 @@ cpp_quote("DEFINE_GUID(MR_VIDEO_MIXER_SERVICE, 0x073cd2fc, 0x6cf4, 0x40b7, 0x88,
|
||||||
cpp_quote("DEFINE_GUID(MR_VIDEO_ACCELERATION_SERVICE, 0xefef5175, 0x5c7d, 0x4ce2, 0xbb, 0xbd, 0x34, 0xff, 0x8b, 0xca, 0x65, 0x54);")
|
cpp_quote("DEFINE_GUID(MR_VIDEO_ACCELERATION_SERVICE, 0xefef5175, 0x5c7d, 0x4ce2, 0xbb, 0xbd, 0x34, 0xff, 0x8b, 0xca, 0x65, 0x54);")
|
||||||
cpp_quote("DEFINE_GUID(MR_BUFFER_SERVICE, 0xa562248c, 0x9ac6, 0x4ffc, 0x9f, 0xba, 0x3a, 0xf8, 0xf8, 0xad, 0x1a, 0x4d);")
|
cpp_quote("DEFINE_GUID(MR_BUFFER_SERVICE, 0xa562248c, 0x9ac6, 0x4ffc, 0x9f, 0xba, 0x3a, 0xf8, 0xf8, 0xad, 0x1a, 0x4d);")
|
||||||
cpp_quote("DEFINE_GUID(VIDEO_ZOOM_RECT, 0x7aaa1638, 0x1b7f, 0x4c93, 0xbd, 0x89, 0x5b, 0x9c, 0x9f, 0xb6, 0xfc, 0xf0);")
|
cpp_quote("DEFINE_GUID(VIDEO_ZOOM_RECT, 0x7aaa1638, 0x1b7f, 0x4c93, 0xbd, 0x89, 0x5b, 0x9c, 0x9f, 0xb6, 0xfc, 0xf0);")
|
||||||
|
|
||||||
cpp_quote("HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
|
cpp_quote("HRESULT WINAPI MFCreateVideoMixer(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
|
||||||
|
cpp_quote("HRESULT WINAPI MFCreateVideoMixerAndPresenter(IUnknown *mixer_outer, IUnknown *presenter_outer, ")
|
||||||
|
cpp_quote(" REFIID riid_mixer, void **mixer, REFIID riid_presenter, void **presenter);")
|
||||||
cpp_quote("HRESULT WINAPI MFCreateVideoPresenter(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
|
cpp_quote("HRESULT WINAPI MFCreateVideoPresenter(IUnknown *owner, REFIID riid_device, REFIID riid, void **obj);")
|
||||||
cpp_quote("HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sample);")
|
cpp_quote("HRESULT WINAPI MFCreateVideoSampleFromSurface(IUnknown *surface, IMFSample **sample);")
|
||||||
|
|
Loading…
Reference in New Issue