Signed-off-by: Nikolay Sivov nsivov@codeweavers.com --- dlls/mf/main.c | 8 +++++++- dlls/mf/tests/mf.c | 11 ++++++++++- include/mfidl.idl | 2 ++ 3 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/dlls/mf/main.c b/dlls/mf/main.c index 15c9e5e3c9a..3546caa6912 100644 --- a/dlls/mf/main.c +++ b/dlls/mf/main.c @@ -1291,12 +1291,18 @@ static const struct activate_funcs evr_activate_funcs =
HRESULT WINAPI MFCreateVideoRendererActivate(HWND hwnd, IMFActivate **activate) { + HRESULT hr; + TRACE("%p, %p.\n", hwnd, activate);
if (!activate) return E_POINTER;
- return create_activation_object(hwnd, &evr_activate_funcs, activate); + hr = create_activation_object(hwnd, &evr_activate_funcs, activate); + if (SUCCEEDED(hr)) + IMFActivate_SetUINT64(*activate, &MF_ACTIVATE_VIDEO_WINDOW, (ULONG_PTR)hwnd); + + return hr; }
struct simple_type_handler diff --git a/dlls/mf/tests/mf.c b/dlls/mf/tests/mf.c index c79ae69f91d..d252bab9b3b 100644 --- a/dlls/mf/tests/mf.c +++ b/dlls/mf/tests/mf.c @@ -3228,7 +3228,8 @@ static void test_evr(void) { IMFMediaSink *sink, *sink2; IMFActivate *activate; - DWORD flags; + DWORD flags, count; + UINT64 value; HRESULT hr;
hr = CoInitialize(NULL); @@ -3240,6 +3241,14 @@ static void test_evr(void) hr = MFCreateVideoRendererActivate(NULL, &activate); ok(hr == S_OK, "Failed to create activate object, hr %#x.\n", hr);
+ hr = IMFActivate_GetCount(activate, &count); + ok(hr == S_OK, "Failed to get attribute count, hr %#x.\n", hr); + ok(count == 1, "Unexpected count %u.\n", count); + + hr = IMFActivate_GetUINT64(activate, &MF_ACTIVATE_VIDEO_WINDOW, &value); + ok(hr == S_OK, "Failed to get attribute, hr %#x.\n", hr); + ok(!value, "Unexpected value.\n"); + hr = IMFActivate_ActivateObject(activate, &IID_IMFMediaSink, (void **)&sink); todo_wine ok(hr == S_OK, "Failed to activate, hr %#x.\n", hr); diff --git a/include/mfidl.idl b/include/mfidl.idl index 89b1bdd05b8..2955d0d2f3b 100644 --- a/include/mfidl.idl +++ b/include/mfidl.idl @@ -1151,4 +1151,6 @@ cpp_quote("EXTERN_GUID(MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID, 0xb10aaec3, 0xef cpp_quote("EXTERN_GUID(MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE, 0x6ba644ff, 0x27c5, 0x4d02, 0x98, 0x87, 0xc2, 0x86, 0x19, 0xfd, 0xb9, 0x1b);") cpp_quote("EXTERN_GUID(MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY, 0xa9770471, 0x92ec, 0x4df4, 0x94, 0xfe, 0x81, 0xc3, 0x6f, 0x0c, 0x3a, 0x7a);")
+cpp_quote("EXTERN_GUID(MF_ACTIVATE_VIDEO_WINDOW, 0x9a2dbbdd, 0xf57e, 0x4162, 0x82, 0xb9, 0x68, 0x31, 0x37, 0x76, 0x82, 0xd3);") + cpp_quote("EXTERN_GUID(CLSID_VideoProcessorMFT, 0x88753b26, 0x5b24, 0x49bd, 0xb2, 0xe7, 0xc, 0x44, 0x5c, 0x78, 0xc9, 0x82);")