29DEFINE_GUID(CLSID_mpeg_layer3_decoder, 0x38be3000, 0xdbf4, 0x11d0, 0x86, 0x0e, 0x00, 0xa0, 0x24, 0xcf, 0xef, 0x6d);
35 .wfx.nSamplesPerSec = 32000,
36 .wfx.nBlockAlign = 48,
37 .wfx.nAvgBytesPerSec = 4000,
40 .dwHeadBitrate = 32000,
48 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
49 .subtype = {0x00000050, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
50 .bFixedSizeSamples =
TRUE,
52 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
61 .wfx.nSamplesPerSec = 32000,
62 .wfx.nBlockAlign = 144,
63 .wfx.nAvgBytesPerSec = 4000,
66 .dwHeadBitrate = 32000,
74 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
75 .subtype = {0x00000050, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
76 .bFixedSizeSamples =
TRUE,
78 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
87 .wfx.nSamplesPerSec = 32000,
88 .wfx.nBlockAlign = 144,
89 .wfx.nAvgBytesPerSec = 4000,
92 .dwHeadBitrate = 32000,
100 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
101 .subtype = {0x00000050, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
102 .bFixedSizeSamples =
TRUE,
104 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
113 .wfx.nSamplesPerSec = 32000,
114 .wfx.nBlockAlign = 144,
115 .wfx.nAvgBytesPerSec = 4000,
119 .nFramesPerBlock = 1,
125 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
126 .subtype = {
WAVE_FORMAT_MPEGLAYER3, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
127 .bFixedSizeSamples =
TRUE,
129 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
137 .Format.nChannels = 1,
138 .Format.nSamplesPerSec = 32000,
139 .Format.wBitsPerSample = 16,
140 .Format.nBlockAlign = 2,
141 .Format.nAvgBytesPerSec = 64000,
143 .Samples.wValidBitsPerSample = 16,
146 .SubFormat = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
152 .majortype = {0x73647561, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
153 .subtype = {0x00000001, 0x0000, 0x0010, {0x80, 0x00, 0x00, 0xaa, 0x00, 0x38, 0x9b, 0x71}},
154 .bFixedSizeSamples =
TRUE,
156 .formattype = {0x05589f81, 0xc356, 0x11ce, {0xbf, 0x01, 0x00, 0xaa, 0x00, 0x55, 0x59, 0x5a}},
173 && !
memcmp(
a->pbFormat,
b->pbFormat,
a->cbFormat);
182 format->nSamplesPerSec = sample_rate;
187 mt->majortype = MEDIATYPE_Audio;
188 mt->subtype = MEDIASUBTYPE_PCM;
189 mt->bFixedSizeSamples =
TRUE;
190 mt->lSampleSize =
format->nBlockAlign;
191 mt->formattype = FORMAT_WaveFormatEx;
200 return IUnknown_Release(
unknown);
203#define check_interface(a, b, c) check_interface_(__LINE__, a, b, c)
212 hr = IUnknown_QueryInterface(iface, iid, (
void **)&unk);
215 IUnknown_Release(unk);
242 IBaseFilter_FindPin(
filter,
L"In", &pin);
254 IBaseFilter_FindPin(
filter,
L"Out", &pin);
266 IBaseFilter_Release(
filter);
321 ok(unk != &
test_outer,
"Returned IUnknown should not be outer IUnknown.\n");
323 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
325 ref = IUnknown_AddRef(unk);
326 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
329 ref = IUnknown_Release(unk);
330 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
335 ok(unk2 == unk,
"Got unexpected IUnknown %p.\n", unk2);
336 IUnknown_Release(unk2);
343 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
347 ok(filter2 == (
IBaseFilter *)0xdeadbeef,
"Got unexpected IBaseFilter %p.\n", filter2);
349 hr = IUnknown_QueryInterface(unk, &
test_iid, (
void **)&unk2);
351 ok(!unk2,
"Got unexpected IUnknown %p.\n", unk2);
355 ok(unk2 == (
IUnknown *)0xdeadbeef,
"Got unexpected IUnknown %p.\n", unk2);
357 IBaseFilter_Release(
filter);
358 ref = IUnknown_Release(unk);
359 ok(!
ref,
"Got unexpected refcount %ld.\n",
ref);
417 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
429 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
434 hr = IBaseFilter_EnumPins(
filter, &enum1);
437 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
439 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
444 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
447 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
449 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
451 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
452 IPin_Release(pins[0]);
454 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
456 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
459 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
461 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
463 ok(
ref == 1,
"Got unexpected refcount %ld.\n",
ref);
464 IPin_Release(pins[0]);
466 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
468 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
471 hr = IEnumPins_Reset(enum1);
474 hr = IEnumPins_Next(enum1, 1, pins, &
count);
477 IPin_Release(pins[0]);
479 hr = IEnumPins_Next(enum1, 1, pins, &
count);
482 IPin_Release(pins[0]);
484 hr = IEnumPins_Next(enum1, 1, pins, &
count);
488 hr = IEnumPins_Reset(enum1);
491 hr = IEnumPins_Next(enum1, 2, pins,
NULL);
494 hr = IEnumPins_Next(enum1, 2, pins, &
count);
497 IPin_Release(pins[0]);
498 IPin_Release(pins[1]);
500 hr = IEnumPins_Next(enum1, 2, pins, &
count);
504 hr = IEnumPins_Reset(enum1);
507 hr = IEnumPins_Next(enum1, 3, pins, &
count);
510 IPin_Release(pins[0]);
511 IPin_Release(pins[1]);
513 hr = IEnumPins_Reset(enum1);
516 hr = IEnumPins_Clone(enum1, &enum2);
519 hr = IEnumPins_Skip(enum1, 3);
522 hr = IEnumPins_Skip(enum1, 2);
525 hr = IEnumPins_Skip(enum1, 1);
528 hr = IEnumPins_Next(enum1, 1, pins,
NULL);
531 hr = IEnumPins_Next(enum2, 1, pins,
NULL);
533 IPin_Release(pins[0]);
535 IEnumPins_Release(enum2);
536 IEnumPins_Release(enum1);
538 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
552 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
556 ok(pin == pin2,
"Pins didn't match.\n");
560 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
564 ok(pin == pin2,
"Pins didn't match.\n");
568 hr = IBaseFilter_FindPin(
filter,
L"XForm In", &pin);
570 hr = IBaseFilter_FindPin(
filter,
L"XForm Out", &pin);
572 hr = IBaseFilter_FindPin(
filter,
L"input pin", &pin);
574 hr = IBaseFilter_FindPin(
filter,
L"output pin", &pin);
579 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
592 hr = IBaseFilter_FindPin(
filter,
L"In", &pin);
595 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
597 ok(
ref == 2,
"Got unexpected refcount %ld.\n",
ref);
599 hr = IPin_QueryPinInfo(pin, &
info);
605 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
607 ok(
ref == 3,
"Got unexpected refcount %ld.\n",
ref);
608 IBaseFilter_Release(
info.pFilter);
610 hr = IPin_QueryDirection(pin, &
dir);
614 hr = IPin_QueryId(pin, &
id);
619 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
624 hr = IBaseFilter_FindPin(
filter,
L"Out", &pin);
626 hr = IPin_QueryPinInfo(pin, &
info);
631 IBaseFilter_Release(
info.pFilter);
633 hr = IPin_QueryDirection(pin, &
dir);
637 hr = IPin_QueryId(pin, &
id);
642 hr = IPin_QueryInternalConnections(pin,
NULL,
NULL);
648 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
660 IBaseFilter_FindPin(
filter,
L"In", &pin);
662 hr = IPin_EnumMediaTypes(pin, &enum1);
665 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
668 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
672 hr = IEnumMediaTypes_Reset(enum1);
675 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
678 hr = IEnumMediaTypes_Clone(enum1, &enum2);
681 hr = IEnumMediaTypes_Skip(enum1, 1);
684 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
687 IEnumMediaTypes_Release(enum1);
688 IEnumMediaTypes_Release(enum2);
691 IBaseFilter_FindPin(
filter,
L"Out", &pin);
693 hr = IPin_EnumMediaTypes(pin, &enum1);
696 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
699 hr = IEnumMediaTypes_Next(enum1, 1, mts, &
count);
703 hr = IEnumMediaTypes_Reset(enum1);
706 hr = IEnumMediaTypes_Next(enum1, 1, mts,
NULL);
709 hr = IEnumMediaTypes_Clone(enum1, &enum2);
712 hr = IEnumMediaTypes_Skip(enum1, 1);
715 hr = IEnumMediaTypes_Next(enum2, 1, mts,
NULL);
718 IEnumMediaTypes_Release(enum1);
719 IEnumMediaTypes_Release(enum2);
723 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
735 IBaseFilter_FindPin(
filter,
L"In", &pin);
741 mt.subtype = MEDIASUBTYPE_PCM;
742 hr = IPin_QueryAccept(pin, &mt);
745 hr = IPin_QueryAccept(pin, &
mp1_mt);
748 hr = IPin_QueryAccept(pin, &
mp2_mt);
756 hr = IPin_QueryAccept(pin, &mt);
761 hr = IPin_QueryAccept(pin, &mt);
766 IBaseFilter_FindPin(
filter,
L"Out", &pin);
769 hr = IPin_QueryAccept(pin, &mt);
775 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
797 return IUnknown_QueryInterface(qc->
outer_unk, iid,
out);
824 ok(0,
"Unexpected call.\n");
848 else if (
IsEqualIID(iid, &IID_IQualityControl))
878 memset(qc, 0,
sizeof(*qc));
907 return &
filter->source.pin;
930 *
out = &
filter->qc->IQualityControl_iface;
991 if (
filter->got_sample == 1)
994 filter->sample_actual = IMediaSample_GetActualDataLength(
sample);
1001 if (
filter->got_sample == 1)
1004 filter->sample_stop_time = stop;
1014 ++
filter->got_new_segment;
1031 ++
filter->got_begin_flush;
1069 hr = IMemInputPin_GetAllocatorRequirements(
input, &
props);
1072 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
1077 hr = IMemAllocator_GetProperties(ret_allocator, &
props);
1079 ok(!
props.cBuffers,
"Got %ld buffers.\n",
props.cBuffers);
1080 ok(!
props.cbBuffer,
"Got size %ld.\n",
props.cbBuffer);
1081 ok(!
props.cbAlign,
"Got alignment %ld.\n",
props.cbAlign);
1082 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1084 hr = IMemInputPin_NotifyAllocator(
input, ret_allocator,
TRUE);
1086 IMemAllocator_Release(ret_allocator);
1093 &IID_IMemAllocator, (
void **)&req_allocator);
1096 props.cbBuffer = 256;
1099 hr = IMemAllocator_SetProperties(req_allocator, &
props, &ret_props);
1102 hr = IMemInputPin_NotifyAllocator(
input, req_allocator,
TRUE);
1105 hr = IMemInputPin_GetAllocator(
input, &ret_allocator);
1107 ok(ret_allocator == req_allocator,
"Allocators didn't match.\n");
1109 IMemAllocator_Release(req_allocator);
1110 IMemAllocator_Release(ret_allocator);
1127 mt.lSampleSize = 2222;
1131 ok(!!
testsink->sink.pAllocator,
"Expected an allocator.\n");
1136 ok(
props.cBuffers == 16 ||
props.cBuffers == 8,
"Got %ld buffers.\n",
props.cBuffers);
1137 ok(
props.cbBuffer == 2222 ||
props.cbBuffer == 8888,
"Got size %ld.\n",
props.cbBuffer);
1138 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1139 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1150 IMediaSample_Release(
sample);
1162 &IID_IMemAllocator, (
void **)&
allocator);
1169 mt.lSampleSize = 2222;
1178 ok(
props.cBuffers == 16 ||
props.cBuffers == 8,
"Got %ld buffers.\n",
props.cBuffers);
1179 ok(
props.cbBuffer == 2222 ||
props.cbBuffer == 8888,
"Got size %ld.\n",
props.cbBuffer);
1180 ok(
props.cbAlign == 1,
"Got alignment %ld.\n",
props.cbAlign);
1181 ok(!
props.cbPrefix,
"Got prefix %ld.\n",
props.cbPrefix);
1187 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1193 struct testqc testsource_qc;
1203 hr = IPin_QueryInterface(
sink, &IID_IQualityControl, (
void **)&sink_qc);
1205 hr = IPin_QueryInterface(
source, &IID_IQualityControl, (
void **)&source_qc);
1222 hr = IQualityControl_SetSink(sink_qc,
NULL);
1231 hr = IQualityControl_SetSink(source_qc,
NULL);
1240 testsource->
qc = &testsource_qc;
1267 hr = IQualityControl_SetSink(sink_qc,
NULL);
1276 hr = IQualityControl_SetSink(source_qc,
NULL);
1280 IFilterGraph2_Disconnect(
graph, &testsource->
source.pin.IPin_iface);
1285 IQualityControl_Release(source_qc);
1286 IQualityControl_Release(sink_qc);
1301 hr = IMemInputPin_ReceiveCanBlock(meminput);
1304 hr = IMemInputPin_GetAllocator(meminput, &
allocator);
1327 hr = IMediaSample_SetActualDataLength(
sample, 144);
1333 hr = IMemInputPin_Receive(meminput,
sample);
1335 hr = IMemInputPin_Receive(meminput,
sample);
1337 hr = IMemInputPin_Receive(meminput,
sample);
1341 "Got size %lu.\n",
testsink->sample_size);
1343 "Got valid size %lu.\n",
testsink->sample_actual);
1344 ok(
testsink->sample_start_time == 0,
"Got start time %s.\n",
1346 ok(
testsink->sample_stop_time == (
testsink->sample_actual == 2304 ? 360000 : 720000),
1359 hr = IMemInputPin_Receive(meminput,
sample);
1361 hr = IMemInputPin_Receive(meminput,
sample);
1363 hr = IMemInputPin_Receive(meminput,
sample);
1367 "Got size %lu.\n",
testsink->sample_size);
1369 "Got valid size %lu.\n",
testsink->sample_actual);
1370 ok(
testsink->sample_start_time == 22222,
"Got start time %s.\n",
1372 ok(
testsink->sample_stop_time == (
testsink->sample_actual == 2304 ? 382222 : 742222),
1386 hr = IMemInputPin_Receive(meminput,
sample);
1388 hr = IMemInputPin_Receive(meminput,
sample);
1390 hr = IMemInputPin_Receive(meminput,
sample);
1394 "Got size %lu.\n",
testsink->sample_size);
1396 "Got valid size %lu.\n",
testsink->sample_actual);
1397 ok(
testsink->sample_start_time == 22222,
"Got start time %s.\n",
1399 ok(
testsink->sample_stop_time == (
testsink->sample_actual == 2304 ? 382222 : 742222),
1406 hr = IMemInputPin_Receive(meminput,
sample);
1409 IMediaSample_Release(
sample);
1425 hr = IMemInputPin_GetAllocator(meminput, &
allocator);
1438 hr = IMediaSample_SetActualDataLength(
sample, 144);
1445 ok(!
testsink->got_new_segment,
"Got %u calls to IPin::NewSegment().\n",
testsink->got_new_segment);
1446 hr = IPin_NewSegment(
sink, 10000, 20000, 1.0);
1448 ok(
testsink->got_new_segment == 1,
"Got %u calls to IPin::NewSegment().\n",
testsink->got_new_segment);
1452 hr = IPin_EndOfStream(
sink);
1455 ok(
testsink->got_eos == 1,
"Got %u calls to IPin::EndOfStream().\n",
testsink->got_eos);
1458 hr = IPin_EndOfStream(
sink);
1460 ok(
testsink->got_eos == 1,
"Got %u calls to IPin::EndOfStream().\n",
testsink->got_eos);
1463 hr = IMemInputPin_Receive(meminput,
sample);
1465 hr = IMemInputPin_Receive(meminput,
sample);
1467 hr = IMemInputPin_Receive(meminput,
sample);
1472 ok(!
testsink->got_begin_flush,
"Got %u calls to IPin::BeginFlush().\n",
testsink->got_begin_flush);
1473 hr = IPin_BeginFlush(
sink);
1475 ok(
testsink->got_begin_flush == 1,
"Got %u calls to IPin::BeginFlush().\n",
testsink->got_begin_flush);
1478 hr = IMemInputPin_Receive(meminput,
sample);
1481 hr = IPin_EndOfStream(
sink);
1484 ok(!
testsink->got_end_flush,
"Got %u calls to IPin::EndFlush().\n",
testsink->got_end_flush);
1485 hr = IPin_EndFlush(
sink);
1487 ok(
testsink->got_end_flush == 1,
"Got %u calls to IPin::EndFlush().\n",
testsink->got_end_flush);
1490 hr = IMemInputPin_Receive(meminput,
sample);
1492 hr = IMemInputPin_Receive(meminput,
sample);
1494 hr = IMemInputPin_Receive(meminput,
sample);
1501 IMediaSample_Release(
sample);
1524 &IID_IFilterGraph2, (
void **)&
graph);
1528 IFilterGraph2_AddFilter(
graph, &testsource.
filter.IBaseFilter_iface,
L"source");
1529 IFilterGraph2_AddFilter(
graph,
filter,
L"MPEG layer-3 decoder");
1532 IPin_QueryInterface(
sink, &IID_IMemInputPin, (
void **)&meminput);
1533 IFilterGraph2_QueryInterface(
graph, &IID_IMediaControl, (
void **)&
control);
1540 peer = (
IPin *)0xdeadbeef;
1541 hr = IPin_ConnectedTo(
sink, &peer);
1543 ok(!peer,
"Got peer %p.\n", peer);
1545 hr = IPin_ConnectionMediaType(
sink, &
mt);
1556 req_mt.subtype = MEDIASUBTYPE_PCM;
1557 hr = IFilterGraph2_ConnectDirect(
graph, &testsource.
source.pin.IPin_iface,
sink, &req_mt);
1563 hr = IPin_ConnectedTo(
sink, &peer);
1565 ok(peer == &testsource.
source.pin.IPin_iface,
"Got peer %p.\n", peer);
1568 hr = IPin_ConnectionMediaType(
sink, &
mt);
1575 hr = IPin_QueryAccept(
source, &req_mt);
1579 hr = IPin_QueryAccept(
source, &req_mt);
1584 hr = IPin_QueryAccept(
source, &req_mt);
1588 hr = IPin_QueryAccept(
source, &req_mt);
1592 hr = IPin_QueryAccept(
source, &req_mt);
1596 hr = IPin_QueryAccept(
source, &req_mt);
1604 hr = IPin_QueryAccept(
source, &req_mt);
1609 hr = IPin_QueryAccept(
source, &req_mt);
1614 hr = IPin_QueryAccept(
source, &req_mt);
1619 hr = IPin_QueryAccept(
source, &req_mt);
1629 hr = IPin_EnumMediaTypes(
source, &enummt);
1632 init_pcm_mt(&expect_mt, &expect_format, 1, 32000, 16);
1633 expect_mt.lSampleSize = 2304;
1635 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1640 "Media types didn't match.\n");
1642 "Format blocks didn't match.\n");
1647 hr = IEnumMediaTypes_Next(enummt, 1, &pmt,
NULL);
1650 IEnumMediaTypes_Release(enummt);
1656 peer = (
IPin *)0xdeadbeef;
1657 hr = IPin_ConnectedTo(
source, &peer);
1659 ok(!peer,
"Got peer %p.\n", peer);
1678 hr = IPin_ConnectedTo(
source, &peer);
1680 ok(peer == &
testsink.sink.
pin.IPin_iface,
"Got peer %p.\n", peer);
1704 req_mt.lSampleSize = 999;
1705 req_mt.bTemporalCompression =
TRUE;
1713 req_mt.majortype = MEDIATYPE_Video;
1718 req_mt.lSampleSize = 2304;
1762 req_mt.formattype = FORMAT_None;
1784 req_mt.majortype = MEDIATYPE_Video;
1793 req_mt.majortype = MEDIATYPE_Video;
1801 req_mt.lSampleSize = 444;
1811 ok(testsource.
source.pin.peer ==
sink,
"Got peer %p.\n", testsource.
source.pin.peer);
1812 IFilterGraph2_Disconnect(
graph, &testsource.
source.pin.IPin_iface);
1814 IMemInputPin_Release(meminput);
1817 IMediaControl_Release(
control);
1818 ref = IFilterGraph2_Release(
graph);
1819 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1821 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1822 ref = IBaseFilter_Release(&testsource.
filter.IBaseFilter_iface);
1823 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1825 ok(!
ref,
"Got outstanding refcount %ld.\n",
ref);
1837 skip(
"Failed to create MPEG layer-3 decoder instance.\n");
1840 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
#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 void test_streaming_events(IMediaControl *control, IPin *sink, IMemInputPin *meminput, struct testfilter *testsink)
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_sample_processing(IMediaControl *control, IMemInputPin *meminput, 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 IBaseFilter * create_mpeg_layer3_decoder(void)
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 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 ULONG WINAPI outer_Release(IUnknown *iface)
static HRESULT WINAPI testqc_Notify(IQualityControl *iface, IBaseFilter *sender, Quality q)
const GUID IID_IPersistPropertyBag
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#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 sample_stop_time
unsigned int got_begin_flush
REFERENCE_TIME sample_start_time
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