Commit 0c8babdb authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mf: Set clipping window attribute for EVR activator.

parent 717c5ff0
......@@ -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
......
......@@ -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);
......
......@@ -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);")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment