Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/tests/Makefile.in | 2 +- dlls/evr/tests/evr.c | 55 ++++++++++++++++++++++++++++++++++++-- 2 files changed, 54 insertions(+), 3 deletions(-)
diff --git a/dlls/evr/tests/Makefile.in b/dlls/evr/tests/Makefile.in index 5bd82277d1b..c5db2226ebc 100644 --- a/dlls/evr/tests/Makefile.in +++ b/dlls/evr/tests/Makefile.in @@ -1,5 +1,5 @@ TESTDLL = evr.dll -IMPORTS = dxva2 mfplat mfuuid strmiids uuid dxguid ole32 oleaut32 evr d3d9 user32 +IMPORTS = dxva2 mfplat mfuuid mf strmiids uuid dxguid ole32 oleaut32 evr d3d9 user32
C_SRCS = \ evr.c diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 70c7053efdf..ce2803bcb34 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -1562,6 +1562,8 @@ static void test_presenter_native_video_size(void) IMFTransform *mixer; SIZE size, ratio; HRESULT hr; + IMFVideoMediaType *video_type; + IDirect3DDeviceManager9 *dm;
hr = MFCreateVideoMixer(NULL, &IID_IDirect3DDevice9, &IID_IMFTransform, (void **)&mixer); ok(hr == S_OK, "Failed to create a mixer, hr %#x.\n", hr); @@ -1594,6 +1596,27 @@ todo_wine { hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
+ /* Configure mixer primary stream. */ + hr = MFGetService((IUnknown *)presenter, &MR_VIDEO_ACCELERATION_SERVICE, &IID_IDirect3DDeviceManager9, (void **)&dm); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFTransform_ProcessMessage(mixer, MFT_MESSAGE_SET_D3D_MANAGER, (ULONG_PTR)dm); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + IDirect3DDeviceManager9_Release(dm); + + hr = pMFCreateVideoMediaTypeFromSubtype(&MFVideoFormat_RGB32, &video_type); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFVideoMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)640 << 32 | 480); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + hr = IMFVideoMediaType_SetUINT32(video_type, &MF_MT_ALL_SAMPLES_INDEPENDENT, TRUE); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFTransform_SetInputType(mixer, 0, (IMFMediaType *)video_type, 0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + /* Native video size is cached on initialization. */ init_test_host(&host, mixer, presenter);
hr = IMFTopologyServiceLookupClient_InitServicePointers(lookup_client, &host.IMFTopologyServiceLookup_iface); @@ -1602,9 +1625,37 @@ todo_wine { hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); - ok(size.cx == 0 && size.cy == 0, "Unexpected size.\n"); - ok(ratio.cx == 0 && ratio.cy == 0, "Unexpected ratio.\n"); + ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy); + ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, + "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy); +} + /* Update input type. */ + hr = IMFVideoMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)320 << 32 | 240); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFTransform_SetInputType(mixer, 0, (IMFMediaType *)video_type, 0); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy); + ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, + "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy); } + /* Negotiating types updates native video size. */ + hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0); +todo_wine + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); +todo_wine { + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(size.cx == 320 && size.cy == 240, "Unexpected size %u x %u.\n", size.cx, size.cy); + ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, + "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy); +} + IMFVideoMediaType_Release(video_type); IMFVideoDisplayControl_Release(display_control); IMFVideoPresenter_Release(presenter); IMFTransform_Release(mixer);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/presenter.c | 64 ++++++++++++++++++++++++++++++++++++++++++-- dlls/evr/tests/evr.c | 17 +++++------- 2 files changed, 68 insertions(+), 13 deletions(-)
diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index 15ebcd80acc..ba9e09c4e3e 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -62,6 +62,8 @@ struct video_presenter MFVideoNormalizedRect src_rect; RECT dst_rect; DWORD rendering_prefs; + SIZE native_size; + SIZE native_ratio; unsigned int state; CRITICAL_SECTION cs; }; @@ -377,6 +379,51 @@ static void video_presenter_set_mixer_rect(struct video_presenter *presenter) } }
+static unsigned int get_gcd(unsigned int a, unsigned int b) +{ + unsigned int m; + + while (b) + { + m = a % b; + a = b; + b = m; + } + + return a; +} + +static void video_presenter_get_native_video_size(struct video_presenter *presenter) +{ + IMFMediaType *media_type; + UINT64 frame_size = 0; + + memset(&presenter->native_size, 0, sizeof(presenter->native_size)); + memset(&presenter->native_ratio, 0, sizeof(presenter->native_ratio)); + + if (!presenter->mixer) + return; + + if (FAILED(IMFTransform_GetInputCurrentType(presenter->mixer, 0, &media_type))) + return; + + if (SUCCEEDED(IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &frame_size))) + { + unsigned int gcd; + + presenter->native_size.cx = frame_size >> 32; + presenter->native_size.cy = frame_size; + + if ((gcd = get_gcd(presenter->native_size.cx, presenter->native_size.cy))) + { + presenter->native_ratio.cx = presenter->native_size.cx / gcd; + presenter->native_ratio.cy = presenter->native_size.cy / gcd; + } + } + + IMFMediaType_Release(media_type); +} + static HRESULT video_presenter_attach_mixer(struct video_presenter *presenter, IMFTopologyServiceLookup *service_lookup) { IMFVideoDeviceID *device_id; @@ -410,6 +457,7 @@ static HRESULT video_presenter_attach_mixer(struct video_presenter *presenter, I }
video_presenter_set_mixer_rect(presenter); + video_presenter_get_native_video_size(presenter);
return hr; } @@ -508,9 +556,21 @@ static ULONG WINAPI video_presenter_control_Release(IMFVideoDisplayControl *ifac static HRESULT WINAPI video_presenter_control_GetNativeVideoSize(IMFVideoDisplayControl *iface, SIZE *video_size, SIZE *aspect_ratio) { - FIXME("%p, %p, %p.\n", iface, video_size, aspect_ratio); + struct video_presenter *presenter = impl_from_IMFVideoDisplayControl(iface);
- return E_NOTIMPL; + TRACE("%p, %p, %p.\n", iface, video_size, aspect_ratio); + + if (!video_size && !aspect_ratio) + return E_POINTER; + + EnterCriticalSection(&presenter->cs); + if (video_size) + *video_size = presenter->native_size; + if (aspect_ratio) + *aspect_ratio = presenter->native_ratio; + LeaveCriticalSection(&presenter->cs); + + return S_OK; }
static HRESULT WINAPI video_presenter_control_GetIdealVideoSize(IMFVideoDisplayControl *iface, SIZE *min_size, diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index ce2803bcb34..39d2ed72a06 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -1578,21 +1578,18 @@ static void test_presenter_native_video_size(void) ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, NULL, NULL); -todo_wine ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr);
memset(&size, 0xcc, sizeof(size)); hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, NULL); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(size.cx == 0 && size.cy == 0, "Unexpected size.\n"); -} + memset(&ratio, 0xcc, sizeof(ratio)); hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, NULL, &ratio); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(ratio.cx == 0 && ratio.cy == 0, "Unexpected ratio.\n"); -} + hr = IMFVideoPresenter_QueryInterface(presenter, &IID_IMFTopologyServiceLookupClient, (void **)&lookup_client); ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
@@ -1623,12 +1620,11 @@ todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy); ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy); -} + /* Update input type. */ hr = IMFVideoMediaType_SetUINT64(video_type, &MF_MT_FRAME_SIZE, (UINT64)320 << 32 | 240); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); @@ -1637,24 +1633,23 @@ todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); ok(size.cx == 640 && size.cy == 480, "Unexpected size %u x %u.\n", size.cx, size.cy); ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy); -} + /* Negotiating types updates native video size. */ hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0); todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); -todo_wine { ok(hr == S_OK, "Unexpected hr %#x.\n", hr); +todo_wine ok(size.cx == 320 && size.cy == 240, "Unexpected size %u x %u.\n", size.cx, size.cy); ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy); -} + IMFVideoMediaType_Release(video_type); IMFVideoDisplayControl_Release(display_control); IMFVideoPresenter_Release(presenter);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/presenter.c | 118 ++++++++++++++++++++++++++----------------- dlls/evr/tests/evr.c | 2 - 2 files changed, 71 insertions(+), 49 deletions(-)
diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index ba9e09c4e3e..ecfa9234426 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -103,6 +103,58 @@ static struct video_presenter *impl_from_IMFGetService(IMFGetService *iface) return CONTAINING_RECORD(iface, struct video_presenter, IMFGetService_iface); }
+static unsigned int get_gcd(unsigned int a, unsigned int b) +{ + unsigned int m; + + while (b) + { + m = a % b; + a = b; + b = m; + } + + return a; +} + +static void video_presenter_get_native_video_size(struct video_presenter *presenter) +{ + IMFMediaType *media_type; + UINT64 frame_size = 0; + + memset(&presenter->native_size, 0, sizeof(presenter->native_size)); + memset(&presenter->native_ratio, 0, sizeof(presenter->native_ratio)); + + if (!presenter->mixer) + return; + + if (FAILED(IMFTransform_GetInputCurrentType(presenter->mixer, 0, &media_type))) + return; + + if (SUCCEEDED(IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &frame_size))) + { + unsigned int gcd; + + presenter->native_size.cx = frame_size >> 32; + presenter->native_size.cy = frame_size; + + if ((gcd = get_gcd(presenter->native_size.cx, presenter->native_size.cy))) + { + presenter->native_ratio.cx = presenter->native_size.cx / gcd; + presenter->native_ratio.cy = presenter->native_size.cy / gcd; + } + } + + IMFMediaType_Release(media_type); +} + +static HRESULT video_presenter_invalidate_media_type(struct video_presenter *presenter) +{ + video_presenter_get_native_video_size(presenter); + + return S_OK; +} + static HRESULT WINAPI video_presenter_inner_QueryInterface(IUnknown *iface, REFIID riid, void **obj) { struct video_presenter *presenter = impl_from_IUnknown(iface); @@ -277,9 +329,26 @@ static HRESULT WINAPI video_presenter_OnClockSetRate(IMFVideoPresenter *iface, M
static HRESULT WINAPI video_presenter_ProcessMessage(IMFVideoPresenter *iface, MFVP_MESSAGE_TYPE message, ULONG_PTR param) { - FIXME("%p, %d, %lu.\n", iface, message, param); + struct video_presenter *presenter = impl_from_IMFVideoPresenter(iface); + HRESULT hr;
- return E_NOTIMPL; + TRACE("%p, %d, %lu.\n", iface, message, param); + + EnterCriticalSection(&presenter->cs); + + switch (message) + { + case MFVP_MESSAGE_INVALIDATEMEDIATYPE: + hr = video_presenter_invalidate_media_type(presenter); + break; + default: + FIXME("Unsupported message %u.\n", message); + hr = E_NOTIMPL; + } + + LeaveCriticalSection(&presenter->cs); + + return hr; }
static HRESULT WINAPI video_presenter_GetCurrentMediaType(IMFVideoPresenter *iface, IMFVideoMediaType **media_type) @@ -379,51 +448,6 @@ static void video_presenter_set_mixer_rect(struct video_presenter *presenter) } }
-static unsigned int get_gcd(unsigned int a, unsigned int b) -{ - unsigned int m; - - while (b) - { - m = a % b; - a = b; - b = m; - } - - return a; -} - -static void video_presenter_get_native_video_size(struct video_presenter *presenter) -{ - IMFMediaType *media_type; - UINT64 frame_size = 0; - - memset(&presenter->native_size, 0, sizeof(presenter->native_size)); - memset(&presenter->native_ratio, 0, sizeof(presenter->native_ratio)); - - if (!presenter->mixer) - return; - - if (FAILED(IMFTransform_GetInputCurrentType(presenter->mixer, 0, &media_type))) - return; - - if (SUCCEEDED(IMFMediaType_GetUINT64(media_type, &MF_MT_FRAME_SIZE, &frame_size))) - { - unsigned int gcd; - - presenter->native_size.cx = frame_size >> 32; - presenter->native_size.cy = frame_size; - - if ((gcd = get_gcd(presenter->native_size.cx, presenter->native_size.cy))) - { - presenter->native_ratio.cx = presenter->native_size.cx / gcd; - presenter->native_ratio.cy = presenter->native_size.cy / gcd; - } - } - - IMFMediaType_Release(media_type); -} - static HRESULT video_presenter_attach_mixer(struct video_presenter *presenter, IMFTopologyServiceLookup *service_lookup) { IMFVideoDeviceID *device_id; diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index 39d2ed72a06..e7eabc5971a 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -1640,12 +1640,10 @@ static void test_presenter_native_video_size(void)
/* Negotiating types updates native video size. */ hr = IMFVideoPresenter_ProcessMessage(presenter, MFVP_MESSAGE_INVALIDATEMEDIATYPE, 0); -todo_wine ok(hr == S_OK, "Unexpected hr %#x.\n", hr);
hr = IMFVideoDisplayControl_GetNativeVideoSize(display_control, &size, &ratio); ok(hr == S_OK, "Unexpected hr %#x.\n", hr); -todo_wine ok(size.cx == 320 && size.cy == 240, "Unexpected size %u x %u.\n", size.cx, size.cy); ok((ratio.cx == 4 && ratio.cy == 3) || broken(!memcmp(&ratio, &size, sizeof(ratio))) /* < Win10 */, "Unexpected ratio %u x %u.\n", ratio.cx, ratio.cy);
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/evr/presenter.c | 28 ++++++++++++++++++++++++---- dlls/evr/tests/evr.c | 32 ++++++++++++++++++++++++++++++++ include/evr.idl | 9 +++++++++ 3 files changed, 65 insertions(+), 4 deletions(-)
diff --git a/dlls/evr/presenter.c b/dlls/evr/presenter.c index ecfa9234426..8fcd6d58b3c 100644 --- a/dlls/evr/presenter.c +++ b/dlls/evr/presenter.c @@ -64,6 +64,7 @@ struct video_presenter DWORD rendering_prefs; SIZE native_size; SIZE native_ratio; + unsigned int ar_mode; unsigned int state; CRITICAL_SECTION cs; }; @@ -669,16 +670,34 @@ static HRESULT WINAPI video_presenter_control_GetVideoPosition(IMFVideoDisplayCo
static HRESULT WINAPI video_presenter_control_SetAspectRatioMode(IMFVideoDisplayControl *iface, DWORD mode) { - FIXME("%p, %d.\n", iface, mode); + struct video_presenter *presenter = impl_from_IMFVideoDisplayControl(iface);
- return E_NOTIMPL; + TRACE("%p, %#x.\n", iface, mode); + + if (mode & ~MFVideoARMode_Mask) + return E_INVALIDARG; + + EnterCriticalSection(&presenter->cs); + presenter->ar_mode = mode; + LeaveCriticalSection(&presenter->cs); + + return S_OK; }
static HRESULT WINAPI video_presenter_control_GetAspectRatioMode(IMFVideoDisplayControl *iface, DWORD *mode) { - FIXME("%p, %p.\n", iface, mode); + struct video_presenter *presenter = impl_from_IMFVideoDisplayControl(iface);
- return E_NOTIMPL; + TRACE("%p, %p.\n", iface, mode); + + if (!mode) + return E_POINTER; + + EnterCriticalSection(&presenter->cs); + *mode = presenter->ar_mode; + LeaveCriticalSection(&presenter->cs); + + return S_OK; }
static HRESULT WINAPI video_presenter_control_SetVideoWindow(IMFVideoDisplayControl *iface, HWND window) @@ -969,6 +988,7 @@ HRESULT evr_presenter_create(IUnknown *outer, void **out) object->outer_unk = outer ? outer : &object->IUnknown_inner; object->refcount = 1; object->src_rect.right = object->src_rect.bottom = 1.0f; + object->ar_mode = MFVideoARMode_PreservePicture | MFVideoARMode_PreservePixel; InitializeCriticalSection(&object->cs);
if (FAILED(hr = DXVA2CreateDirect3DDeviceManager9(&object->reset_token, &object->device_manager))) diff --git a/dlls/evr/tests/evr.c b/dlls/evr/tests/evr.c index e7eabc5971a..3ae36d9b5df 100644 --- a/dlls/evr/tests/evr.c +++ b/dlls/evr/tests/evr.c @@ -1654,6 +1654,37 @@ static void test_presenter_native_video_size(void) IMFTransform_Release(mixer); }
+static void test_presenter_ar_mode(void) +{ + IMFVideoDisplayControl *display_control; + HRESULT hr; + DWORD mode; + + hr = MFCreateVideoPresenter(NULL, &IID_IDirect3DDevice9, &IID_IMFVideoDisplayControl, (void **)&display_control); + ok(hr == S_OK, "Failed to create default presenter, hr %#x.\n", hr); + + hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, NULL); + ok(hr == E_POINTER, "Unexpected hr %#x.\n", hr); + + mode = 0; + hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(mode == (MFVideoARMode_PreservePicture | MFVideoARMode_PreservePixel), "Unexpected mode %#x.\n", mode); + + hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, 0x100); + ok(hr == E_INVALIDARG, "Unexpected hr %#x.\n", hr); + + hr = IMFVideoDisplayControl_SetAspectRatioMode(display_control, MFVideoARMode_Mask); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + + mode = 0; + hr = IMFVideoDisplayControl_GetAspectRatioMode(display_control, &mode); + ok(hr == S_OK, "Unexpected hr %#x.\n", hr); + ok(mode == MFVideoARMode_Mask, "Unexpected mode %#x.\n", mode); + + IMFVideoDisplayControl_Release(display_control); +} + static void test_mixer_output_rectangle(void) { IMFVideoMixerControl *mixer_control; @@ -1836,6 +1867,7 @@ START_TEST(evr) test_MFCreateVideoSampleAllocator(); test_presenter_video_position(); test_presenter_native_video_size(); + test_presenter_ar_mode(); test_mixer_output_rectangle(); test_mixer_zorder();
diff --git a/include/evr.idl b/include/evr.idl index c2178835383..413f5af1d47 100644 --- a/include/evr.idl +++ b/include/evr.idl @@ -228,6 +228,15 @@ interface IMFDesiredSample : IUnknown void Clear(); }
+typedef enum MFVideoAspectRatioMode +{ + MFVideoARMode_None = 0x00000000, + MFVideoARMode_PreservePicture = 0x00000001, + MFVideoARMode_PreservePixel = 0x00000002, + MFVideoARMode_NonLinearStretch = 0x00000004, + MFVideoARMode_Mask = 0x00000007, +} MFVideoAspectRatioMode; + [ object, uuid(a490b1e4-ab84-4d31-a1b2-181e03b1077a),
Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mfplat/mfplat.spec | 2 +- dlls/mfplat/queue.c | 10 ++++++++++ include/mfapi.h | 2 ++ 3 files changed, 13 insertions(+), 1 deletion(-)
diff --git a/dlls/mfplat/mfplat.spec b/dlls/mfplat/mfplat.spec index 8f5e7db6aee..5f4735cd6f7 100644 --- a/dlls/mfplat/mfplat.spec +++ b/dlls/mfplat/mfplat.spec @@ -23,7 +23,7 @@ @ stub MFAverageTimePerFrameToFrameRate @ stdcall MFBeginCreateFile(long long long wstr ptr ptr ptr) @ stub MFBeginGetHostByName -@ stub MFBeginRegisterWorkQueueWithMMCSS +@ stdcall MFBeginRegisterWorkQueueWithMMCSS(long wstr long ptr ptr) @ stdcall MFBeginRegisterWorkQueueWithMMCSSEx(long wstr long long ptr ptr) rtworkq.RtwqBeginRegisterWorkQueueWithMMCSS @ stdcall MFBeginUnregisterWorkQueueWithMMCSS(long ptr ptr) rtworkq.RtwqBeginUnregisterWorkQueueWithMMCSS @ stub MFBlockThread diff --git a/dlls/mfplat/queue.c b/dlls/mfplat/queue.c index 2080a79f848..8279929b46e 100644 --- a/dlls/mfplat/queue.c +++ b/dlls/mfplat/queue.c @@ -140,3 +140,13 @@ HRESULT WINAPI MFGetTimerPeriodicity(DWORD *period)
return S_OK; } + +/*********************************************************************** + * MFBeginRegisterWorkQueueWithMMCSS (mfplat.@) + */ +HRESULT WINAPI MFBeginRegisterWorkQueueWithMMCSS(DWORD queue, const WCHAR *usage_class, DWORD taskid, + IMFAsyncCallback *callback, IUnknown *state) +{ + return RtwqBeginRegisterWorkQueueWithMMCSS(queue, usage_class, taskid, 0, + (IRtwqAsyncCallback *)callback, state); +} diff --git a/include/mfapi.h b/include/mfapi.h index e9b26f322c3..499c77ab337 100644 --- a/include/mfapi.h +++ b/include/mfapi.h @@ -488,6 +488,8 @@ HRESULT WINAPI MFAllocateWorkQueue(DWORD *queue); HRESULT WINAPI MFAllocateWorkQueueEx(MFASYNC_WORKQUEUE_TYPE queue_type, DWORD *queue); HRESULT WINAPI MFBeginCreateFile(MF_FILE_ACCESSMODE access_mode, MF_FILE_OPENMODE open_mode, MF_FILE_FLAGS flags, const WCHAR *path, IMFAsyncCallback *callback, IUnknown *state, IUnknown **cancel_cookie); +HRESULT WINAPI MFBeginRegisterWorkQueueWithMMCSS(DWORD queue, const WCHAR *usage_class, DWORD taskid, + IMFAsyncCallback *callback, IUnknown *state); HRESULT WINAPI MFBeginRegisterWorkQueueWithMMCSSEx(DWORD queue, const WCHAR *usage_class, DWORD taskid, LONG priority, IMFAsyncCallback *callback, IUnknown *state); HRESULT WINAPI MFBeginUnregisterWorkQueueWithMMCSS(DWORD queue, IMFAsyncCallback *callback, IUnknown *state);