31#include "wmcodecdsp.h"
44 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRFilterConfig9, (
void **)&
config);
48 IVMRFilterConfig9_Release(
config);
58 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRFilterConfig9, (
void **)&
config);
64 IVMRFilterConfig9_Release(
config);
71 && !
memcmp(
a->pbFormat,
b->pbFormat,
a->cbFormat);
104 return IUnknown_Release(
unknown);
115 &IID_IVMRFilterConfig9, (
void **)&
config);
133 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
136 &IID_IVMRFilterConfig9, (
void **)&
config);
150 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
153 &IID_IVMRFilterConfig9, (
void **)&
config);
167 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
170 &IID_IVMRFilterConfig9, (
void **)&
config);
176 hr = IVMRFilterConfig9_SetNumberOfStreams(
config, 3);
201 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
204#define check_interface_broken(a, b, c) check_interface_(__LINE__, a, b, c, TRUE)
205#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c, FALSE)
226 IUnknown_Release(
out);
265 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
300 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
317 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
331 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
349 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
404 ok(unk != &
test_outer,
"Returned IUnknown should not be outer IUnknown.\n");
406 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
408 ref = IUnknown_AddRef(unk);
409 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
412 ref = IUnknown_Release(unk);
413 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
418 ok(unk2 == unk,
"Got unexpected IUnknown %p.\n", unk2);
419 IUnknown_Release(unk2);
426 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
430 ok(filter2 == (
IBaseFilter *)0xdeadbeef,
"Got unexpected IBaseFilter %p.\n", filter2);
432 hr = IUnknown_QueryInterface(unk, &
test_iid, (
void **)&unk2);
434 ok(!unk2,
"Got unexpected IUnknown %p.\n", unk2);
438 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
440 IBaseFilter_Release(
filter);
441 ref = IUnknown_Release(unk);
442 ok(!
ref,
"Got unexpected refcount %ld.\n",
ref);
455 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
460 hr = IBaseFilter_EnumPins(
filter, &enum1);
463 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
465 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
470 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
473 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
475 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
477 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
478 IPin_Release(pins[0]);
480 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
482 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
485 hr = IEnumPins_Reset(enum1);
488 hr = IEnumPins_Next(enum1, 1, pins, &
count);
491 IPin_Release(pins[0]);
493 hr = IEnumPins_Next(enum1, 1, pins, &
count);
497 hr = IEnumPins_Reset(enum1);
500 hr = IEnumPins_Next(enum1, 2, pins,
NULL);
503 hr = IEnumPins_Next(enum1, 2, pins, &
count);
506 IPin_Release(pins[0]);
508 hr = IEnumPins_Reset(enum1);
511 hr = IEnumPins_Clone(enum1, &enum2);
514 hr = IEnumPins_Skip(enum1, 2);
517 hr = IEnumPins_Skip(enum1, 1);
520 hr = IEnumPins_Skip(enum1, 1);
523 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
526 hr = IEnumPins_Next(enum2, 1, pins,
NULL);
528 IPin_Release(pins[0]);
530 IEnumPins_Release(enum2);
534 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
537 hr = IEnumPins_Reset(enum1);
540 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
542 IPin_Release(pins[0]);
544 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
546 if (
hr ==
S_OK) IPin_Release(pins[0]);
548 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
551 hr = IEnumPins_Reset(enum1);
554 hr = IEnumPins_Next(enum1, 2, pins, &
count);
557 IPin_Release(pins[0]);
558 if (
count > 1) IPin_Release(pins[1]);
560 hr = IEnumPins_Reset(enum1);
563 hr = IEnumPins_Next(enum1, 3, pins, &
count);
566 IPin_Release(pins[0]);
567 if (
count > 1) IPin_Release(pins[1]);
569 IEnumPins_Release(enum1);
571 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
584 hr = IBaseFilter_FindPin(
filter,
L"input pin", &pin);
587 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
590 hr = IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
594 ok(pin == pin2,
"Pins did not match.\n");
598 hr = IBaseFilter_FindPin(
filter,
L"VMR Input1", &pin);
605 hr = IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
609 ok(pin == pin2,
"Pins did not match.\n");
613 hr = IBaseFilter_FindPin(
filter,
L"VMR Input1", &pin);
619 ok(pin == pin2,
"Pins did not match.\n");
624 hr = IBaseFilter_FindPin(
filter,
L"VMR Input2", &pin);
629 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
642 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
643 hr = IPin_QueryPinInfo(pin, &
info);
647 IBaseFilter_Release(
info.pFilter);
649 hr = IPin_QueryDirection(pin, &
dir);
653 hr = IPin_QueryId(pin, &
id);
658 hr = IPin_QueryInternalConnections(pin,
NULL, &
count);
665 hr = IBaseFilter_FindPin(
filter,
L"VMR Input1", &pin);
669 hr = IPin_QueryPinInfo(pin, &
info);
673 IBaseFilter_Release(
info.pFilter);
675 hr = IPin_QueryDirection(pin, &
dir);
679 hr = IPin_QueryId(pin, &
id);
684 hr = IPin_QueryInternalConnections(pin,
NULL, &
count);
691 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
709 static const GUID *subtype_tests[] =
711 &MEDIASUBTYPE_RGB565,
716 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
718 hr = IPin_EnumMediaTypes(pin, &enummt);
721 hr = IEnumMediaTypes_Next(enummt, 1, &mt,
NULL);
724 IEnumMediaTypes_Release(enummt);
726 req_mt.majortype = MEDIATYPE_Video;
727 req_mt.formattype = FORMAT_VideoInfo;
729 req_mt.pbFormat = (
BYTE *)&vih;
733 req_mt.subtype = *subtype_tests[
i];
734 hr = IPin_QueryAccept(pin, &req_mt);
738 req_mt.subtype = MEDIASUBTYPE_RGB8;
739 hr = IPin_QueryAccept(pin, &req_mt);
742 hr = IPin_QueryAccept(pin, &req_mt);
744 req_mt.subtype = MEDIASUBTYPE_RGB24;
747 hr = IPin_QueryAccept(pin, &req_mt);
749 req_mt.majortype = MEDIATYPE_Video;
751 req_mt.formattype = FORMAT_None;
752 hr = IPin_QueryAccept(pin, &req_mt);
756 hr = IPin_QueryAccept(pin, &req_mt);
761 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
773 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
775 hr = IPin_EnumMediaTypes(pin, &enum1);
778 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
781 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
785 hr = IEnumMediaTypes_Reset(enum1);
788 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
791 hr = IEnumMediaTypes_Clone(enum1, &enum2);
794 hr = IEnumMediaTypes_Skip(enum1, 1);
797 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
800 IEnumMediaTypes_Release(enum1);
801 IEnumMediaTypes_Release(enum2);
805 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
862 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
880 return &
filter->source.pin;
922 hr = IMemInputPin_GetAllocatorRequirements(
input, &
props);
925 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
930 hr = IMemAllocator_GetProperties(ret_allocator, &
props);
932 ok(!
props.cBuffers,
"Got %ld buffers.\n",
props.cBuffers);
934 ok(!
props.cbAlign,
"Got alignment %ld.\n",
props.cbAlign);
935 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
937 hr = IMemInputPin_NotifyAllocator(
input, ret_allocator,
TRUE);
944 hr = IMemAllocator_SetProperties(ret_allocator, &req_props, &
props);
946 ok(
props.cBuffers == 1,
"Got %ld buffers.\n",
props.cBuffers);
947 ok(
props.cbBuffer == 32 * 16 * 4,
"Got size %ld.\n",
props.cbBuffer);
948 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
949 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
951 IMemAllocator_Release(ret_allocator);
958 &IID_IMemAllocator, (
void **)&req_allocator);
960 hr = IMemInputPin_NotifyAllocator(
input, req_allocator,
TRUE);
963 IMemAllocator_Release(req_allocator);
980 IMediaSample_Release(
params->sample);
1011 start_time *= 10000000;
1012 end_time = start_time + 10000000;
1013 hr = IMediaSample_SetTime(
sample, &start_time, &end_time);
1040#define join_thread(a) join_thread_(__LINE__, a)
1058 OAFilterState
state;
1194 OAFilterState
state;
1208 hr = IPin_BeginFlush(pin);
1218 hr = IPin_EndFlush(pin);
1239 hr = IPin_BeginFlush(pin);
1246 hr = IPin_EndFlush(pin);
1260 unsigned int ret = 0;
1264 while ((
hr = IMediaEvent_GetEvent(eventsrc, &
code, ¶m1, ¶m2,
timeout)) ==
S_OK)
1266 if (
code == expected_code)
1268 ok(param1 == expected1,
"Got param1 %#Ix.\n", param1);
1269 ok(param2 == expected2,
"Got param2 %#Ix.\n", param2);
1272 IMediaEvent_FreeEventParams(eventsrc,
code, param1, param2);
1287 IMediaEvent *eventsrc;
1288 OAFilterState
state;
1292 IMediaControl_QueryInterface(
control, &IID_IMediaEvent, (
void **)&eventsrc);
1298 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1300 hr = IPin_EndOfStream(pin);
1306 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1314 ok(
ret == 1,
"Expected EC_COMPLETE.\n");
1319 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1332 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1334 hr = IPin_EndOfStream(pin);
1344 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1354 hr = IPin_BeginFlush(pin);
1356 hr = IPin_EndOfStream(pin);
1358 hr = IPin_EndFlush(pin);
1376 hr = IPin_EndOfStream(pin);
1381 hr = IPin_BeginFlush(pin);
1383 hr = IPin_EndFlush(pin);
1388 hr = IPin_EndOfStream(pin);
1391 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1396 ok(!
ret,
"Got unexpected EC_COMPLETE.\n");
1398 IMediaEvent_Release(eventsrc);
1403 OAFilterState
state;
1450 hr = IPin_BeginFlush(pin);
1455 hr = IPin_EndFlush(pin);
1475 OAFilterState
state;
1484 IBaseFilter_QueryInterface(
filter, &IID_IBasicVideo, (
void **)&video);
1486 hr = IBasicVideo_GetCurrentImage(video,
NULL,
NULL);
1493 hr = IBasicVideo_GetCurrentImage(video, &
size,
NULL);
1498 hr = IBasicVideo_GetCurrentImage(video, &
size,
buffer);
1509 hr = IBasicVideo_GetCurrentImage(video, &
size,
buffer);
1521 hr = IBasicVideo_GetCurrentImage(video, &
size,
buffer);
1527 hr = IBasicVideo_GetCurrentImage(video, &
size,
buffer);
1531 for (
i = 0;
i < 32 * 16; ++
i)
1532 ok((
data[
i] & 0xffffff) == 0x7f007f,
"Got unexpected color %08lx at %u.\n",
data[
i],
i);
1540 hr = IBasicVideo_GetCurrentImage(video, &
size,
buffer);
1544 for (
i = 0;
i < 32 * 16; ++
i)
1545 ok((
data[
i] & 0xffffff) == 0x7f007f,
"Got unexpected color %08lx at %u.\n",
data[
i],
i);
1550 IBasicVideo_Release(video);
1560 IMediaEvent *eventsrc;
1561 OAFilterState
state;
1568 IMediaControl_QueryInterface(
control, &IID_IMediaEvent, (
void **)&eventsrc);
1569 IPin_QueryInterface(pin, &IID_IOverlay, (
void **)&overlay);
1571 hr = IOverlay_GetWindowHandle(overlay, &
hwnd);
1573 IOverlay_Release(overlay);
1579 ok(!
ret,
"Got unexpected EC_USERABORT.\n");
1586 ok(
ret == 1,
"Expected EC_USERABORT.\n");
1604 ok(!
ret,
"Got unexpected EC_USERABORT.\n");
1609 ok(!
ret,
"Got unexpected EC_USERABORT.\n");
1621 ok(!
ret,
"Got unexpected EC_USERABORT.\n");
1626 ok(
ret == 1,
"Expected EC_USERABORT.\n");
1634 ok(!
ret,
"Got unexpected EC_USERABORT.\n");
1636 IMediaEvent_Release(eventsrc);
1644 .bmiHeader.biBitCount = 32,
1645 .bmiHeader.biWidth = 32,
1646 .bmiHeader.biHeight = 16,
1647 .bmiHeader.biPlanes = 1,
1648 .bmiHeader.biCompression =
BI_RGB,
1652 .majortype = MEDIATYPE_Video,
1653 .formattype = FORMAT_VideoInfo,
1654 .cbFormat =
sizeof(vih),
1655 .pbFormat = (
BYTE *)&vih,
1670 static const GUID *subtype_tests[] =
1672 &MEDIASUBTYPE_RGB555,
1673 &MEDIASUBTYPE_RGB565,
1674 &MEDIASUBTYPE_RGB24,
1675 &MEDIASUBTYPE_RGB32,
1677 static const WORD bpp_tests[] = {15, 16, 24, 32};
1681 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
NULL);
1683 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
1685 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
1686 IPin_QueryInterface(pin, &IID_IMemInputPin, (
void **)&
input);
1690 req_mt.subtype = *subtype_tests[
i];
1696 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
1699 skip(
"Got E_FAIL when connecting.\n");
1702 ok(
hr ==
S_OK,
"Got hr %#lx for subtype %s and bpp %u.\n",
hr,
1705 hr = IFilterGraph2_Disconnect(
graph, &
source.source.pin.IPin_iface);
1707 hr = IFilterGraph2_Disconnect(
graph, pin);
1712 req_mt.formattype = FORMAT_None;
1713 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
1715 req_mt.formattype = FORMAT_VideoInfo;
1717 req_mt.subtype = MEDIASUBTYPE_RGB8;
1718 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
1720 req_mt.subtype = MEDIASUBTYPE_WAVE;
1721 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
1723 req_mt.subtype = MEDIASUBTYPE_RGB32;
1725 peer = (
IPin *)0xdeadbeef;
1726 hr = IPin_ConnectedTo(pin, &peer);
1728 ok(!peer,
"Got peer %p.\n", peer);
1730 hr = IPin_ConnectionMediaType(pin, &
mt);
1735 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
1740 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
1743 hr = IPin_ConnectedTo(pin, &peer);
1745 ok(peer == &
source.source.pin.IPin_iface,
"Got peer %p.\n", peer);
1748 hr = IPin_ConnectionMediaType(pin, &
mt);
1759 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
1761 ok(!
memcmp(&ret_props, &req_props,
sizeof(req_props)),
"Properties did not match.\n");
1766 hr = IMemInputPin_ReceiveCanBlock(
input);
1776 hr = IFilterGraph2_Disconnect(
graph, pin);
1778 hr = IFilterGraph2_Disconnect(
graph, pin);
1780 ok(
source.source.pin.peer == pin,
"Got peer %p.\n",
source.source.pin.peer);
1781 IFilterGraph2_Disconnect(
graph, &
source.source.pin.IPin_iface);
1783 peer = (
IPin *)0xdeadbeef;
1784 hr = IPin_ConnectedTo(pin, &peer);
1786 ok(!peer,
"Got peer %p.\n", peer);
1788 hr = IPin_ConnectionMediaType(pin, &
mt);
1792 IMediaControl_Release(
control);
1793 ref = IFilterGraph2_Release(
graph);
1794 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1795 IMemInputPin_Release(
input);
1798 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1799 ref = IBaseFilter_Release(&
source.filter.IBaseFilter_iface);
1800 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1812 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
1814 hr = IPin_QueryInterface(pin, &IID_IOverlay, (
void **)&overlay);
1818 hr = IOverlay_GetWindowHandle(overlay, &
hwnd);
1822 IOverlay_Release(overlay);
1825 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1828 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
1830 hr = IPin_QueryInterface(pin, &IID_IOverlay, (
void **)&overlay);
1834 hr = IOverlay_GetWindowHandle(overlay, &
hwnd);
1838 IOverlay_Release(overlay);
1841 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1844 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
1846 hr = IPin_QueryInterface(pin, &IID_IOverlay, (
void **)&overlay);
1850 hr = IOverlay_GetWindowHandle(overlay, &
hwnd);
1854 IOverlay_Release(overlay);
1857 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1883 if (
wparam == 0xdeadbeef)
1895 hr = IVideoWindow_get_Caption(
window, &caption);
1904 hr = IVideoWindow_put_Caption(
window, caption);
1908 hr = IVideoWindow_get_Caption(
window, &caption);
1925 "Got style %#lx.\n",
style);
1929 "Got style %#lx.\n",
style);
2167 hr = IVideoWindow_put_Left(
window, 0);
2169 hr = IVideoWindow_put_Top(
window, 0);
2177 ok(
top == 0,
"Got top %ld.\n",
top);
2187 ok(
top == 0,
"Got top %ld.\n",
top);
2196 hr = IVideoWindow_put_Left(
window, 10);
2204 ok(
top == 0,
"Got top %ld.\n",
top);
2214 ok(
top == 0,
"Got top %ld.\n",
top);
2223 hr = IVideoWindow_put_Height(
window, 200);
2231 ok(
top == 0,
"Got top %ld.\n",
top);
2241 ok(
top == 0,
"Got top %ld.\n",
top);
2250 hr = IVideoWindow_SetWindowPosition(
window, 100, 200, 300, 400);
2258 ok(
top == 200,
"Got top %ld.\n",
top);
2268 ok(
top == 200,
"Got top %ld.\n",
top);
2279 ok(top_hwnd == our_hwnd,
"Got top window %p.\n", top_hwnd);
2291 hr = IVideoWindow_get_Owner(
window, &oahwnd);
2293 ok(!oahwnd,
"Got owner %#Ix.\n", oahwnd);
2300 hr = IVideoWindow_put_Owner(
window, (OAHWND)our_hwnd);
2303 hr = IVideoWindow_get_Owner(
window, &oahwnd);
2305 ok(oahwnd == (OAHWND)our_hwnd,
"Got owner %#Ix.\n", oahwnd);
2314 ok(top_hwnd == our_hwnd,
"Got top window %p.\n", top_hwnd);
2325 hr = IVideoWindow_put_Owner(
window, 0);
2328 hr = IVideoWindow_get_Owner(
window, &oahwnd);
2330 ok(!oahwnd,
"Got owner %#Ix.\n", oahwnd);
2339 ok(top_hwnd ==
hwnd,
"Got top window %p.\n", top_hwnd);
2371 static UINT drain_tests[] =
2399 hr = IVideoWindow_get_MessageDrain(
window, &oahwnd);
2401 ok(!oahwnd,
"Got window %#Ix.\n", oahwnd);
2403 hr = IVideoWindow_put_MessageDrain(
window, (OAHWND)our_hwnd);
2406 hr = IVideoWindow_get_MessageDrain(
window, &oahwnd);
2408 ok(oahwnd == (OAHWND)our_hwnd,
"Got window %#Ix.\n", oahwnd);
2414 ok(
ret,
"Expected a message.\n");
2415 ok(
msg.hwnd == our_hwnd,
"Got hwnd %p.\n",
msg.hwnd);
2416 ok(
msg.message == drain_tests[
i],
"Got message %#x.\n",
msg.message);
2417 ok(
msg.wParam == 0xdeadbeef,
"Got wparam %#Ix.\n",
msg.wParam);
2418 ok(!
msg.lParam,
"Got lparam %#Ix.\n",
msg.lParam);
2422 ok(!
ret,
"Got unexpected message %#x.\n",
msg.message);
2425 hr = IVideoWindow_put_MessageDrain(
window, 0);
2428 hr = IVideoWindow_put_Owner(
window, (OAHWND)our_hwnd);
2469 ok(!
ret,
"Wait timed out.\n");
2483 hr = IVideoWindow_put_Owner(
window, 0);
2493 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
2495 hr = IVideoWindow_get_AutoShow(
window, &
l);
2505 hr = IVideoWindow_get_Visible(
window, &
l);
2512 hr = IVideoWindow_get_Visible(
window, &
l);
2525 hr = IVideoWindow_get_Visible(
window, &
l);
2532 IMediaControl_Release(
control);
2541 .bmiHeader.biBitCount = 32,
2542 .bmiHeader.biWidth = 600,
2543 .bmiHeader.biHeight = 400,
2544 .bmiHeader.biPlanes = 1,
2545 .bmiHeader.biCompression =
BI_RGB,
2549 .majortype = MEDIATYPE_Video,
2550 .subtype = MEDIASUBTYPE_RGB32,
2551 .formattype = FORMAT_VideoInfo,
2552 .cbFormat =
sizeof(vih),
2553 .pbFormat = (
BYTE *)&vih,
2587 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
2588 IPin_QueryInterface(pin, &IID_IMemInputPin, (
void **)&
input);
2590 hr = IPin_QueryInterface(pin, &IID_IOverlay, (
void **)&overlay);
2593 hr = IOverlay_GetWindowHandle(overlay, &
hwnd);
2601 hr = IBaseFilter_QueryInterface(
filter, &IID_IVideoWindow, (
void **)&
window);
2604 hr = IVideoWindow_get_Caption(
window, &caption);
2608 hr = IVideoWindow_put_Caption(
window, caption);
2612 hr = IVideoWindow_get_WindowStyle(
window, &
l);
2618 hr = IVideoWindow_get_AutoShow(
window, &
l);
2624 hr = IVideoWindow_put_Owner(
window, (OAHWND)our_hwnd);
2627 hr = IVideoWindow_put_MessageDrain(
window, (OAHWND)our_hwnd);
2633 hr = IVideoWindow_SetWindowPosition(
window, 100, 200, 300, 400);
2637 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
NULL);
2639 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
2640 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
2643 skip(
"Got E_FAIL when connecting.\n");
2652 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
2654 ok(!
memcmp(&ret_props, &req_props,
sizeof(req_props)),
"Properties did not match.\n");
2673 hr = IVideoWindow_get_FullScreenMode(
window, &
l);
2684 monitorinfo.
cbSize =
sizeof(monitorinfo);
2702 IMediaControl_Release(
control);
2703 IFilterGraph2_Release(
graph);
2704 IVideoWindow_Release(
window);
2705 IOverlay_Release(overlay);
2706 IMemInputPin_Release(
input);
2709 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
2710 ref = IBaseFilter_Release(&
source.filter.IBaseFilter_iface);
2711 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
2722 .BackBufferWidth = 640,
2723 .BackBufferHeight = 480,
2731 ok(!!d3d,
"Failed to create a D3D object.\n");
2738 skip(
"Failed to create a 3D device, hr %#lx.\n",
hr);
2754 .szAspectRatio = {32, 16},
2755 .szNativeSize = {32, 16},
2774 IBaseFilter_Release(
filter);
2779 IBaseFilter_QueryInterface(
filter, &IID_IVMRSurfaceAllocatorNotify9, (
void **)&
notify);
2788 win_skip(
"Direct3D does not support video rendering.\n");
2808 ok(!!
surfaces[0],
"Surface 0 was not allocated.\n");
2809 ok(!!
surfaces[1],
"Surface 1 was not allocated.\n");
2813 ok(device2 ==
device,
"Devices did not match.\n");
2821 ok(
desc.Format ==
info.Format,
"Got format %#x.\n",
desc.Format);
2823 ok(!
desc.Usage,
"Got usage %#lx.\n",
desc.Usage);
2826 ok(!
desc.MultiSampleQuality,
"Got multisample quality %lu.\n",
desc.MultiSampleQuality);
2827 ok(
desc.Width == 32,
"Got width %u.\n",
desc.Width);
2828 ok(
desc.Height == 16,
"Got height %u.\n",
desc.Height);
2838 ok(!
surfaces[0],
"Surface 0 was allocated.\n");
2839 ok(!
surfaces[1],
"Surface 1 was allocated.\n");
2842 info.MinBuffers = 1;
2846 ok(!!
surfaces[0],
"Surface 0 was not allocated.\n");
2847 ok(!!
surfaces[1],
"Surface 1 was not allocated.\n");
2857 ok(!!
surfaces[0],
"Surface 0 was not allocated.\n");
2858 ok(!!
surfaces[1],
"Surface 1 was not allocated.\n");
2862 ok(device2 ==
device,
"Devices did not match.\n");
2871 ok(
desc.Format ==
info.Format,
"Got format %#x.\n",
desc.Format);
2876 ok(!
desc.MultiSampleQuality,
"Got multisample quality %lu.\n",
desc.MultiSampleQuality);
2877 ok(
desc.Width == 32,
"Got width %u.\n",
desc.Width);
2878 ok(
desc.Height == 16,
"Got height %u.\n",
desc.Height);
2888 ok(!
surfaces[0],
"Surface 0 was allocated.\n");
2889 ok(!
surfaces[1],
"Surface 1 was allocated.\n");
2897 ok(!!
surfaces[0],
"Surface 0 was not allocated.\n");
2898 ok(
info.Format != 0,
"Expected a format.\n");
2902 ok(
desc.Format ==
info.Format,
"Expected format %#x, got %#x.\n",
info.Format,
desc.Format);
2907 ok(!
desc.MultiSampleQuality,
"Got multisample quality %lu.\n",
desc.MultiSampleQuality);
2908 ok(
desc.Width == 32,
"Got width %u.\n",
desc.Width);
2909 ok(
desc.Height == 16,
"Got height %u.\n",
desc.Height);
2921 IVMRSurfaceAllocatorNotify9_Release(
notify);
2923 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
2925 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
2994 todo_wine ok(
info->szAspectRatio.cx == 120,
"Got aspect ratio width %ld.\n",
info->szAspectRatio.cx);
2995 todo_wine ok(
info->szAspectRatio.cy == 60,
"Got aspect ratio height %ld.\n",
info->szAspectRatio.cy);
2998 ok(!
info->dwReserved1,
"Got dwReserved1 %#lx.\n",
info->dwReserved1);
2999 ok(!
info->dwReserved2,
"Got dwReserved2 %#lx.\n",
info->dwReserved2);
3032 ok(!
IsEqualGUID(iid, &IID_IVMRSurfaceAllocatorEx9),
"Unexpected query for IVMRSurfaceAllocatorEx9.\n");
3057 ok(
info->dwWidth == 32,
"Got width %lu.\n",
info->dwWidth);
3058 ok(
info->dwHeight == 16,
"Got height %lu.\n",
info->dwHeight);
3061 todo_wine ok(
info->szAspectRatio.cx == 120,
"Got aspect ratio width %ld.\n",
info->szAspectRatio.cx);
3062 todo_wine ok(
info->szAspectRatio.cy == 60,
"Got aspect ratio height %ld.\n",
info->szAspectRatio.cy);
3063 ok(
info->szNativeSize.cx == 32,
"Got native width %ld.\n",
info->szNativeSize.cx);
3064 ok(
info->szNativeSize.cy == 16,
"Got native height %ld.\n",
info->szNativeSize.cy);
3071 return IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(
presenter->
notify,
3103 ok(0,
"Unexpected call.\n");
3122 OAFilterState
state;
3126 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
3150 IMediaControl_Release(
control);
3158 .rcTarget = {40, 60, 160, 120},
3160 .bmiHeader.biWidth = 32,
3161 .bmiHeader.biHeight = 16,
3165 .majortype = MEDIATYPE_Video,
3166 .formattype = FORMAT_VideoInfo,
3167 .cbFormat =
sizeof(vih),
3168 .pbFormat = (
BYTE *)&vih,
3229 IBaseFilter_QueryInterface(
filter, &IID_IVMRSurfaceAllocatorNotify9, (
void **)&
notify);
3235 win_skip(
"Direct3D does not support video rendering.\n");
3240 hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(
notify, 0xabacab,
3248 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
NULL);
3250 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
3251 IPin_QueryInterface(pin, &IID_IMemInputPin, (
void **)&
input);
3255 req_mt.subtype = *
tests[
i].subtype;
3258 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
3264 skip(
"Format %u (%#x), flags %#lx are not supported, hr %#lx.\n",
3278 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
3281 skip(
"Format %u (%#x), flags %#lx are not supported, hr %#lx.\n",
3284 hr = IFilterGraph2_Disconnect(
graph, &
source.source.pin.IPin_iface);
3286 hr = IFilterGraph2_Disconnect(
graph, pin);
3290 ok(!
memcmp(&ret_props, &req_props,
sizeof(req_props)),
"Properties did not match.\n");
3294 hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(
notify, 0xabacab,
3307 hr = IFilterGraph2_Disconnect(
graph, &
source.source.pin.IPin_iface);
3309 hr = IFilterGraph2_Disconnect(
graph, pin);
3316 ref = IFilterGraph2_Release(
graph);
3317 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3318 IMemInputPin_Release(
input);
3322 IVMRSurfaceAllocatorNotify9_Release(
notify);
3324 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3326 ok(presenter2.
refcount == 1,
"Got outstanding refcount %ld.\n", presenter2.
refcount);
3328 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3337 DWORD stream_count = 0;
3355 IBaseFilter_QueryInterface(
filter, &IID_IVMRFilterConfig9, (
void **)&
config);
3357 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRMixerControl9, (
void **)&mixer_control);
3360 hr = IVMRFilterConfig9_GetNumberOfStreams(
config, &stream_count);
3363 hr = IVMRFilterConfig9_SetNumberOfStreams(
config, 1);
3366 hr = IVMRFilterConfig9_GetNumberOfStreams(
config, &stream_count);
3368 ok(stream_count == 1,
"Got %lu streams.\n", stream_count);
3370 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRMixerControl9, (
void **)&mixer_control);
3372 IVMRMixerControl9_Release(mixer_control);
3374 hr = IVMRFilterConfig9_SetNumberOfStreams(
config, 2);
3377 hr = IVMRFilterConfig9_GetNumberOfStreams(
config, &stream_count);
3379 ok(stream_count == 1,
"Got %lu streams.\n", stream_count);
3381 IVMRFilterConfig9_Release(
config);
3383 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3387 IBaseFilter_QueryInterface(
filter, &IID_IVMRFilterConfig9, (
void **)&
config);
3388 IBaseFilter_QueryInterface(
filter, &IID_IVMRWindowlessControl9, (
void **)&windowless_control);
3390 window =
CreateWindowA(
"static",
"quartz_test",
WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
3391 ok(!!
window,
"Failed to create a window.\n");
3392 hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control,
window);
3395 hr = IVMRFilterConfig9_GetNumberOfStreams(
config, &stream_count);
3397 ok(stream_count == 4,
"Got %lu streams.\n", stream_count);
3399 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRMixerControl9, (
void **)&mixer_control);
3401 IVMRMixerControl9_Release(mixer_control);
3403 hr = IVMRFilterConfig9_SetNumberOfStreams(
config, 2);
3406 hr = IVMRFilterConfig9_GetNumberOfStreams(
config, &stream_count);
3408 ok(stream_count == 4,
"Got %lu streams.\n", stream_count);
3410 IVMRWindowlessControl9_Release(windowless_control);
3411 IVMRFilterConfig9_Release(
config);
3413 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3422 .bmiHeader.biWidth = 32,
3423 .bmiHeader.biHeight = 16,
3424 .bmiHeader.biBitCount = 32,
3428 .majortype = MEDIATYPE_Video,
3429 .subtype = MEDIASUBTYPE_RGB32,
3430 .formattype = FORMAT_VideoInfo,
3431 .cbFormat =
sizeof(vih),
3432 .pbFormat = (
BYTE *)&vih,
3443 IBaseFilter_QueryInterface(
filter, &IID_IVMRWindowlessControl9, (
void **)&windowless_control);
3444 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
3446 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
L"source");
3448 window =
CreateWindowA(
"static",
"quartz_test",
WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
3449 ok(!!
window,
"Failed to create a window.\n");
3451 hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control,
NULL);
3453 hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control, (
HWND)0xdeadbeef);
3456 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &
mt);
3459 hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control,
window);
3462 hr = IFilterGraph2_Disconnect(
graph, &
source.source.pin.IPin_iface);
3464 hr = IFilterGraph2_Disconnect(
graph, pin);
3467 hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control,
window);
3470 ref = IFilterGraph2_Release(
graph);
3471 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3473 IVMRWindowlessControl9_Release(windowless_control);
3475 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3494 IBaseFilter_QueryInterface(
filter, &IID_IVMRSurfaceAllocatorNotify9, (
void **)&
notify);
3496 hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(
notify, 0xabacab,
3501 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3506 ref = IVMRSurfaceAllocatorNotify9_Release(
notify);
3507 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3520 ok_(__FILE__,
line)(
top == expect_top,
"Got top %ld.\n",
top);
3525 hr = IBasicVideo_get_SourceLeft(video, &
l);
3530 hr = IBasicVideo_get_SourceTop(video, &
l);
3535 hr = IBasicVideo_get_SourceWidth(video, &
l);
3536 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get width, hr %#lx.\n",
hr);
3540 hr = IBasicVideo_get_SourceHeight(video, &
l);
3541 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get height, hr %#lx.\n",
hr);
3544#define check_source_position(a,b,c,d,e) check_source_position_(__LINE__,a,b,c,d,e)
3551 hr = IBasicVideo_IsUsingDefaultSource(video);
3554 hr = IBasicVideo_put_SourceLeft(video, -10);
3556 hr = IBasicVideo_put_SourceLeft(video, 10);
3559 hr = IBasicVideo_put_SourceTop(video, -10);
3561 hr = IBasicVideo_put_SourceTop(video, 10);
3564 hr = IBasicVideo_put_SourceWidth(video, -500);
3566 hr = IBasicVideo_put_SourceWidth(video, 0);
3568 hr = IBasicVideo_put_SourceWidth(video, 700);
3570 hr = IBasicVideo_put_SourceWidth(video, 500);
3573 hr = IBasicVideo_IsUsingDefaultSource(video);
3576 hr = IBasicVideo_put_SourceHeight(video, -300);
3578 hr = IBasicVideo_put_SourceHeight(video, 0);
3580 hr = IBasicVideo_put_SourceHeight(video, 600);
3582 hr = IBasicVideo_put_SourceHeight(video, 300);
3585 hr = IBasicVideo_IsUsingDefaultSource(video);
3588 hr = IBasicVideo_put_SourceLeft(video, -10);
3590 hr = IBasicVideo_put_SourceLeft(video, 10);
3593 hr = IBasicVideo_IsUsingDefaultSource(video);
3596 hr = IBasicVideo_put_SourceTop(video, -10);
3598 hr = IBasicVideo_put_SourceTop(video, 20);
3601 hr = IBasicVideo_IsUsingDefaultSource(video);
3604 hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40);
3607 hr = IBasicVideo_IsUsingDefaultSource(video);
3610 hr = IBasicVideo_SetSourcePosition(video, 0, 0, 600, 400);
3613 hr = IBasicVideo_IsUsingDefaultSource(video);
3616 hr = IBasicVideo_SetSourcePosition(video, 4, 5, 60, 40);
3618 hr = IBasicVideo_SetDefaultSourcePosition(video);
3621 hr = IBasicVideo_IsUsingDefaultSource(video);
3633 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get position, hr %#lx.\n",
hr);
3635 ok_(__FILE__,
line)(
top == expect_top,
"Got top %ld.\n",
top);
3640 hr = IBasicVideo_get_DestinationLeft(video, &
l);
3645 hr = IBasicVideo_get_DestinationTop(video, &
l);
3650 hr = IBasicVideo_get_DestinationWidth(video, &
l);
3651 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get width, hr %#lx.\n",
hr);
3655 hr = IBasicVideo_get_DestinationHeight(video, &
l);
3656 ok_(__FILE__,
line)(
hr ==
S_OK,
"Failed to get height, hr %#lx.\n",
hr);
3659#define check_destination_position(a,b,c,d,e) check_destination_position_(__LINE__,a,b,c,d,e)
3667 IBasicVideo_QueryInterface(video, &IID_IVideoWindow, (
void **)&
window);
3670 hr = IBasicVideo_IsUsingDefaultDestination(video);
3673 hr = IBasicVideo_put_DestinationLeft(video, -10);
3676 hr = IBasicVideo_IsUsingDefaultDestination(video);
3679 hr = IBasicVideo_put_DestinationLeft(video, 10);
3682 hr = IBasicVideo_IsUsingDefaultDestination(video);
3685 hr = IBasicVideo_put_DestinationTop(video, -20);
3688 hr = IBasicVideo_IsUsingDefaultDestination(video);
3691 hr = IBasicVideo_put_DestinationTop(video, 20);
3694 hr = IBasicVideo_IsUsingDefaultDestination(video);
3697 hr = IBasicVideo_put_DestinationWidth(video, -700);
3699 hr = IBasicVideo_put_DestinationWidth(video, 0);
3701 hr = IBasicVideo_put_DestinationWidth(video, 700);
3704 hr = IBasicVideo_IsUsingDefaultDestination(video);
3707 hr = IBasicVideo_put_DestinationWidth(video, 500);
3710 hr = IBasicVideo_IsUsingDefaultDestination(video);
3713 hr = IBasicVideo_put_DestinationHeight(video, -500);
3715 hr = IBasicVideo_put_DestinationHeight(video, 0);
3717 hr = IBasicVideo_put_DestinationHeight(video, 500);
3720 hr = IBasicVideo_IsUsingDefaultDestination(video);
3723 hr = IBasicVideo_put_DestinationHeight(video, 300);
3726 hr = IBasicVideo_IsUsingDefaultDestination(video);
3729 hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40);
3732 hr = IBasicVideo_IsUsingDefaultDestination(video);
3735 hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 600, 400);
3738 hr = IBasicVideo_IsUsingDefaultDestination(video);
3741 hr = IBasicVideo_SetDestinationPosition(video, 4, 5, 60, 40);
3743 hr = IBasicVideo_SetDefaultDestinationPosition(video);
3746 hr = IBasicVideo_IsUsingDefaultDestination(video);
3755 hr = IBasicVideo_IsUsingDefaultDestination(video);
3758 hr = IBasicVideo_SetDestinationPosition(video, 0, 0, 400, 300);
3761 hr = IBasicVideo_IsUsingDefaultDestination(video);
3770 hr = IBasicVideo_IsUsingDefaultDestination(video);
3773 IVideoWindow_Release(
window);
3782 .rcSource = {4, 6, 16, 12},
3783 .rcTarget = {40, 60, 120, 160},
3785 .bmiHeader.biBitCount = 32,
3786 .bmiHeader.biWidth = 600,
3787 .bmiHeader.biHeight = 400,
3788 .bmiHeader.biPlanes = 1,
3789 .bmiHeader.biCompression =
BI_RGB,
3793 .majortype = MEDIATYPE_Video,
3794 .subtype = MEDIASUBTYPE_RGB32,
3795 .formattype = FORMAT_VideoInfo,
3796 .cbFormat =
sizeof(vih),
3797 .pbFormat = (
BYTE *)&vih,
3815 IBaseFilter_QueryInterface(
filter, &IID_IBasicVideo, (
void **)&video);
3816 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
3817 IPin_QueryInterface(pin, &IID_IMemInputPin, (
void **)&
input);
3819 hr = IBasicVideo_GetTypeInfoCount(video, &
count);
3823 hr = IBasicVideo_GetTypeInfo(video, 0, 0, &
typeinfo);
3825 hr = ITypeInfo_GetTypeAttr(
typeinfo, &typeattr);
3827 ok(typeattr->typekind ==
TKIND_DISPATCH,
"Got kind %u.\n", typeattr->typekind);
3829 ITypeInfo_ReleaseTypeAttr(
typeinfo, typeattr);
3832 hr = IBasicVideo_get_AvgTimePerFrame(video,
NULL);
3834 hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime);
3837 hr = IBasicVideo_get_BitRate(video,
NULL);
3839 hr = IBasicVideo_get_BitRate(video, &
l);
3842 hr = IBasicVideo_get_BitErrorRate(video,
NULL);
3844 hr = IBasicVideo_get_BitErrorRate(video, &
l);
3847 hr = IBasicVideo_get_VideoWidth(video,
NULL);
3849 hr = IBasicVideo_get_VideoHeight(video,
NULL);
3852 hr = IBasicVideo_get_SourceLeft(video,
NULL);
3854 hr = IBasicVideo_get_SourceWidth(video,
NULL);
3856 hr = IBasicVideo_get_SourceTop(video,
NULL);
3858 hr = IBasicVideo_get_SourceHeight(video,
NULL);
3861 hr = IBasicVideo_get_DestinationLeft(video,
NULL);
3863 hr = IBasicVideo_get_DestinationWidth(video,
NULL);
3865 hr = IBasicVideo_get_DestinationTop(video,
NULL);
3867 hr = IBasicVideo_get_DestinationHeight(video,
NULL);
3888 hr = IBasicVideo_GetVideoSize(video, &
width,
NULL);
3895 hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1,
NULL, &
l);
3897 hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &
l,
NULL);
3901 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
L"vmr9");
3903 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
3906 skip(
"Got E_FAIL when connecting.\n");
3915 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
3917 ok(!
memcmp(&ret_props, &req_props,
sizeof(req_props)),
"Properties did not match.\n");
3924 hr = IBasicVideo_get_AvgTimePerFrame(video, &reftime);
3926 ok(
compare_double(reftime, 0.02, 1 << 28),
"Got frame rate %.16e.\n", reftime);
3929 hr = IBasicVideo_get_BitRate(video, &
l);
3931 ok(!
l,
"Got bit rate %ld.\n",
l);
3934 hr = IBasicVideo_get_BitErrorRate(video, &
l);
3936 ok(!
l,
"Got bit rate %ld.\n",
l);
3938 hr = IBasicVideo_GetVideoPaletteEntries(video, 0, 1, &
l,
NULL);
3950 hr = IFilterGraph2_Disconnect(
graph, &
source.source.pin.IPin_iface);
3952 hr = IFilterGraph2_Disconnect(
graph, pin);
3957 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
3964 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
3966 ok(!
memcmp(&ret_props, &req_props,
sizeof(req_props)),
"Properties did not match.\n");
3980 ref = IFilterGraph2_Release(
graph);
3981 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3982 IBasicVideo_Release(video);
3983 IMemInputPin_Release(
input);
3986 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3987 ref = IBaseFilter_Release(&
source.filter.IBaseFilter_iface);
3988 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
3997 .bmiHeader.biWidth = 32,
3998 .bmiHeader.biHeight = 16,
3999 .bmiHeader.biBitCount = 32,
4000 .bmiHeader.biPlanes = 1,
4004 .majortype = MEDIATYPE_Video,
4005 .subtype = MEDIASUBTYPE_RGB32,
4006 .formattype = FORMAT_VideoInfo,
4007 .cbFormat =
sizeof(vih),
4008 .pbFormat = (
BYTE *)&vih,
4025 IBaseFilter_QueryInterface(
filter, &IID_IVMRWindowlessControl9, (
void **)&windowless_control);
4026 IBaseFilter_QueryInterface(
filter, &IID_IVMRAspectRatioControl9, (
void **)&aspect_ratio_control);
4027 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
4028 IPin_QueryInterface(pin, &IID_IMemInputPin, (
void **)&
input);
4030 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
L"source");
4032 window =
CreateWindowA(
"static",
"quartz_test",
WS_OVERLAPPEDWINDOW, 0, 0, 640, 480, 0, 0, 0, 0);
4033 ok(!!
window,
"Failed to create a window.\n");
4035 hr = IVMRWindowlessControl9_SetVideoClippingWindow(windowless_control,
window);
4038 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &
mt);
4044 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
4048 skip(
"Got E_FAIL when setting allocator properties.\n");
4052 ok(!
memcmp(&ret_props, &req_props,
sizeof(req_props)),
"Properties did not match.\n");
4055 hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control,
NULL, &
height, &aspect_width, &aspect_height);
4057 hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &
width,
NULL, &aspect_width, &aspect_height);
4060 aspect_mode = 0xdeadbeef;
4061 hr = IVMRWindowlessControl9_GetAspectRatioMode(windowless_control, &aspect_mode);
4065 aspect_mode = 0xdeadbeef;
4066 hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode);
4076 aspect_width = aspect_height = 0xdeadbeef;
4077 hr = IVMRWindowlessControl9_GetNativeVideoSize(windowless_control, &
width, &
height, &aspect_width, &aspect_height);
4079 ok(aspect_width == 32,
"Got width %ld.\n", aspect_width);
4080 ok(aspect_height == 16,
"Got height %ld.\n", aspect_height);
4083 hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &
src,
NULL);
4089 hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control,
NULL, &
dst);
4095 hr = IVMRWindowlessControl9_SetVideoPosition(windowless_control, &
src,
NULL);
4100 hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &
src, &
dst);
4108 hr = IVMRWindowlessControl9_SetVideoPosition(windowless_control,
NULL, &
dst);
4113 hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &
src, &
dst);
4127 aspect_mode = 0xdeadbeef;
4128 hr = IVMRWindowlessControl9_GetAspectRatioMode(windowless_control, &aspect_mode);
4132 hr = IVMRWindowlessControl9_SetAspectRatioMode(windowless_control,
VMR9ARMode_None);
4135 aspect_mode = 0xdeadbeef;
4136 hr = IVMRAspectRatioControl9_GetAspectRatioMode(aspect_ratio_control, &aspect_mode);
4145 hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &
src, &
dst);
4154 hr = IVMRWindowlessControl9_SetVideoPosition(windowless_control, &
src, &
dst);
4159 hr = IVMRWindowlessControl9_GetVideoPosition(windowless_control, &
src, &
dst);
4167 ref = IFilterGraph2_Release(
graph);
4168 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4169 IMemInputPin_Release(
input);
4171 IVMRWindowlessControl9_Release(windowless_control);
4172 IVMRAspectRatioControl9_Release(aspect_ratio_control);
4174 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4188 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRMixerControl9, (
void **)&mixer_control);
4191 hr = IVMRMixerControl9_GetMixingPrefs(mixer_control, &
flags);
4200 hr = IVMRMixerControl9_GetMixingPrefs(mixer_control, &
flags);
4205 IVMRMixerControl9_Release(mixer_control);
4207 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4215 IMediaEvent *eventsrc;
4223 hr = IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
4226 hr = IFilterGraph2_QueryInterface(
graph, &IID_IMediaEvent, (
void **)&eventsrc);
4230 ok(!
ret,
"Got %u EC_COMPLETE events.\n",
ret);
4236 ok(!
ret,
"Got %u EC_COMPLETE events.\n",
ret);
4242 ok(
ret == 1,
"Got %u EC_COMPLETE events.\n",
ret);
4248 ok(!
ret,
"Got %u EC_COMPLETE events.\n",
ret);
4254 ok(
ret == 1,
"Got %u EC_COMPLETE events.\n",
ret);
4260 ok(!
ret,
"Got %u EC_COMPLETE events.\n",
ret);
4266 ok(
ret == 1,
"Got %u EC_COMPLETE events.\n",
ret);
4268 IMediaControl_Release(
control);
4269 IMediaEvent_Release(eventsrc);
4270 ref = IFilterGraph2_Release(
graph);
4271 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4273 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4281 IMediaEvent *eventsrc;
4289 hr = IFilterGraph2_QueryInterface(
graph, &IID_IMediaEvent, (
void **)&eventsrc);
4293 ok(
ret == 0,
"Got %u custom events.\n",
ret);
4295 hr = IBaseFilter_QueryInterface(
filter, &IID_IVMRSurfaceAllocatorNotify9, (
void **)&
notify);
4297 hr = IVMRSurfaceAllocatorNotify9_NotifyEvent(
notify, 0x12345678, 0x9ABC, 0xDEF0);
4301 ok(
ret == 1,
"Got %u custom events.\n",
ret);
4303 IMediaEvent_Release(eventsrc);
4304 ref = IFilterGraph2_Release(
graph);
4305 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4307 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4308 ref = IVMRSurfaceAllocatorNotify9_Release(
notify);
4309 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4317 .rcTarget = {40, 60, 160, 120},
4319 .bmiHeader.biWidth = 32,
4320 .bmiHeader.biHeight = 16,
4324 .majortype = MEDIATYPE_Video,
4325 .subtype = MEDIASUBTYPE_RGB32,
4326 .formattype = FORMAT_VideoInfo,
4327 .cbFormat =
sizeof(vih),
4328 .pbFormat = (
BYTE *)&vih,
4347 OAFilterState
state;
4360 IBaseFilter_Release(
filter);
4365 IBaseFilter_QueryInterface(
filter, &IID_IVMRSurfaceAllocatorNotify9, (
void **)&
notify);
4368 hr = IVMRSurfaceAllocatorNotify9_AdviseSurfaceAllocator(
notify, 0xabacab,
4375 win_skip(
"Direct3D does not support video rendering.\n");
4390 IFilterGraph2_AddFilter(
graph, &
source.filter.IBaseFilter_iface,
NULL);
4393 IBaseFilter_FindPin(
filter,
L"VMR Input0", &pin);
4394 hr = IFilterGraph2_ConnectDirect(
graph, &
source.source.pin.IPin_iface, pin, &req_mt);
4397 IPin_QueryInterface(pin, &IID_IMemInputPin, (
void **)&
input);
4404 &IID_IMemAllocator, (
void **)&
allocator);
4409 hr = IMemAllocator_SetProperties(
allocator, &req_props, &ret_props);
4414 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
4424 IMediaControl_Release(
control);
4430 IMemInputPin_Release(
input);
4434 ref = IFilterGraph2_Release(
graph);
4435 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4436 IVMRSurfaceAllocatorNotify9_Release(
notify);
4438 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4440 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
4454 skip(
"Failed to create VMR9, hr %#lx.\n",
hr);
4457 IBaseFilter_Release(
filter);
#define InterlockedIncrement
#define InterlockedDecrement
static const char * wine_dbgstr_rect(const RECT *prc)
enum _PinDirection PIN_DIRECTION
const GUID IID_IKsPropertySet
#define D3DERR_INVALIDCALL
#define D3DUSAGE_RENDERTARGET
enum _D3DFORMAT D3DFORMAT
IDirect3D9 *WINAPI Direct3DCreate9(UINT SDKVersion)
#define IDirect3DSurface9_GetDevice(p, a)
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
#define IDirect3D9_Release(p)
#define IDirect3DSurface9_GetContainer(p, a, b)
#define IDirect3DSurface9_GetDesc(p, a)
#define IDirect3DDevice9_Release(p)
#define IDirect3DSurface9_Release(p)
#define IDirect3DTexture9_Release(p)
const GUID IID_IBaseFilter
static struct default_presenter * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
static struct default_presenter * impl_from_IVMRSurfaceAllocator9(IVMRSurfaceAllocator9 *iface)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
void WINAPI CoTaskMemFree(void *ptr)
static WCHAR unknown[MAX_STRING_RESOURCE_LEN]
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI GetExitCodeThread(IN HANDLE hThread, OUT LPDWORD lpExitCode)
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl memcmp(const void *, const void *, size_t)
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
struct tagVIDEOINFOHEADER VIDEOINFOHEADER
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei height
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLboolean GLboolean GLboolean b
GLenum const GLfloat * params
const GLvdpauSurfaceNV * surfaces
GLsizei GLenum GLboolean sink
GLboolean GLboolean GLboolean GLboolean a
GLenum GLenum GLenum input
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
static ID3D11Device * create_device(void)
static struct test_info tests[]
D3D11_SHADER_VARIABLE_DESC desc
static IHTMLWindow2 * window
static void test_filter_state(void)
static void test_sample_time(void)
static HRESULT WINAPI testsource_DecideAllocator(struct strmbase_source *iface, IMemInputPin *peer, IMemAllocator **allocator)
static BOOL compare_media_types(const AM_MEDIA_TYPE *a, const AM_MEDIA_TYPE *b)
static void testfilter_destroy(struct strmbase_filter *iface)
static HRESULT join_thread_(int line, HANDLE thread)
static const IUnknownVtbl outer_vtbl
static void test_video_window_messages(IVideoWindow *window, HWND hwnd, HWND our_hwnd)
static HRESULT WINAPI allocator_QueryInterface(IVMRSurfaceAllocator9 *iface, REFIID iid, void **out)
static void test_video_window_owner(IVideoWindow *window, HWND hwnd, HWND our_hwnd)
static void test_aggregation(void)
static void test_windowless_size(void)
static void test_basic_video(void)
static ULONG WINAPI outer_AddRef(IUnknown *iface)
static HRESULT WINAPI outer_QueryInterface(IUnknown *iface, REFIID iid, void **out)
static void test_video_window_caption(IVideoWindow *window, HWND hwnd)
#define check_interface_broken(a, b, c)
static void test_video_window_position(IVideoWindow *window, HWND hwnd, HWND our_hwnd)
static struct testfilter * impl_from_strmbase_filter(struct strmbase_filter *iface)
static ULONG get_refcount(void *iface)
static HRESULT WINAPI allocator_InitializeDevice(IVMRSurfaceAllocator9 *iface, DWORD_PTR cookie, VMR9AllocationInfo *info, DWORD *buffer_count)
static HRESULT WINAPI presenter_QueryInterface(IVMRImagePresenter9 *iface, REFIID iid, void **out)
static ULONG WINAPI allocator_AddRef(IVMRSurfaceAllocator9 *iface)
static HRESULT WINAPI presenter_StopPresenting(IVMRImagePresenter9 *iface, DWORD_PTR cookie)
static void test_pin_info(void)
static IUnknown test_outer
static HRESULT WINAPI allocator_GetSurface(IVMRSurfaceAllocator9 *iface, DWORD_PTR cookie, DWORD index, DWORD flags, IDirect3DSurface9 **surface)
static void test_current_image(IBaseFilter *filter, IMemInputPin *input, IMediaControl *control, const BITMAPINFOHEADER *req_bih)
static void test_find_pin(void)
static void test_mixing_mode(void)
static void test_basic_video_destination(IBasicVideo *video)
static void test_notifyevent(void)
static void test_video_window_style(IVideoWindow *window, HWND hwnd, HWND our_hwnd)
static void test_flushing(IPin *pin, IMemInputPin *input, IMediaControl *control)
static const struct strmbase_source_ops testsource_ops
static HRESULT WINAPI presenter_StartPresenting(IVMRImagePresenter9 *iface, DWORD_PTR cookie)
static void test_basic_video_source(IBasicVideo *video)
static LRESULT CALLBACK window_proc(HWND hwnd, UINT msg, WPARAM wparam, LPARAM lparam)
static void test_enum_media_types(void)
static BOOL compare_double(double f, double g, unsigned int ulps)
static void test_allocate_surface_helper(void)
static IBaseFilter * create_vmr9(DWORD mode)
static BOOL CALLBACK top_window_cb(HWND hwnd, LPARAM ctx)
static void test_interfaces(void)
static void test_video_window_autoshow(IVideoWindow *window, IFilterGraph2 *graph, HWND hwnd)
static void test_eos(IPin *pin, IMemInputPin *input, IMediaControl *control)
static unsigned int check_ec_userabort(IMediaEvent *eventsrc, DWORD timeout)
static void test_video_window(void)
static void test_surface_allocator_notify_refcount(void)
static void test_connect_pin(void)
static DWORD WINAPI frame_thread(void *arg)
static void flush_events(void)
static void test_media_types(void)
static void test_changed3ddevice(void)
static struct strmbase_pin * testfilter_get_pin(struct strmbase_filter *iface, unsigned int index)
static void test_allocator(IMemInputPin *input)
static void commit_allocator(IMemInputPin *input)
static void test_enum_pins(void)
static IFilterGraph2 * create_graph(void)
static void test_overlay(void)
static void test_renderless_present(struct presenter *presenter, IFilterGraph2 *graph, IMemInputPin *input)
static const IVMRSurfaceAllocator9Vtbl allocator_vtbl
static HWND get_top_window(void)
static HRESULT WINAPI allocator_TerminateDevice(IVMRSurfaceAllocator9 *iface, DWORD_PTR cookie)
static void check_destination_position_(int line, IBasicVideo *video, LONG expect_left, LONG expect_top, LONG expect_width, LONG expect_height)
static HANDLE send_frame(IMemInputPin *sink)
#define check_destination_position(a, b, c, d, e)
static void test_window_close(IPin *pin, IMemInputPin *input, IMediaControl *control)
static ULONG WINAPI allocator_Release(IVMRSurfaceAllocator9 *iface)
static DWORD CALLBACK notify_message_proc(void *arg)
static void test_clipping_window(void)
#define check_source_position(a, b, c, d, e)
static void test_unconnected_eos(void)
static HRESULT WINAPI presenter_PresentImage(IVMRImagePresenter9 *iface, DWORD_PTR cookie, VMR9PresentationInfo *info)
static unsigned int check_ec_complete(IMediaEvent *eventsrc, DWORD timeout)
#define check_interface(a, b, c)
static ULONG WINAPI presenter_AddRef(IVMRImagePresenter9 *iface)
static const IVMRImagePresenter9Vtbl presenter_vtbl
static void test_filter_config(void)
static HANDLE send_frame_time(IMemInputPin *sink, REFERENCE_TIME start_time, DWORD color)
static void test_common_interfaces(IBaseFilter *filter)
static void test_renderless_formats(void)
static HRESULT set_mixing_mode(IBaseFilter *filter, DWORD count)
static void test_mixing_prefs(void)
static HRESULT WINAPI allocator_AdviseNotify(IVMRSurfaceAllocator9 *iface, IVMRSurfaceAllocatorNotify9 *notify)
static unsigned int check_event_code(IMediaEvent *eventsrc, DWORD timeout, LONG expected_code, LONG_PTR expected1, LONG_PTR expected2)
static const struct strmbase_filter_ops testfilter_ops
static HRESULT check_interface_(unsigned int line, void *iface, REFIID riid, BOOL supported, BOOL is_broken)
static void test_video_window_state(IVideoWindow *window, HWND hwnd, HWND our_hwnd)
static void check_source_position_(int line, IBasicVideo *video, LONG expect_left, LONG expect_top, LONG expect_width, LONG expect_height)
static void test_unconnected_filter_state(void)
static const GUID test_iid
static ULONG WINAPI presenter_Release(IVMRImagePresenter9 *iface)
static void testfilter_init(struct testfilter *filter)
static ULONG WINAPI outer_Release(IUnknown *iface)
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
BSTR WINAPI SysAllocString(LPCOLESTR str)
void WINAPI DECLSPEC_HOTPATCH SysFreeString(BSTR str)
#define WS_OVERLAPPEDWINDOW
#define WS_EX_TRANSPARENT
const GUID IID_IPersistPropertyBag
#define IsEqualGUID(rguid1, rguid2)
HWND WINAPI GetFocus(void)
LRESULT WINAPI DispatchMessageA(_In_ const MSG *)
BOOL WINAPI IsWindow(_In_opt_ HWND)
HWND WINAPI GetActiveWindow(void)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND WINAPI GetForegroundWindow(void)
LONG WINAPI GetWindowLongA(_In_ HWND, _In_ int)
BOOL WINAPI AdjustWindowRect(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL)
LRESULT WINAPI DefWindowProcA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CreateWindowA(a, b, c, d, e, f, g, h, i, j, k)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define WM_NCRBUTTONDBLCLK
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_SYSCOLORCHANGE
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
#define WM_NCLBUTTONDBLCLK
BOOL WINAPI IsIconic(_In_ HWND)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI IsZoomed(_In_ HWND)
ATOM WINAPI RegisterClassA(_In_ CONST WNDCLASSA *)
BOOL WINAPI EnumWindows(_In_ WNDENUMPROC lpEnumFunc, _In_ LPARAM lParam)
BOOL WINAPI PeekMessageA(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
#define WM_NCMBUTTONDBLCLK
BOOL WINAPI IsWindowVisible(_In_ HWND)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI EqualRect(_In_ LPCRECT, _In_ LPCRECT)
int WINAPI GetSystemMetrics(_In_ int)
HWND WINAPI GetAncestor(_In_ HWND, _In_ UINT)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define offsetof(TYPE, MEMBER)
#define D3DADAPTER_DEFAULT
#define D3DCREATE_HARDWARE_VERTEXPROCESSING
static __inline const char * wine_dbgstr_guid(const GUID *id)
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table)
void strmbase_filter_cleanup(struct strmbase_filter *filter)
void strmbase_source_cleanup(struct strmbase_source *pin)
void strmbase_filter_init(struct strmbase_filter *filter, IUnknown *outer, const CLSID *clsid, const struct strmbase_filter_ops *func_table)
HRESULT WINAPI BaseOutputPinImpl_AttemptConnection(struct strmbase_source *pin, IPin *peer, const AM_MEDIA_TYPE *mt)
unsigned int got_PresentImage
IDirect3DDevice9 * device
IDirectDrawSurface7 * surfaces[6]
IVMRSurfaceAllocator9 IVMRSurfaceAllocator9_iface
IVMRImagePresenter9 IVMRImagePresenter9_iface
IVMRSurfaceAllocatorNotify * notify
IVMRSurfaceAllocatorNotify9 * notify
unsigned int got_TerminateDevice
struct strmbase_filter filter
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
#define CONTAINING_RECORD(address, type, field)
#define MEDIASUBTYPE_NULL
#define VFW_E_VMR_NOT_IN_MIXER_MODE
#define VFW_E_TYPE_NOT_ACCEPTED
#define VFW_E_NOT_COMMITTED
#define VFW_E_NOT_STOPPED
#define VFW_E_WRONG_STATE
#define VFW_E_NO_PALETTE_AVAILABLE
#define VFW_S_STATE_INTERMEDIATE
#define VFW_E_NO_ALLOCATOR
#define VFW_E_NOT_CONNECTED
@ VMR9AllocFlag_3DRenderTarget
@ VMR9AllocFlag_TextureSurface
@ VMR9AllocFlag_OffscreenSurface
@ MixerPref9_NoDecimation
@ MixerPref9_RenderTargetRGB
@ MixerPref9_PointFiltering
@ MixerPref9_BiLinearFiltering
@ MixerPref9_ARAdjustXorY
static const WCHAR props[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
DWORD WINAPI GetCurrentThreadId(void)
DWORD WINAPI GetCurrentProcessId(void)
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
size_t const buffer_count