Module: wine Branch: master Commit: d93f930b3e90013bbb5f92b9d28d57def0cbcff0 URL: https://gitlab.winehq.org/wine/wine/-/commit/d93f930b3e90013bbb5f92b9d28d57d...
Author: Alfred Agrell floating@muncher.se Date: Mon Sep 11 21:26:55 2023 +0200
quartz/tests: Add test for VMR9SurfaceAllocatorNotify_NotifyEvent.
---
dlls/quartz/tests/vmr9.c | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+)
diff --git a/dlls/quartz/tests/vmr9.c b/dlls/quartz/tests/vmr9.c index 9d88afb295d..a859673ceb6 100644 --- a/dlls/quartz/tests/vmr9.c +++ b/dlls/quartz/tests/vmr9.c @@ -4267,6 +4267,42 @@ static void test_unconnected_eos(void) ok(!ref, "Got outstanding refcount %ld.\n", ref); }
+static void test_notifyevent(void) +{ + IFilterGraph2 *graph = create_graph(); + IBaseFilter *filter = create_vmr9(VMR9Mode_Renderless); + IVMRSurfaceAllocatorNotify9 *notify; + IMediaEvent *eventsrc; + unsigned int ret; + HRESULT hr; + ULONG ref; + + hr = IFilterGraph2_AddFilter(graph, filter, NULL); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (void **)&eventsrc); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + ret = check_event_code(eventsrc, 0, 0x12345678, 0x9ABC, 0xDEF0); + ok(ret == 0, "Got %u custom events.\n", ret); + + hr = IBaseFilter_QueryInterface(filter, &IID_IVMRSurfaceAllocatorNotify9, (void **)¬ify); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + hr = IVMRSurfaceAllocatorNotify9_NotifyEvent(notify, 0x12345678, 0x9ABC, 0xDEF0); + ok(hr == S_OK, "Got hr %#lx.\n", hr); + + ret = check_event_code(eventsrc, 0, 0x12345678, 0x9ABC, 0xDEF0); + ok(ret == 1, "Got %u custom events.\n", ret); + + IMediaEvent_Release(eventsrc); + ref = IFilterGraph2_Release(graph); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IBaseFilter_Release(filter); + ok(!ref, "Got outstanding refcount %ld.\n", ref); + ref = IVMRSurfaceAllocatorNotify9_Release(notify); + ok(!ref, "Got outstanding refcount %ld.\n", ref); +} + START_TEST(vmr9) { IBaseFilter *filter; @@ -4303,6 +4339,7 @@ START_TEST(vmr9) test_windowless_size(); test_mixing_prefs(); test_unconnected_eos(); + test_notifyevent();
CoUninitialize(); }