41 .hdr.rcTarget = { 0, 0, 0, 0 },
43 .hdr.dwBitErrorRate = 0,
44 .hdr.AvgTimePerFrame = 400000,
46 .
hdr.bmiHeader.biWidth = 32,
47 .hdr.bmiHeader.biHeight = 24,
48 .hdr.bmiHeader.biPlanes = 0,
49 .hdr.bmiHeader.biBitCount = 0,
50 .hdr.bmiHeader.biCompression = 0,
51 .hdr.bmiHeader.biSizeImage = 0,
52 .hdr.bmiHeader.biXPelsPerMeter = 2000,
53 .hdr.bmiHeader.biYPelsPerMeter = 2000,
54 .hdr.bmiHeader.biClrUsed = 0,
55 .hdr.bmiHeader.biClrImportant = 0,
56 .dwStartTimeCode = 4096,
57 .cbSequenceHeader = 12,
58 .bSequenceHeader = { 0x00, 0x00, 0x01, 0xb3, 0x02, 0x00, 0x18, 0x13, 0xff, 0xff, 0xe0, 0x18 },
64 .majortype = {0x73646976, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
65 .subtype = {0xe436eb81, 0x524f, 0x11ce, {0x9f, 0x53, 0x00, 0x20, 0xaf, 0x0b, 0xa7, 0x70}},
66 .bFixedSizeSamples =
TRUE,
68 .formattype = {0x05589f82, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
76 .rcTarget = { 0, 0, 0, 0 },
77 .dwBitRate = 32 * 24 * 16 * 25,
79 .AvgTimePerFrame = 400000,
81 .bmiHeader.biWidth = 32,
82 .bmiHeader.biHeight = 24,
83 .bmiHeader.biPlanes = 1,
84 .bmiHeader.biBitCount = 16,
85 .bmiHeader.biCompression =
MAKEFOURCC(
'Y',
'U',
'Y',
'2'),
86 .bmiHeader.biSizeImage = 32 * 24 * 16 / 8,
87 .bmiHeader.biXPelsPerMeter = 2000,
88 .bmiHeader.biYPelsPerMeter = 2000,
94 .majortype = {0x73646976, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
95 .subtype = {0x32595559, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
96 .bFixedSizeSamples =
TRUE,
97 .lSampleSize = 32 * 24 * 16 / 8,
98 .formattype = {0x05589f80, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
115 && !
memcmp(
a->pbFormat,
b->pbFormat,
a->cbFormat);
149 format->bmiHeader.biSizeImage =
format->bmiHeader.biBitCount *
format->bmiHeader.biWidth *
format->bmiHeader.biHeight / 8;
150 format->dwBitRate =
format->bmiHeader.biSizeImage*8 * 25;
151 mt->lSampleSize =
format->bmiHeader.biSizeImage;
153 format->bmiHeader.biClrUsed = 0x100;
160 return IUnknown_Release(
unknown);
163#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
172 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
175 IUnknown_Release(unk);
201 IBaseFilter_FindPin(
filter,
L"In", &pin);
213 IBaseFilter_FindPin(
filter,
L"Out", &pin);
225 IBaseFilter_Release(
filter);
280 ok(unk != &
test_outer,
"Returned IUnknown should not be outer IUnknown.\n");
282 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
284 ref = IUnknown_AddRef(unk);
285 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
288 ref = IUnknown_Release(unk);
289 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
294 ok(unk2 == unk,
"Got unexpected IUnknown %p.\n", unk2);
295 IUnknown_Release(unk2);
302 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
306 ok(filter2 == (
IBaseFilter *)0xdeadbeef,
"Got unexpected IBaseFilter %p.\n", filter2);
308 hr = IUnknown_QueryInterface(unk, &
test_iid, (
void **)&unk2);
310 ok(!unk2,
"Got unexpected IUnknown %p.\n", unk2);
314 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
316 IBaseFilter_Release(
filter);
317 ref = IUnknown_Release(unk);
318 ok(!
ref,
"Got unexpected refcount %ld.\n",
ref);
376 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
388 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
393 hr = IBaseFilter_EnumPins(
filter, &enum1);
396 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
398 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
403 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
406 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
408 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
410 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
411 IPin_Release(pins[0]);
413 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
415 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
418 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
420 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
422 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
423 IPin_Release(pins[0]);
425 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
427 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
430 hr = IEnumPins_Reset(enum1);
433 hr = IEnumPins_Next(enum1, 1, pins, &
count);
436 IPin_Release(pins[0]);
438 hr = IEnumPins_Next(enum1, 1, pins, &
count);
441 IPin_Release(pins[0]);
443 hr = IEnumPins_Next(enum1, 1, pins, &
count);
447 hr = IEnumPins_Reset(enum1);
450 hr = IEnumPins_Next(enum1, 2, pins,
NULL);
453 hr = IEnumPins_Next(enum1, 2, pins, &
count);
456 IPin_Release(pins[0]);
457 IPin_Release(pins[1]);
459 hr = IEnumPins_Next(enum1, 2, pins, &
count);
463 hr = IEnumPins_Reset(enum1);
466 hr = IEnumPins_Next(enum1, 3, pins, &
count);
469 IPin_Release(pins[0]);
470 IPin_Release(pins[1]);
472 hr = IEnumPins_Reset(enum1);
475 hr = IEnumPins_Clone(enum1, &enum2);
478 hr = IEnumPins_Skip(enum1, 3);
481 hr = IEnumPins_Skip(enum1, 2);
484 hr = IEnumPins_Skip(enum1, 1);
487 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
490 hr = IEnumPins_Next(enum2, 1, pins,
NULL);
492 IPin_Release(pins[0]);
494 IEnumPins_Release(enum2);
495 IEnumPins_Release(enum1);
497 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
511 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
515 ok(pin == pin2,
"Pins didn't match.\n");
519 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
523 ok(pin == pin2,
"Pins didn't match.\n");
527 hr = IBaseFilter_FindPin(
filter,
L"XForm In", &pin);
529 hr = IBaseFilter_FindPin(
filter,
L"XForm Out", &pin);
531 hr = IBaseFilter_FindPin(
filter,
L"input pin", &pin);
533 hr = IBaseFilter_FindPin(
filter,
L"output pin", &pin);
538 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
551 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
554 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
556 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
558 hr = IPin_QueryPinInfo(pin, &
info);
564 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
566 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
567 IBaseFilter_Release(
info.pFilter);
569 hr = IPin_QueryDirection(pin, &
dir);
573 hr = IPin_QueryId(pin, &
id);
578 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
583 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
585 hr = IPin_QueryPinInfo(pin, &
info);
590 IBaseFilter_Release(
info.pFilter);
592 hr = IPin_QueryDirection(pin, &
dir);
596 hr = IPin_QueryId(pin, &
id);
601 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
607 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
619 IBaseFilter_FindPin(
filter,
L"In", &pin);
621 hr = IPin_EnumMediaTypes(pin, &enum1);
624 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
627 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
631 hr = IEnumMediaTypes_Reset(enum1);
634 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
637 hr = IEnumMediaTypes_Clone(enum1, &enum2);
640 hr = IEnumMediaTypes_Skip(enum1, 1);
643 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
646 IEnumMediaTypes_Release(enum1);
647 IEnumMediaTypes_Release(enum2);
650 IBaseFilter_FindPin(
filter,
L"Out", &pin);
652 hr = IPin_EnumMediaTypes(pin, &enum1);
655 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
658 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
662 hr = IEnumMediaTypes_Reset(enum1);
665 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
668 hr = IEnumMediaTypes_Clone(enum1, &enum2);
671 hr = IEnumMediaTypes_Skip(enum1, 1);
674 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
677 IEnumMediaTypes_Release(enum1);
678 IEnumMediaTypes_Release(enum2);
682 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
693 IBaseFilter_FindPin(
filter,
L"In", &pin);
699 mt.subtype = MEDIASUBTYPE_MPEG1Packet;
700 hr = IPin_QueryAccept(pin, &mt);
705 hr = IPin_QueryAccept(pin, &mt);
710 IBaseFilter_FindPin(
filter,
L"Out", &pin);
718 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
740 return IUnknown_QueryInterface(qc->
outer_unk, iid,
out);
767 ok(0,
"Unexpected call.\n");
791 else if (
IsEqualIID(iid, &IID_IQualityControl))
821 memset(qc, 0,
sizeof(*qc));
848 return &
filter->source.pin;
925 ok(
size ==
filter->sink.pin.mt.lSampleSize,
"Got size %lu, expected %lu.\n",
size,
filter->sink.pin.mt.lSampleSize);
926 size = IMediaSample_GetActualDataLength(
sample);
927 ok(
size ==
filter->sink.pin.mt.lSampleSize,
"Got actual size %lu, expected %lu.\n",
size,
filter->sink.pin.mt.lSampleSize);
928 ok(IMediaSample_GetActualDataLength(
sample) <= IMediaSample_GetSize(
sample),
"Buffer overflow");
942 ok(
start ==
filter->expected_start_time,
"Got start time %s, expected %s.\n",
945 ok(stop ==
filter->expected_stop_time,
"Got stop time %s, expected %s.\n",
958 ++
filter->got_new_segment;
975 ++
filter->got_begin_flush;
1013 hr = IMemInputPin_GetAllocatorRequirements(
input, &
props);
1016 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
1021 hr = IMemAllocator_GetProperties(ret_allocator, &
props);
1023 ok(!
props.cBuffers,
"Got %ld buffers.\n",
props.cBuffers);
1024 ok(!
props.cbBuffer,
"Got size %ld.\n",
props.cbBuffer);
1025 ok(!
props.cbAlign,
"Got alignment %ld.\n",
props.cbAlign);
1026 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1028 hr = IMemInputPin_NotifyAllocator(
input, ret_allocator,
TRUE);
1030 IMemAllocator_Release(ret_allocator);
1037 &IID_IMemAllocator, (
void **)&req_allocator);
1040 props.cbBuffer = 256;
1043 hr = IMemAllocator_SetProperties(req_allocator, &
props, &ret_props);
1046 hr = IMemInputPin_NotifyAllocator(
input, req_allocator,
TRUE);
1049 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
1051 ok(ret_allocator == req_allocator,
"Allocators didn't match.\n");
1053 IMemAllocator_Release(req_allocator);
1054 IMemAllocator_Release(ret_allocator);
1059 unsigned type_idx,
BOOL should_work)
1069 ok(
hr ==
S_OK,
"(%u) Got hr %#lx.\n", type_idx,
hr);
1077 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1082 ok(!!
testsink->sink.pAllocator,
"Expected an allocator.\n");
1085 ok(
props.cBuffers == 1,
"Got %ld buffers.\n",
props.cBuffers);
1086 ok(
props.cbBuffer == mt.lSampleSize,
"Got size %ld.\n",
props.cbBuffer);
1087 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1088 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1099 IMediaSample_Release(
sample);
1114 ok(!!
testsink->sink.pAllocator,
"Expected an allocator.\n");
1117 ok(
props.cBuffers == 1,
"Got %ld buffers.\n",
props.cBuffers);
1118 ok(
props.cbBuffer == mt.lSampleSize,
"Got size %ld.\n",
props.cbBuffer);
1119 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1120 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1126 &IID_IMemAllocator, (
void **)&
allocator);
1139 ok(
props.cBuffers == 1,
"Got %ld buffers.\n",
props.cBuffers);
1140 ok(
props.cbBuffer == mt.lSampleSize,
"Got size %ld.\n",
props.cbBuffer);
1141 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1142 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1148 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1154 struct testqc testsource_qc;
1164 testsource->
qc = &testsource_qc;
1166 hr = IPin_QueryInterface(
sink, &IID_IQualityControl, (
void **)&sink_qc);
1168 hr = IPin_QueryInterface(
source, &IID_IQualityControl, (
void **)&source_qc);
1196 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1198 IQualityControl_Release(source_qc);
1199 IQualityControl_Release(sink_qc);
1209 hr = IMediaSample_GetPointer(
sample, &target_data);
1215 hr = IMediaSample_SetActualDataLength(
sample,
len);
1227 static const BYTE empty_mpg_frames[] = {
1228 0x00, 0x00, 0x01, 0xb3, 0x02, 0x00, 0x18, 0x15, 0x02, 0xbf, 0x60, 0x9c,
1229 0x00, 0x00, 0x01, 0xb8, 0x00, 0x08, 0x00, 0x40,
1230 0x00, 0x00, 0x01, 0x00, 0x00, 0x0f, 0xff, 0xf8,
1231 0x00, 0x00, 0x01, 0x01, 0x0b, 0xf8, 0x7d, 0x29, 0x48, 0x8b, 0x94, 0xa5, 0x22, 0x20,
1232 0x00, 0x00, 0x01, 0x02, 0x0b, 0xf8, 0x7d, 0x2e, 0x7d, 0x2f, 0xcf, 0xc1, 0x04, 0x03, 0xa0, 0x11, 0xb1,
1233 0x41, 0x28, 0x88, 0x13, 0xb9, 0x6f, 0xcf, 0xc1, 0x04, 0x03, 0xa0, 0x11, 0xb1, 0x41, 0x28, 0x88,
1234 0x13, 0xb9, 0x6f, 0xa1, 0x4b, 0x9f, 0x48, 0x04, 0x10, 0x0e, 0x80, 0x46, 0xc5, 0x04, 0xa2,
1235 0x20, 0x4e, 0xe5, 0x80, 0x41, 0x00, 0xe8, 0x04, 0x6c, 0x50, 0x4a, 0x22, 0x04, 0xee, 0x58,
1236 0x00, 0x00, 0x01, 0x00, 0x00, 0x57, 0xff, 0xf9, 0x80,
1237 0x00, 0x00, 0x01, 0x01, 0x0a, 0x79, 0xc0,
1238 0x00, 0x00, 0x01, 0x02, 0x0a, 0x79, 0xc0,
1239 0x00, 0x00, 0x01, 0x00, 0x00, 0x97, 0xff, 0xf9, 0x80,
1240 0x00, 0x00, 0x01, 0x01, 0x0a, 0x79, 0xc0,
1241 0x00, 0x00, 0x01, 0x02, 0x0a, 0x79, 0xc0,
1243 static const BYTE empty_mpg_eos[] = {
1244 0x00, 0x00, 0x01, 0xb7,
1255 hr = IPin_EndOfStream(pin);
1269 sink->got_sample = 0;
1275 hr = IMemInputPin_ReceiveCanBlock(
input);
1298 sink->expected_start_time = 0;
1299 sink->expected_stop_time = 0;
1300 hr = IMediaSample_SetTime(
sample, &
sink->expected_start_time, &
sink->expected_stop_time);
1304 ok(
sink->got_sample >= 1,
"Got %u calls to Receive().\n",
sink->got_sample);
1305 ok(
sink->got_eos == 1,
"Got %u calls to EndOfStream().\n",
sink->got_eos);
1306 sink->got_sample = 0;
1318 sink->expected_start_time = -1;
1320 ok(
sink->got_sample >= 1,
"Got %u calls to Receive().\n",
sink->got_sample);
1321 ok(
sink->got_eos == 1,
"Got %u calls to EndOfStream().\n",
sink->got_eos);
1322 sink->got_sample = 0;
1335 sink->expected_start_time = 22222;
1336 sink->expected_stop_time = 22222;
1338 ok(
sink->got_sample >= 1,
"Got %u calls to Receive().\n",
sink->got_sample);
1339 ok(
sink->got_eos == 1,
"Got %u calls to EndOfStream().\n",
sink->got_eos);
1340 sink->got_sample = 0;
1351 IMediaSample_Release(
sample);
1388 ok(!
testsink->got_new_segment,
"Got %u calls to IPin::NewSegment().\n",
testsink->got_new_segment);
1389 hr = IPin_NewSegment(
sink, 10000, 20000, 1.0);
1391 ok(
testsink->got_new_segment == 1,
"Got %u calls to IPin::NewSegment().\n",
testsink->got_new_segment);
1394 hr = IPin_EndOfStream(
sink);
1397 ok(
testsink->got_eos == 1,
"Got %u calls to IPin::EndOfStream().\n",
testsink->got_eos);
1400 hr = IPin_EndOfStream(
sink);
1402 ok(
testsink->got_eos == 1,
"Got %u calls to IPin::EndOfStream().\n",
testsink->got_eos);
1410 ok(!
testsink->got_begin_flush,
"Got %u calls to IPin::BeginFlush().\n",
testsink->got_begin_flush);
1411 hr = IPin_BeginFlush(
sink);
1413 ok(
testsink->got_begin_flush == 1,
"Got %u calls to IPin::BeginFlush().\n",
testsink->got_begin_flush);
1418 hr = IPin_EndOfStream(
sink);
1421 ok(!
testsink->got_end_flush,
"Got %u calls to IPin::EndFlush().\n",
testsink->got_end_flush);
1422 hr = IPin_EndFlush(
sink);
1424 ok(
testsink->got_end_flush == 1,
"Got %u calls to IPin::EndFlush().\n",
testsink->got_end_flush);
1442 IMediaSample_Release(
sample);
1463 &IID_IFilterGraph2, (
void **)&
graph);
1467 IFilterGraph2_AddFilter(
graph, &testsource.
filter.IBaseFilter_iface,
L"source");
1468 IFilterGraph2_AddFilter(
graph,
filter,
L"MPEG video decoder");
1471 IPin_QueryInterface(
sink, &IID_IMemInputPin, (
void **)&meminput);
1472 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
1486 peer = (
IPin *)0xdeadbeef;
1487 hr = IPin_ConnectedTo(
sink, &peer);
1489 ok(!peer,
"Got peer %p.\n", peer);
1491 hr = IPin_ConnectionMediaType(
sink, &
mt);
1502 req_mt.subtype = MEDIASUBTYPE_RGB24;
1503 hr = IFilterGraph2_ConnectDirect(
graph, &testsource.
source.pin.IPin_iface,
sink, &req_mt);
1509 hr = IPin_ConnectedTo(
sink, &peer);
1511 ok(peer == &testsource.
source.pin.IPin_iface,
"Got peer %p.\n", peer);
1514 hr = IPin_ConnectionMediaType(
sink, &
mt);
1525 hr = IPin_QueryAccept(
source, &req_mt);
1530 hr = IPin_QueryAccept(
source, &req_mt);
1536 hr = IPin_QueryAccept(
source, &req_mt);
1545 hr = IPin_QueryAccept(
source, &req_mt);
1557 hr = IPin_EnumMediaTypes(
source, &enummt);
1566 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1568 while (
IsEqualGUID(&pmt->formattype, &FORMAT_VideoInfo2))
1571 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1578 "%u: Media types didn't match.\n",
i);
1580 "%u: Format blocks didn't match.\n",
i);
1588 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1590 IEnumMediaTypes_Release(enummt);
1594 peer = (
IPin *)0xdeadbeef;
1595 hr = IPin_ConnectedTo(
source, &peer);
1597 ok(!peer,
"Got peer %p.\n", peer);
1624 hr = IPin_ConnectedTo(
source, &peer);
1626 ok(peer == &
testsink.sink.
pin.IPin_iface,
"%u: Got peer %p.\n",
i, peer);
1653 req_mt.lSampleSize = 999;
1654 req_mt.bTemporalCompression =
TRUE;
1663 req_mt.formattype = FORMAT_None;
1680 req_mt.pbFormat = (
BYTE *)&req_format;
1690 req_mt.pbFormat = (
BYTE *)&req_format;
1702 req_mt.majortype = MEDIATYPE_Audio;
1711 req_mt.majortype = MEDIATYPE_Audio;
1719 req_mt.lSampleSize = 444;
1729 ok(testsource.
source.pin.peer ==
sink,
"Got peer %p.\n", testsource.
source.pin.peer);
1730 IFilterGraph2_Disconnect(
graph, &testsource.
source.pin.IPin_iface);
1732 IMemInputPin_Release(meminput);
1735 IMediaControl_Release(
control);
1736 ref = IFilterGraph2_Release(
graph);
1737 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1739 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1740 ref = IBaseFilter_Release(&testsource.
filter.IBaseFilter_iface);
1741 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1743 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1755 skip(
"Failed to create MPEG video decoder instance.\n");
1758 IBaseFilter_Release(
filter);
#define InterlockedIncrement
#define InterlockedDecrement
enum _PinDirection PIN_DIRECTION
const GUID IID_IKsPropertySet
const GUID IID_IBaseFilter
const GUID IID_IAsyncReader
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)
_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
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLdouble GLdouble GLdouble GLdouble q
GLboolean GLboolean GLboolean b
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
#define todo_wine_if(is_todo)
#define memcpy(s1, s2, n)
static void testqc_init(struct testqc *qc, IUnknown *outer)
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 HRESULT testsink_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
static void testfilter_destroy(struct strmbase_filter *iface)
static ULONG WINAPI testqc_inner_AddRef(IUnknown *iface)
static const IUnknownVtbl outer_vtbl
static const struct strmbase_sink_ops testsink_ops
static const VIDEOINFOHEADER yuy2_format
static HRESULT testsink_begin_flush(struct strmbase_sink *iface)
static ULONG WINAPI testqc_Release(IQualityControl *iface)
static void test_aggregation(void)
static HRESULT testsink_connect(struct strmbase_sink *iface, IPin *peer, const AM_MEDIA_TYPE *mt)
static void check_interface_(unsigned int line, void *iface_ptr, REFIID iid, BOOL supported)
static ULONG WINAPI outer_AddRef(IUnknown *iface)
static HRESULT WINAPI outer_QueryInterface(IUnknown *iface, REFIID iid, void **out)
static const MPEG1VIDEOINFO_12 mpg_format
static void test_send_sample(IMemInputPin *input, IMediaSample *sample, const BYTE *data, LONG len)
static struct testfilter * impl_from_strmbase_filter(struct strmbase_filter *iface)
static ULONG get_refcount(void *iface)
static void test_pin_info(void)
static HRESULT testsource_query_interface(struct strmbase_pin *iface, REFIID iid, void **out)
static IUnknown test_outer
static struct testqc * impl_from_qc_IUnknown(IUnknown *iface)
static const AM_MEDIA_TYPE mpeg_mt
static void test_source_allocator(IFilterGraph2 *graph, IMediaControl *control, IPin *sink, IPin *source, struct testfilter *testsource, struct testfilter *testsink, unsigned type_idx, BOOL should_work)
static const IUnknownVtbl testqc_inner_vtbl
static void test_find_pin(void)
static HRESULT testsink_eos(struct strmbase_sink *iface)
static IBaseFilter * create_mpeg_video_codec(void)
static const struct strmbase_source_ops testsource_ops
static void test_enum_media_types(void)
static void test_quality_control(IFilterGraph2 *graph, IBaseFilter *filter, IPin *sink, IPin *source, struct testfilter *testsource, struct testfilter *testsink)
static void test_interfaces(void)
static void test_streaming_events(IMediaControl *control, IPin *sink, IMemInputPin *input, struct testfilter *testsink)
static void test_connect_pin(void)
static HRESULT WINAPI testqc_SetSink(IQualityControl *iface, IQualityControl *sink)
static void test_media_types(void)
static struct strmbase_pin * testfilter_get_pin(struct strmbase_filter *iface, unsigned int index)
static void test_enum_pins(void)
static HRESULT WINAPI testqc_QueryInterface(IQualityControl *iface, REFIID iid, void **out)
static ULONG WINAPI testqc_inner_Release(IUnknown *iface)
static HRESULT WINAPI testsink_Receive(struct strmbase_sink *iface, IMediaSample *sample)
static HRESULT WINAPI testqc_inner_QueryInterface(IUnknown *iface, REFIID iid, void **out)
struct tagMPEG1VIDEOINFO_12 MPEG1VIDEOINFO_12
static void init_video_mt(AM_MEDIA_TYPE *mt, VIDEOINFOHEADER *format, unsigned type_idx)
static void test_sink_allocator(IMemInputPin *input)
#define check_interface(a, b, c)
static struct testqc * impl_from_IQualityControl(IQualityControl *iface)
static ULONG WINAPI testqc_AddRef(IQualityControl *iface)
static const struct @1969 video_types[]
static const IQualityControlVtbl testqc_vtbl
static void test_send_video(IMemInputPin *input, IMediaSample *sample)
static const struct strmbase_filter_ops testfilter_ops
static HRESULT testsink_new_segment(struct strmbase_sink *iface, REFERENCE_TIME start, REFERENCE_TIME stop, double rate)
static void test_unconnected_filter_state(void)
static const GUID test_iid
static void test_sample_processing(IMediaControl *control, IMemInputPin *input, struct testfilter *sink)
static HRESULT testsink_get_media_type(struct strmbase_pin *iface, unsigned int index, AM_MEDIA_TYPE *mt)
static HRESULT testsink_end_flush(struct strmbase_sink *iface)
static void testfilter_init(struct testfilter *filter)
static const AM_MEDIA_TYPE yuy2_mt
static ULONG WINAPI outer_Release(IUnknown *iface)
static HRESULT WINAPI testqc_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q)
const GUID IID_IPersistPropertyBag
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define offsetof(TYPE, MEMBER)
static __inline const char * wine_dbgstr_guid(const GUID *id)
int winetest_platform_is_wine
HRESULT WINAPI CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
void WINAPI FreeMediaType(AM_MEDIA_TYPE *pMediaType)
void strmbase_source_init(struct strmbase_source *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_source_ops *func_table)
void strmbase_sink_cleanup(struct strmbase_sink *pin)
void strmbase_sink_init(struct strmbase_sink *pin, struct strmbase_filter *filter, const WCHAR *name, const struct strmbase_sink_ops *ops, IMemAllocator *allocator)
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)
void WINAPI DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
struct strmbase_filter * filter
unsigned int got_end_flush
REFERENCE_TIME expected_stop_time
REFERENCE_TIME expected_start_time
unsigned int got_begin_flush
struct strmbase_source source
struct strmbase_filter filter
unsigned int got_new_segment
IQualityControl IQualityControl_iface
IBaseFilter * notify_sender
struct strmbase_filter filter
#define CONTAINING_RECORD(address, type, field)
#define VFW_E_TYPE_NOT_ACCEPTED
#define VFW_E_NOT_COMMITTED
#define VFW_E_NOT_STOPPED
#define VFW_E_NO_ACCEPTABLE_TYPES
#define VFW_E_WRONG_STATE
#define VFW_S_NO_MORE_ITEMS
#define VFW_E_NOT_CONNECTED
static const WCHAR props[]
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out