34 .wfx.nSamplesPerSec = 32000,
35 .wfx.nBlockAlign = 48,
36 .wfx.nAvgBytesPerSec = 4000,
39 .dwHeadBitrate = 32000,
47 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
48 .subtype = {0x00000050, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
49 .bFixedSizeSamples =
TRUE,
51 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
60 .wfx.nSamplesPerSec = 32000,
61 .wfx.nBlockAlign = 144,
62 .wfx.nAvgBytesPerSec = 4000,
65 .dwHeadBitrate = 32000,
73 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
74 .subtype = {0x00000050, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
75 .bFixedSizeSamples =
TRUE,
77 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
86 .wfx.nSamplesPerSec = 32000,
87 .wfx.nBlockAlign = 144,
88 .wfx.nAvgBytesPerSec = 4000,
91 .dwHeadBitrate = 32000,
99 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
100 .subtype = {0x00000050, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
101 .bFixedSizeSamples =
TRUE,
103 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
112 .wfx.nSamplesPerSec = 32000,
113 .wfx.nBlockAlign = 144,
114 .wfx.nAvgBytesPerSec = 4000,
118 .nFramesPerBlock = 1,
124 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
125 .subtype = {0x00000055, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
126 .bFixedSizeSamples =
TRUE,
128 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
136 .Format.nChannels = 1,
137 .Format.nSamplesPerSec = 32000,
138 .Format.wBitsPerSample = 16,
139 .Format.nBlockAlign = 2,
140 .Format.nAvgBytesPerSec = 64000,
142 .Samples.wValidBitsPerSample = 16,
145 .SubFormat = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
151 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
152 .subtype = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
153 .bFixedSizeSamples =
TRUE,
155 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
172 && !
memcmp(
a->pbFormat,
b->pbFormat,
a->cbFormat);
181 format->nSamplesPerSec = sample_rate;
186 mt->majortype = MEDIATYPE_Audio;
187 mt->subtype = MEDIASUBTYPE_PCM;
188 mt->bFixedSizeSamples =
TRUE;
189 mt->lSampleSize =
format->nBlockAlign;
190 mt->formattype = FORMAT_WaveFormatEx;
199 return IUnknown_Release(
unknown);
202#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
211 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
214 IUnknown_Release(unk);
241 IBaseFilter_FindPin(
filter,
L"In", &pin);
253 IBaseFilter_FindPin(
filter,
L"Out", &pin);
265 IBaseFilter_Release(
filter);
320 ok(unk != &
test_outer,
"Returned IUnknown should not be outer IUnknown.\n");
322 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
324 ref = IUnknown_AddRef(unk);
325 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
328 ref = IUnknown_Release(unk);
329 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
334 ok(unk2 == unk,
"Got unexpected IUnknown %p.\n", unk2);
335 IUnknown_Release(unk2);
342 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
346 ok(filter2 == (
IBaseFilter *)0xdeadbeef,
"Got unexpected IBaseFilter %p.\n", filter2);
348 hr = IUnknown_QueryInterface(unk, &
test_iid, (
void **)&unk2);
350 ok(!unk2,
"Got unexpected IUnknown %p.\n", unk2);
354 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
356 IBaseFilter_Release(
filter);
357 ref = IUnknown_Release(unk);
358 ok(!
ref,
"Got unexpected refcount %ld.\n",
ref);
416 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
428 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
433 hr = IBaseFilter_EnumPins(
filter, &enum1);
436 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
438 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
443 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
446 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
448 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
450 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
451 IPin_Release(pins[0]);
453 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
455 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
458 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
460 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
462 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
463 IPin_Release(pins[0]);
465 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
467 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
470 hr = IEnumPins_Reset(enum1);
473 hr = IEnumPins_Next(enum1, 1, pins, &
count);
476 IPin_Release(pins[0]);
478 hr = IEnumPins_Next(enum1, 1, pins, &
count);
481 IPin_Release(pins[0]);
483 hr = IEnumPins_Next(enum1, 1, pins, &
count);
487 hr = IEnumPins_Reset(enum1);
490 hr = IEnumPins_Next(enum1, 2, pins,
NULL);
493 hr = IEnumPins_Next(enum1, 2, pins, &
count);
496 IPin_Release(pins[0]);
497 IPin_Release(pins[1]);
499 hr = IEnumPins_Next(enum1, 2, pins, &
count);
503 hr = IEnumPins_Reset(enum1);
506 hr = IEnumPins_Next(enum1, 3, pins, &
count);
509 IPin_Release(pins[0]);
510 IPin_Release(pins[1]);
512 hr = IEnumPins_Reset(enum1);
515 hr = IEnumPins_Clone(enum1, &enum2);
518 hr = IEnumPins_Skip(enum1, 3);
521 hr = IEnumPins_Skip(enum1, 2);
524 hr = IEnumPins_Skip(enum1, 1);
527 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
530 hr = IEnumPins_Next(enum2, 1, pins,
NULL);
532 IPin_Release(pins[0]);
534 IEnumPins_Release(enum2);
535 IEnumPins_Release(enum1);
537 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
551 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
555 ok(pin == pin2,
"Pins didn't match.\n");
559 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
563 ok(pin == pin2,
"Pins didn't match.\n");
567 hr = IBaseFilter_FindPin(
filter,
L"XForm In", &pin);
569 hr = IBaseFilter_FindPin(
filter,
L"XForm Out", &pin);
571 hr = IBaseFilter_FindPin(
filter,
L"input pin", &pin);
573 hr = IBaseFilter_FindPin(
filter,
L"output pin", &pin);
578 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
591 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
594 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
596 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
598 hr = IPin_QueryPinInfo(pin, &
info);
604 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
606 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
607 IBaseFilter_Release(
info.pFilter);
609 hr = IPin_QueryDirection(pin, &
dir);
613 hr = IPin_QueryId(pin, &
id);
618 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
623 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
625 hr = IPin_QueryPinInfo(pin, &
info);
630 IBaseFilter_Release(
info.pFilter);
632 hr = IPin_QueryDirection(pin, &
dir);
636 hr = IPin_QueryId(pin, &
id);
641 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
647 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
659 IBaseFilter_FindPin(
filter,
L"In", &pin);
661 hr = IPin_EnumMediaTypes(pin, &enum1);
664 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
667 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
671 hr = IEnumMediaTypes_Reset(enum1);
674 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
677 hr = IEnumMediaTypes_Clone(enum1, &enum2);
680 hr = IEnumMediaTypes_Skip(enum1, 1);
683 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
686 IEnumMediaTypes_Release(enum1);
687 IEnumMediaTypes_Release(enum2);
690 IBaseFilter_FindPin(
filter,
L"Out", &pin);
692 hr = IPin_EnumMediaTypes(pin, &enum1);
695 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
698 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
702 hr = IEnumMediaTypes_Reset(enum1);
705 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
708 hr = IEnumMediaTypes_Clone(enum1, &enum2);
711 hr = IEnumMediaTypes_Skip(enum1, 1);
714 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
717 IEnumMediaTypes_Release(enum1);
718 IEnumMediaTypes_Release(enum2);
722 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
734 IBaseFilter_FindPin(
filter,
L"In", &pin);
736 hr = IPin_QueryAccept(pin, &
mp1_mt);
739 hr = IPin_QueryAccept(pin, &
mp2_mt);
743 mt.subtype = MEDIASUBTYPE_MPEG1Packet;
744 hr = IPin_QueryAccept(pin, &mt);
748 mt.subtype = MEDIASUBTYPE_MPEG1Payload;
749 hr = IPin_QueryAccept(pin, &mt);
754 hr = IPin_QueryAccept(pin, &mt);
765 hr = IPin_QueryAccept(pin, &mt);
769 mt.subtype = MEDIASUBTYPE_PCM;
770 hr = IPin_QueryAccept(pin, &mt);
775 hr = IPin_QueryAccept(pin, &mt);
780 IBaseFilter_FindPin(
filter,
L"Out", &pin);
783 hr = IPin_QueryAccept(pin, &mt);
789 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
811 return IUnknown_QueryInterface(qc->
outer_unk, iid,
out);
838 ok(0,
"Unexpected call.\n");
862 else if (
IsEqualIID(iid, &IID_IQualityControl))
892 memset(qc, 0,
sizeof(*qc));
920 return &
filter->source.pin;
943 *
out = &
filter->qc->IQualityControl_iface;
1007 size = IMediaSample_GetActualDataLength(
sample);
1008 ok(
size == 768,
"Got valid size %lu.\n",
size);
1014 if (
filter->got_sample == 1)
1029 ++
filter->got_new_segment;
1046 ++
filter->got_begin_flush;
1084 hr = IMemInputPin_GetAllocatorRequirements(
input, &
props);
1087 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
1092 hr = IMemAllocator_GetProperties(ret_allocator, &
props);
1094 ok(!
props.cBuffers,
"Got %ld buffers.\n",
props.cBuffers);
1095 ok(!
props.cbBuffer,
"Got size %ld.\n",
props.cbBuffer);
1096 ok(!
props.cbAlign,
"Got alignment %ld.\n",
props.cbAlign);
1097 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1099 hr = IMemInputPin_NotifyAllocator(
input, ret_allocator,
TRUE);
1101 IMemAllocator_Release(ret_allocator);
1108 &IID_IMemAllocator, (
void **)&req_allocator);
1111 props.cbBuffer = 256;
1114 hr = IMemAllocator_SetProperties(req_allocator, &
props, &ret_props);
1117 hr = IMemInputPin_NotifyAllocator(
input, req_allocator,
TRUE);
1120 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
1122 ok(ret_allocator == req_allocator,
"Allocators didn't match.\n");
1124 IMemAllocator_Release(req_allocator);
1125 IMemAllocator_Release(ret_allocator);
1145 ok(!!
testsink->sink.pAllocator,
"Expected an allocator.\n");
1148 ok(
props.cBuffers == 8,
"Got %ld buffers.\n",
props.cBuffers);
1149 ok(
props.cbBuffer == 9216,
"Got size %ld.\n",
props.cbBuffer);
1150 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1151 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1162 IMediaSample_Release(
sample);
1177 ok(!!
testsink->sink.pAllocator,
"Expected an allocator.\n");
1180 ok(
props.cBuffers == 8,
"Got %ld buffers.\n",
props.cBuffers);
1181 ok(
props.cbBuffer == 4608,
"Got size %ld.\n",
props.cbBuffer);
1182 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1183 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1189 &IID_IMemAllocator, (
void **)&
allocator);
1202 ok(
props.cBuffers == 8,
"Got %ld buffers.\n",
props.cBuffers);
1203 ok(
props.cbBuffer == 9216,
"Got size %ld.\n",
props.cbBuffer);
1204 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1205 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1211 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1220 ok(!!
testsink->sink.pAllocator,
"Expected an allocator.\n");
1223 ok(
props.cBuffers == 8,
"Got %ld buffers.\n",
props.cBuffers);
1224 ok(
props.cbBuffer == 3072,
"Got size %ld.\n",
props.cbBuffer);
1225 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1226 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1232 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1238 struct testqc testsource_qc;
1248 hr = IPin_QueryInterface(
sink, &IID_IQualityControl, (
void **)&sink_qc);
1250 hr = IPin_QueryInterface(
source, &IID_IQualityControl, (
void **)&source_qc);
1267 hr = IQualityControl_SetSink(sink_qc,
NULL);
1276 hr = IQualityControl_SetSink(source_qc,
NULL);
1285 testsource->
qc = &testsource_qc;
1312 hr = IQualityControl_SetSink(sink_qc,
NULL);
1321 hr = IQualityControl_SetSink(source_qc,
NULL);
1325 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1330 IQualityControl_Release(source_qc);
1331 IQualityControl_Release(sink_qc);
1345 hr = IMemInputPin_ReceiveCanBlock(
input);
1371 hr = IMediaSample_SetActualDataLength(
sample, 48);
1377 sink->expected_start_time = 0;
1378 sink->expected_stop_time = 120000;
1385 ok(
sink->got_sample >= 1,
"Got %u calls to Receive().\n",
sink->got_sample);
1386 sink->got_sample = 0;
1397 sink->expected_start_time = 22222;
1398 sink->expected_stop_time = 142222;
1405 ok(
sink->got_sample >= 1,
"Got %u calls to Receive().\n",
sink->got_sample);
1406 sink->got_sample = 0;
1418 sink->expected_start_time = 22222;
1419 sink->expected_stop_time = 142222;
1426 ok(
sink->got_sample >= 1,
"Got %u calls to Receive().\n",
sink->got_sample);
1427 sink->got_sample = 0;
1435 IMediaSample_Release(
sample);
1464 hr = IMediaSample_SetActualDataLength(
sample, 48);
1471 ok(!
testsink->got_new_segment,
"Got %u calls to IPin::NewSegment().\n",
testsink->got_new_segment);
1472 hr = IPin_NewSegment(
sink, 10000, 20000, 1.0);
1474 ok(
testsink->got_new_segment == 1,
"Got %u calls to IPin::NewSegment().\n",
testsink->got_new_segment);
1477 hr = IPin_EndOfStream(
sink);
1480 ok(
testsink->got_eos == 1,
"Got %u calls to IPin::EndOfStream().\n",
testsink->got_eos);
1483 hr = IPin_EndOfStream(
sink);
1485 ok(
testsink->got_eos == 1,
"Got %u calls to IPin::EndOfStream().\n",
testsink->got_eos);
1488 testsink->expected_stop_time = 120000;
1498 ok(!
testsink->got_begin_flush,
"Got %u calls to IPin::BeginFlush().\n",
testsink->got_begin_flush);
1499 hr = IPin_BeginFlush(
sink);
1501 ok(
testsink->got_begin_flush == 1,
"Got %u calls to IPin::BeginFlush().\n",
testsink->got_begin_flush);
1506 hr = IPin_EndOfStream(
sink);
1509 ok(!
testsink->got_end_flush,
"Got %u calls to IPin::EndFlush().\n",
testsink->got_end_flush);
1510 hr = IPin_EndFlush(
sink);
1512 ok(
testsink->got_end_flush == 1,
"Got %u calls to IPin::EndFlush().\n",
testsink->got_end_flush);
1515 testsink->expected_stop_time = 120000;
1528 IMediaSample_Release(
sample);
1550 &IID_IFilterGraph2, (
void **)&
graph);
1554 IFilterGraph2_AddFilter(
graph, &testsource.
filter.IBaseFilter_iface,
L"source");
1555 IFilterGraph2_AddFilter(
graph,
filter,
L"MPEG audio decoder");
1558 IPin_QueryInterface(
sink, &IID_IMemInputPin, (
void **)&meminput);
1559 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
1566 peer = (
IPin *)0xdeadbeef;
1567 hr = IPin_ConnectedTo(
sink, &peer);
1569 ok(!peer,
"Got peer %p.\n", peer);
1571 hr = IPin_ConnectionMediaType(
sink, &
mt);
1582 req_mt.subtype = MEDIASUBTYPE_PCM;
1583 hr = IFilterGraph2_ConnectDirect(
graph, &testsource.
source.pin.IPin_iface,
sink, &req_mt);
1589 hr = IPin_ConnectedTo(
sink, &peer);
1591 ok(peer == &testsource.
source.pin.IPin_iface,
"Got peer %p.\n", peer);
1594 hr = IPin_ConnectionMediaType(
sink, &
mt);
1601 hr = IPin_QueryAccept(
source, &req_mt);
1605 hr = IPin_QueryAccept(
source, &req_mt);
1610 hr = IPin_QueryAccept(
source, &req_mt);
1615 hr = IPin_QueryAccept(
source, &req_mt);
1620 hr = IPin_QueryAccept(
source, &req_mt);
1624 hr = IPin_QueryAccept(
source, &req_mt);
1628 hr = IPin_QueryAccept(
source, &req_mt);
1632 hr = IPin_QueryAccept(
source, &req_mt);
1640 hr = IPin_QueryAccept(
source, &req_mt);
1645 hr = IPin_QueryAccept(
source, &req_mt);
1655 hr = IPin_EnumMediaTypes(
source, &enummt);
1658 for (
i = 0;
i < 2; ++
i)
1663 init_pcm_mt(&expect_mt, &expect_format, 1, 32000,
i ? 8 : 16);
1665 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1670 "%u: Media types didn't match.\n",
i);
1672 "%u: Format blocks didn't match.\n",
i);
1677 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1680 IEnumMediaTypes_Release(enummt);
1686 peer = (
IPin *)0xdeadbeef;
1687 hr = IPin_ConnectedTo(
source, &peer);
1689 ok(!peer,
"Got peer %p.\n", peer);
1708 hr = IPin_ConnectedTo(
source, &peer);
1710 ok(peer == &
testsink.sink.
pin.IPin_iface,
"Got peer %p.\n", peer);
1737 req_mt.lSampleSize = 999;
1738 req_mt.bTemporalCompression =
TRUE;
1746 req_mt.formattype = FORMAT_None;
1781 req_mt.formattype = FORMAT_None;
1803 req_mt.majortype = MEDIATYPE_Video;
1812 req_mt.majortype = MEDIATYPE_Video;
1820 req_mt.lSampleSize = 444;
1830 ok(testsource.
source.pin.peer ==
sink,
"Got peer %p.\n", testsource.
source.pin.peer);
1831 IFilterGraph2_Disconnect(
graph, &testsource.
source.pin.IPin_iface);
1833 IMemInputPin_Release(meminput);
1836 IMediaControl_Release(
control);
1837 ref = IFilterGraph2_Release(
graph);
1838 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1840 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1841 ref = IBaseFilter_Release(&testsource.
filter.IBaseFilter_iface);
1842 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1844 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1856 skip(
"Failed to create MPEG audio decoder instance.\n");
1859 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)
GLint GLint GLsizei GLsizei GLsizei depth
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 MPEGLAYER3_ID_MPEG
#define WAVE_FORMAT_MPEGLAYER3
#define ACM_MPEG_SINGLECHANNEL
struct mpeglayer3waveformat_tag MPEGLAYER3WAVEFORMAT
struct mpeg1waveformat_tag MPEG1WAVEFORMAT
#define ACM_MPEG_ID_MPEG1
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 void test_source_allocator(IFilterGraph2 *graph, IMediaControl *control, IPin *sink, IPin *source, struct testfilter *testsource, struct testfilter *testsink)
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 AM_MEDIA_TYPE pcm16ex_mt
static const WAVEFORMATEXTENSIBLE pcm16ex_format
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 const AM_MEDIA_TYPE mp3_mt1
static IUnknown test_outer
static struct testqc * impl_from_qc_IUnknown(IUnknown *iface)
static const IUnknownVtbl testqc_inner_vtbl
static void test_find_pin(void)
static HRESULT testsink_eos(struct strmbase_sink *iface)
static const struct strmbase_source_ops testsource_ops
static const MPEG1WAVEFORMAT mp3_format0
static const AM_MEDIA_TYPE mp1_mt
static void test_enum_media_types(void)
static const MPEG1WAVEFORMAT mp2_format
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 const AM_MEDIA_TYPE mp2_mt
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 const MPEGLAYER3WAVEFORMAT mp3_format1
static void init_pcm_mt(AM_MEDIA_TYPE *mt, WAVEFORMATEX *format, WORD channels, DWORD sample_rate, WORD depth)
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)
static const MPEG1WAVEFORMAT mp1_format
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 IQualityControlVtbl testqc_vtbl
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 const AM_MEDIA_TYPE mp3_mt0
static void testfilter_init(struct testfilter *filter)
static IBaseFilter * create_mpeg_audio_codec(void)
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)
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