4 * Copyright 2013 Damjan Jovanovic
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
31 #include "wine/strmbase.h"
32 #include "wine/test.h"
34 static const char *debugstr_guid(REFIID riid
)
38 sprintf(buf
, "{%08X-%04X-%04X-%02X%02X-%02X%02X%02X%02X%02X%02X}",
39 riid
->Data1
, riid
->Data2
, riid
->Data3
, riid
->Data4
[0],
40 riid
->Data4
[1], riid
->Data4
[2], riid
->Data4
[3], riid
->Data4
[4],
41 riid
->Data4
[5], riid
->Data4
[6], riid
->Data4
[7]);
46 static void test_smart_tee_filter(void)
49 IBaseFilter
*smartTeeFilter
= NULL
;
50 IEnumPins
*enumPins
= NULL
;
52 FILTER_INFO filterInfo
;
55 hr
= CoCreateInstance(&CLSID_SmartTee
, NULL
, CLSCTX_INPROC_SERVER
,
56 &IID_IBaseFilter
, (void**)&smartTeeFilter
);
57 todo_wine
ok(SUCCEEDED(hr
), "couldn't create smart tee filter, hr=%08x\n", hr
);
61 hr
= IBaseFilter_QueryFilterInfo(smartTeeFilter
, &filterInfo
);
62 ok(SUCCEEDED(hr
), "QueryFilterInfo failed, hr=%08x\n", hr
);
66 ok(lstrlenW(filterInfo
.achName
) == 0,
67 "filter's name is meant to be empty but it's %s\n", wine_dbgstr_w(filterInfo
.achName
));
69 hr
= IBaseFilter_EnumPins(smartTeeFilter
, &enumPins
);
70 ok(SUCCEEDED(hr
), "cannot enum filter pins, hr=%08x\n", hr
);
74 while (IEnumPins_Next(enumPins
, 1, &pin
, NULL
) == S_OK
)
77 hr
= IPin_QueryPinInfo(pin
, &pinInfo
);
78 ok(SUCCEEDED(hr
), "QueryPinInfo failed, hr=%08x\n", hr
);
84 static const WCHAR wszInput
[] = {'I','n','p','u','t',0};
85 ok(pinInfo
.dir
== PINDIR_INPUT
, "pin 0 isn't an input pin\n");
86 ok(!lstrcmpW(pinInfo
.achName
, wszInput
), "pin 0 is called %s, not 'Input'\n", wine_dbgstr_w(pinInfo
.achName
));
88 else if (pinNumber
== 1)
90 static const WCHAR wszCapture
[] = {'C','a','p','t','u','r','e',0};
91 ok(pinInfo
.dir
== PINDIR_OUTPUT
, "pin 1 isn't an output pin\n");
92 ok(!lstrcmpW(pinInfo
.achName
, wszCapture
), "pin 1 is called %s, not 'Capture'\n", wine_dbgstr_w(pinInfo
.achName
));
94 else if (pinNumber
== 2)
96 static const WCHAR wszPreview
[] = {'P','r','e','v','i','e','w',0};
97 ok(pinInfo
.dir
== PINDIR_OUTPUT
, "pin 2 isn't an output pin\n");
98 ok(!lstrcmpW(pinInfo
.achName
, wszPreview
), "pin 2 is called %s, not 'Preview'\n", wine_dbgstr_w(pinInfo
.achName
));
101 ok(0, "pin %d isn't supposed to exist\n", pinNumber
);
110 IBaseFilter_Release(smartTeeFilter
);
112 IEnumPins_Release(enumPins
);
122 static const char* debugstr_filter_type(filter_type type
)
126 return "SOURCE_FILTER";
128 return "SINK_FILTER";
129 case INTERMEDIATE_FILTER
:
130 return "INTERMEDIATE_FILTER";
144 ENUMMEDIATYPES_RESET
,
146 GRAPHBUILDER_CONNECT
,
148 BASEFILTER_QUERYINTERFACE
,
152 static const struct {
154 filter_type filter_type
;
157 BOOL optional
; /* fails on wine if missing */
159 } renderstream_cat_media
[] = {
160 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
},
161 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
},
162 {ENUMPINS_NEXT
, SOURCE_FILTER
},
163 {PIN_QUERYDIRECTION
, SOURCE_FILTER
},
164 {PIN_CONNECTEDTO
, SOURCE_FILTER
},
165 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
166 {KSPROPERTYSET_GET
, SOURCE_FILTER
},
167 {PIN_ENUMMEDIATYPES
, SOURCE_FILTER
},
168 {ENUMMEDIATYPES_RESET
, SOURCE_FILTER
},
169 {ENUMMEDIATYPES_NEXT
, SOURCE_FILTER
},
170 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
},
171 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
},
172 {ENUMPINS_NEXT
, SOURCE_FILTER
},
173 {PIN_QUERYDIRECTION
, SOURCE_FILTER
},
174 {PIN_CONNECTEDTO
, SOURCE_FILTER
},
175 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
176 {KSPROPERTYSET_GET
, SOURCE_FILTER
},
177 {ENUMPINS_NEXT
, SOURCE_FILTER
},
178 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
, TRUE
},
179 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
, TRUE
},
180 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
181 {PIN_QUERYDIRECTION
, SOURCE_FILTER
, TRUE
},
182 {PIN_CONNECTEDTO
, SOURCE_FILTER
, TRUE
},
183 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
184 {KSPROPERTYSET_GET
, SOURCE_FILTER
, TRUE
},
185 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
186 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
, TRUE
},
187 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
, TRUE
},
188 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
189 {PIN_QUERYDIRECTION
, SOURCE_FILTER
, TRUE
},
190 {PIN_CONNECTEDTO
, SOURCE_FILTER
, TRUE
},
191 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
192 {KSPROPERTYSET_GET
, SOURCE_FILTER
, TRUE
},
193 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
194 {PIN_ENUMMEDIATYPES
, SOURCE_FILTER
, TRUE
, FALSE
, TRUE
},
195 {ENUMMEDIATYPES_NEXT
, SOURCE_FILTER
, TRUE
, FALSE
, TRUE
},
196 {BASEFILTER_QUERYINTERFACE
, SINK_FILTER
, FALSE
, TRUE
},
197 {BASEFILTER_ENUMPINS
, SINK_FILTER
},
198 {ENUMPINS_NEXT
, SINK_FILTER
},
199 {PIN_QUERYDIRECTION
, SINK_FILTER
},
200 {PIN_CONNECTEDTO
, SINK_FILTER
},
201 {GRAPHBUILDER_CONNECT
, NOT_FILTER
},
202 {BASEFILTER_GETSTATE
, SOURCE_FILTER
, TRUE
, FALSE
, TRUE
},
203 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
204 {ENUMPINS_NEXT
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
205 {PIN_QUERYDIRECTION
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
206 {PIN_CONNECTEDTO
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
207 {ENUMPINS_NEXT
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
209 }, renderstream_intermediate
[] = {
210 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
},
211 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
},
212 {ENUMPINS_NEXT
, SOURCE_FILTER
},
213 {PIN_QUERYDIRECTION
, SOURCE_FILTER
},
214 {PIN_CONNECTEDTO
, SOURCE_FILTER
},
215 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
216 {KSPROPERTYSET_GET
, SOURCE_FILTER
},
217 {PIN_ENUMMEDIATYPES
, SOURCE_FILTER
},
218 {ENUMMEDIATYPES_RESET
, SOURCE_FILTER
},
219 {ENUMMEDIATYPES_NEXT
, SOURCE_FILTER
},
220 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
},
221 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
},
222 {ENUMPINS_NEXT
, SOURCE_FILTER
},
223 {PIN_QUERYDIRECTION
, SOURCE_FILTER
},
224 {PIN_CONNECTEDTO
, SOURCE_FILTER
},
225 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
226 {KSPROPERTYSET_GET
, SOURCE_FILTER
},
227 {ENUMPINS_NEXT
, SOURCE_FILTER
},
228 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
, TRUE
},
229 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
, TRUE
},
230 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
231 {PIN_QUERYDIRECTION
, SOURCE_FILTER
, TRUE
},
232 {PIN_CONNECTEDTO
, SOURCE_FILTER
, TRUE
},
233 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
234 {KSPROPERTYSET_GET
, SOURCE_FILTER
, TRUE
},
235 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
236 {BASEFILTER_QUERYINTERFACE
, SOURCE_FILTER
, TRUE
},
237 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
, TRUE
},
238 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
239 {PIN_QUERYDIRECTION
, SOURCE_FILTER
, TRUE
},
240 {PIN_CONNECTEDTO
, SOURCE_FILTER
, TRUE
},
241 {PIN_QUERYPININFO
, SOURCE_FILTER
, TRUE
},
242 {KSPROPERTYSET_GET
, SOURCE_FILTER
, TRUE
},
243 {ENUMPINS_NEXT
, SOURCE_FILTER
, TRUE
},
244 {PIN_ENUMMEDIATYPES
, SOURCE_FILTER
, TRUE
, FALSE
, TRUE
},
245 {ENUMMEDIATYPES_NEXT
, SOURCE_FILTER
, TRUE
, FALSE
, TRUE
},
246 {BASEFILTER_QUERYINTERFACE
, SINK_FILTER
, FALSE
, TRUE
},
247 {BASEFILTER_ENUMPINS
, SINK_FILTER
},
248 {ENUMPINS_NEXT
, SINK_FILTER
},
249 {PIN_QUERYDIRECTION
, SINK_FILTER
},
250 {PIN_CONNECTEDTO
, SINK_FILTER
},
251 {BASEFILTER_QUERYINTERFACE
, INTERMEDIATE_FILTER
, FALSE
, TRUE
},
252 {BASEFILTER_ENUMPINS
, INTERMEDIATE_FILTER
},
253 {ENUMPINS_NEXT
, INTERMEDIATE_FILTER
},
254 {PIN_QUERYDIRECTION
, INTERMEDIATE_FILTER
},
255 {PIN_CONNECTEDTO
, INTERMEDIATE_FILTER
},
256 {ENUMPINS_NEXT
, INTERMEDIATE_FILTER
},
257 {PIN_QUERYDIRECTION
, INTERMEDIATE_FILTER
},
258 {PIN_CONNECTEDTO
, INTERMEDIATE_FILTER
},
259 {GRAPHBUILDER_CONNECT
, NOT_FILTER
},
260 {BASEFILTER_QUERYINTERFACE
, INTERMEDIATE_FILTER
, FALSE
, TRUE
},
261 {BASEFILTER_ENUMPINS
, INTERMEDIATE_FILTER
},
262 {ENUMPINS_NEXT
, INTERMEDIATE_FILTER
},
263 {PIN_QUERYDIRECTION
, INTERMEDIATE_FILTER
},
264 {PIN_CONNECTEDTO
, INTERMEDIATE_FILTER
},
265 {GRAPHBUILDER_CONNECT
, NOT_FILTER
},
266 {BASEFILTER_GETSTATE
, SOURCE_FILTER
, TRUE
, FALSE
, TRUE
},
267 {BASEFILTER_ENUMPINS
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
268 {ENUMPINS_NEXT
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
269 {PIN_QUERYDIRECTION
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
270 {PIN_CONNECTEDTO
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
271 {ENUMPINS_NEXT
, SOURCE_FILTER
, FALSE
, FALSE
, FALSE
, TRUE
},
273 }, *current_calls_list
;
276 static void check_calls_list(const char *func
, call_id id
, filter_type type
)
278 if(!current_calls_list
)
281 while(current_calls_list
[call_no
].wine_missing
|| current_calls_list
[call_no
].wine_extra
||
282 current_calls_list
[call_no
].optional
|| current_calls_list
[call_no
].broken
) {
283 if(current_calls_list
[call_no
].wine_missing
) {
284 todo_wine
ok((current_calls_list
[call_no
].call_id
== id
&& current_calls_list
[call_no
].filter_type
== type
) ||
285 broken(current_calls_list
[call_no
].optional
&& (current_calls_list
[call_no
].call_id
!= id
||
286 current_calls_list
[call_no
].filter_type
!= type
)),
287 "missing call, got %s(%d), expected %d (%d)\n", func
, id
, current_calls_list
[call_no
].call_id
, call_no
);
289 if(current_calls_list
[call_no
].call_id
!= id
|| current_calls_list
[call_no
].filter_type
!= type
)
293 }else if(current_calls_list
[call_no
].wine_extra
) {
294 todo_wine
ok(current_calls_list
[call_no
].call_id
!= id
|| current_calls_list
[call_no
].filter_type
!= type
,
295 "extra call, got %s(%d) (%d)\n", func
, id
, call_no
);
297 if(current_calls_list
[call_no
].call_id
== id
&& current_calls_list
[call_no
].filter_type
== type
) {
302 }else if(current_calls_list
[call_no
].optional
) {
303 ok((current_calls_list
[call_no
].call_id
== id
&& current_calls_list
[call_no
].filter_type
== type
) ||
304 broken(current_calls_list
[call_no
].call_id
!= id
|| current_calls_list
[call_no
].filter_type
!= type
),
305 "unexpected call: %s on %s (%d)\n", func
, debugstr_filter_type(type
), call_no
);
307 if(current_calls_list
[call_no
].call_id
!= id
|| current_calls_list
[call_no
].filter_type
!= type
)
311 }else if(current_calls_list
[call_no
].broken
) {
312 ok(broken(current_calls_list
[call_no
].call_id
== id
&& current_calls_list
[call_no
].filter_type
== type
) ||
313 (current_calls_list
[call_no
].call_id
!= id
|| current_calls_list
[call_no
].filter_type
!= type
),
314 "unexpected call: %s on %s (%d)\n", func
, debugstr_filter_type(type
), call_no
);
316 if(current_calls_list
[call_no
].call_id
== id
&& current_calls_list
[call_no
].filter_type
== type
)
322 ok(current_calls_list
[call_no
].call_id
== id
, "unexpected call: %s on %s (%d)\n",
323 func
, debugstr_filter_type(type
), call_no
);
324 if(current_calls_list
[call_no
].call_id
!= id
)
327 ok(current_calls_list
[call_no
].filter_type
== type
, "unexpected call: %s on %s (%d)\n",
328 func
, debugstr_filter_type(type
), call_no
);
329 if(current_calls_list
[call_no
].filter_type
!= type
)
335 static HRESULT WINAPI
GraphBuilder_QueryInterface(
336 IGraphBuilder
*iface
, REFIID riid
, void **ppv
)
338 if(IsEqualIID(riid
, &IID_IUnknown
) || IsEqualIID(riid
, &IID_IFilterGraph
)
339 || IsEqualIID(riid
, &IID_IGraphBuilder
))
345 ok(IsEqualIID(riid
, &IID_IMediaEvent
), "QueryInterface(%s)\n", debugstr_guid(riid
));
347 return E_NOINTERFACE
;
350 static ULONG WINAPI
GraphBuilder_AddRef(IGraphBuilder
*iface
)
355 static ULONG WINAPI
GraphBuilder_Release(IGraphBuilder
*iface
)
360 static HRESULT WINAPI
GraphBuilder_AddFilter(IGraphBuilder
*iface
,
361 IBaseFilter
*pFilter
, LPCWSTR pName
)
363 ok(0, "unexpected call\n");
367 static HRESULT WINAPI
GraphBuilder_RemoveFilter(
368 IGraphBuilder
*iface
, IBaseFilter
*pFilter
)
370 ok(0, "unexpected call\n");
374 static HRESULT WINAPI
GraphBuilder_EnumFilters(
375 IGraphBuilder
*iface
, IEnumFilters
**ppEnum
)
377 ok(0, "unexpected call\n");
381 static HRESULT WINAPI
GraphBuilder_FindFilterByName(IGraphBuilder
*iface
,
382 LPCWSTR pName
, IBaseFilter
**ppFilter
)
384 ok(0, "unexpected call\n");
388 static HRESULT WINAPI
GraphBuilder_ConnectDirect(IGraphBuilder
*iface
,
389 IPin
*ppinOut
, IPin
*ppinIn
, const AM_MEDIA_TYPE
*pmt
)
391 ok(0, "unexpected call\n");
395 static HRESULT WINAPI
GraphBuilder_Reconnect(IGraphBuilder
*iface
, IPin
*ppin
)
397 ok(0, "unexpected call\n");
401 static HRESULT WINAPI
GraphBuilder_Disconnect(IGraphBuilder
*iface
, IPin
*ppin
)
403 ok(0, "unexpected call\n");
407 static HRESULT WINAPI
GraphBuilder_SetDefaultSyncSource(IGraphBuilder
*iface
)
409 ok(0, "unexpected call\n");
413 static HRESULT WINAPI
GraphBuilder_Connect(IGraphBuilder
*iface
, IPin
*ppinOut
, IPin
*ppinIn
)
415 check_calls_list("GraphBuilder_Connect", GRAPHBUILDER_CONNECT
, NOT_FILTER
);
419 static HRESULT WINAPI
GraphBuilder_Render(IGraphBuilder
*iface
, IPin
*ppinOut
)
421 ok(0, "unexpected call\n");
425 static HRESULT WINAPI
GraphBuilder_RenderFile(IGraphBuilder
*iface
,
426 LPCWSTR lpcwstrFile
, LPCWSTR lpcwstrPlayList
)
428 ok(0, "unexpected call\n");
432 static HRESULT WINAPI
GraphBuilder_AddSourceFilter(IGraphBuilder
*iface
, LPCWSTR lpcwstrFileName
,
433 LPCWSTR lpcwstrFilterName
, IBaseFilter
**ppFilter
)
435 ok(0, "unexpected call\n");
439 static HRESULT WINAPI
GraphBuilder_SetLogFile(IGraphBuilder
*iface
, DWORD_PTR hFile
)
441 ok(0, "unexpected call\n");
445 static HRESULT WINAPI
GraphBuilder_Abort(IGraphBuilder
*iface
)
447 ok(0, "unexpected call\n");
451 static HRESULT WINAPI
GraphBuilder_ShouldOperationContinue(IGraphBuilder
*iface
)
453 ok(0, "unexpected call\n");
457 static const IGraphBuilderVtbl GraphBuilder_vtbl
= {
458 GraphBuilder_QueryInterface
,
460 GraphBuilder_Release
,
461 GraphBuilder_AddFilter
,
462 GraphBuilder_RemoveFilter
,
463 GraphBuilder_EnumFilters
,
464 GraphBuilder_FindFilterByName
,
465 GraphBuilder_ConnectDirect
,
466 GraphBuilder_Reconnect
,
467 GraphBuilder_Disconnect
,
468 GraphBuilder_SetDefaultSyncSource
,
469 GraphBuilder_Connect
,
471 GraphBuilder_RenderFile
,
472 GraphBuilder_AddSourceFilter
,
473 GraphBuilder_SetLogFile
,
475 GraphBuilder_ShouldOperationContinue
478 static IGraphBuilder GraphBuilder
= {&GraphBuilder_vtbl
};
481 IBaseFilter IBaseFilter_iface
;
482 IEnumPins IEnumPins_iface
;
484 IKsPropertySet IKsPropertySet_iface
;
485 IEnumMediaTypes IEnumMediaTypes_iface
;
488 filter_type filter_type
;
491 int enum_media_types_pos
;
494 static test_filter
* impl_from_IBaseFilter(IBaseFilter
*iface
)
496 return CONTAINING_RECORD(iface
, test_filter
, IBaseFilter_iface
);
499 static HRESULT WINAPI
BaseFilter_QueryInterface(IBaseFilter
*iface
, REFIID riid
, void **ppv
)
501 test_filter
*This
= impl_from_IBaseFilter(iface
);
503 if(IsEqualIID(riid
, &IID_IUnknown
) || IsEqualIID(riid
, &IID_IPersist
)
504 || IsEqualIID(riid
, &IID_IMediaFilter
) || IsEqualIID(riid
, &IID_IBaseFilter
)) {
509 check_calls_list("BaseFilter_QueryInterface", BASEFILTER_QUERYINTERFACE
, This
->filter_type
);
510 ok(IsEqualIID(riid
, &IID_IPin
), "riid = %s\n", debugstr_guid(riid
));
511 return E_NOINTERFACE
;
514 static ULONG WINAPI
BaseFilter_AddRef(IBaseFilter
*iface
)
519 static ULONG WINAPI
BaseFilter_Release(IBaseFilter
*iface
)
524 static HRESULT WINAPI
BaseFilter_GetClassID(IBaseFilter
*iface
, CLSID
*pClassID
)
526 ok(0, "unexpected call\n");
530 static HRESULT WINAPI
BaseFilter_Stop(IBaseFilter
*iface
)
532 ok(0, "unexpected call\n");
536 static HRESULT WINAPI
BaseFilter_Pause(IBaseFilter
*iface
)
538 ok(0, "unexpected call\n");
542 static HRESULT WINAPI
BaseFilter_Run(IBaseFilter
*iface
, REFERENCE_TIME tStart
)
544 ok(0, "unexpected call\n");
548 static HRESULT WINAPI
BaseFilter_GetState(IBaseFilter
*iface
,
549 DWORD dwMilliSecsTimeout
, FILTER_STATE
*State
)
551 test_filter
*This
= impl_from_IBaseFilter(iface
);
552 check_calls_list("BaseFilter_GetState", BASEFILTER_GETSTATE
, This
->filter_type
);
556 static HRESULT WINAPI
BaseFilter_SetSyncSource(
557 IBaseFilter
*iface
, IReferenceClock
*pClock
)
559 ok(0, "unexpected call\n");
563 static HRESULT WINAPI
BaseFilter_GetSyncSource(
564 IBaseFilter
*iface
, IReferenceClock
**pClock
)
566 ok(0, "unexpected call\n");
570 static HRESULT WINAPI
BaseFilter_EnumPins(
571 IBaseFilter
*iface
, IEnumPins
**ppEnum
)
573 test_filter
*This
= impl_from_IBaseFilter(iface
);
574 check_calls_list("BaseFilter_EnumPins", BASEFILTER_ENUMPINS
, This
->filter_type
);
576 *ppEnum
= &This
->IEnumPins_iface
;
577 This
->enum_pins_pos
= 0;
581 static HRESULT WINAPI
BaseFilter_FindPin(IBaseFilter
*iface
,
582 LPCWSTR Id
, IPin
**ppPin
)
584 ok(0, "unexpected call\n");
588 static HRESULT WINAPI
BaseFilter_QueryFilterInfo(IBaseFilter
*iface
, FILTER_INFO
*pInfo
)
590 ok(0, "unexpected call\n");
594 static HRESULT WINAPI
BaseFilter_JoinFilterGraph(IBaseFilter
*iface
,
595 IFilterGraph
*pGraph
, LPCWSTR pName
)
597 ok(0, "unexpected call\n");
601 static HRESULT WINAPI
BaseFilter_QueryVendorInfo(IBaseFilter
*iface
, LPWSTR
*pVendorInfo
)
603 ok(0, "unexpected call\n");
607 static const IBaseFilterVtbl BaseFilterVtbl
= {
608 BaseFilter_QueryInterface
,
611 BaseFilter_GetClassID
,
616 BaseFilter_SetSyncSource
,
617 BaseFilter_GetSyncSource
,
620 BaseFilter_QueryFilterInfo
,
621 BaseFilter_JoinFilterGraph
,
622 BaseFilter_QueryVendorInfo
625 static test_filter
* impl_from_IEnumPins(IEnumPins
*iface
)
627 return CONTAINING_RECORD(iface
, test_filter
, IEnumPins_iface
);
630 static HRESULT WINAPI
EnumPins_QueryInterface(IEnumPins
*iface
, REFIID riid
, void **ppv
)
632 ok(0, "unexpected call\n");
636 static ULONG WINAPI
EnumPins_AddRef(IEnumPins
*iface
)
641 static ULONG WINAPI
EnumPins_Release(IEnumPins
*iface
)
646 static HRESULT WINAPI
EnumPins_Next(IEnumPins
*iface
,
647 ULONG cPins
, IPin
**ppPins
, ULONG
*pcFetched
)
649 test_filter
*This
= impl_from_IEnumPins(iface
);
650 check_calls_list("EnumPins_Next", ENUMPINS_NEXT
, This
->filter_type
);
652 ok(cPins
== 1, "cPins = %d\n", cPins
);
653 ok(ppPins
!= NULL
, "ppPins == NULL\n");
654 ok(pcFetched
!= NULL
, "pcFetched == NULL\n");
656 if(This
->enum_pins_pos
++ < (This
->filter_type
== INTERMEDIATE_FILTER
? 2 : 1)) {
657 *ppPins
= &This
->IPin_iface
;
665 static HRESULT WINAPI
EnumPins_Skip(IEnumPins
*iface
, ULONG cPins
)
667 ok(0, "unexpected call\n");
671 static HRESULT WINAPI
EnumPins_Reset(IEnumPins
*iface
)
673 ok(0, "unexpected call\n");
677 static HRESULT WINAPI
EnumPins_Clone(IEnumPins
*iface
, IEnumPins
**ppEnum
)
679 ok(0, "unexpected call\n");
683 static const IEnumPinsVtbl EnumPinsVtbl
= {
684 EnumPins_QueryInterface
,
693 static test_filter
* impl_from_IPin(IPin
*iface
)
695 return CONTAINING_RECORD(iface
, test_filter
, IPin_iface
);
698 static HRESULT WINAPI
Pin_QueryInterface(IPin
*iface
, REFIID riid
, void **ppv
)
700 test_filter
*This
= impl_from_IPin(iface
);
702 if(IsEqualIID(riid
, &IID_IUnknown
) || IsEqualIID(riid
, &IID_IPin
)) {
707 if(IsEqualIID(riid
, &IID_IKsPropertySet
)) {
708 *ppv
= &This
->IKsPropertySet_iface
;
712 ok(0, "unexpected call\n");
714 return E_NOINTERFACE
;
717 static ULONG WINAPI
Pin_AddRef(IPin
*iface
)
722 static ULONG WINAPI
Pin_Release(IPin
*iface
)
727 static HRESULT WINAPI
Pin_Connect(IPin
*iface
, IPin
*pReceivePin
, const AM_MEDIA_TYPE
*pmt
)
729 ok(0, "unexpected call\n");
733 static HRESULT WINAPI
Pin_ReceiveConnection(IPin
*iface
,
734 IPin
*pConnector
, const AM_MEDIA_TYPE
*pmt
)
736 ok(0, "unexpected call\n");
740 static HRESULT WINAPI
Pin_Disconnect(IPin
*iface
)
742 ok(0, "unexpected call\n");
746 static HRESULT WINAPI
Pin_ConnectedTo(IPin
*iface
, IPin
**pPin
)
748 test_filter
*This
= impl_from_IPin(iface
);
749 check_calls_list("Pin_ConnectedTo", PIN_CONNECTEDTO
, This
->filter_type
);
755 static HRESULT WINAPI
Pin_ConnectionMediaType(IPin
*iface
, AM_MEDIA_TYPE
*pmt
)
757 ok(0, "unexpected call\n");
761 static HRESULT WINAPI
Pin_QueryPinInfo(IPin
*iface
, PIN_INFO
*pInfo
)
763 test_filter
*This
= impl_from_IPin(iface
);
764 check_calls_list("Pin_QueryPinInfo", PIN_QUERYPININFO
, This
->filter_type
);
768 static HRESULT WINAPI
Pin_QueryDirection(IPin
*iface
, PIN_DIRECTION
*pPinDir
)
770 test_filter
*This
= impl_from_IPin(iface
);
771 check_calls_list("Pin_QueryDirection", PIN_QUERYDIRECTION
, This
->filter_type
);
773 *pPinDir
= This
->dir
;
774 if(This
->filter_type
==INTERMEDIATE_FILTER
&& This
->enum_pins_pos
==2)
775 *pPinDir
= PINDIR_INPUT
;
779 static HRESULT WINAPI
Pin_QueryId(IPin
*iface
, LPWSTR
*Id
)
781 ok(0, "unexpected call\n");
785 static HRESULT WINAPI
Pin_QueryAccept(IPin
*iface
, const AM_MEDIA_TYPE
*pmt
)
787 ok(0, "unexpected call\n");
791 static HRESULT WINAPI
Pin_EnumMediaTypes(IPin
*iface
, IEnumMediaTypes
**ppEnum
)
793 test_filter
*This
= impl_from_IPin(iface
);
794 check_calls_list("Pin_EnumMediaTypes", PIN_ENUMMEDIATYPES
, This
->filter_type
);
796 ok(ppEnum
!= NULL
, "ppEnum == NULL\n");
797 *ppEnum
= &This
->IEnumMediaTypes_iface
;
801 static HRESULT WINAPI
Pin_QueryInternalConnections(IPin
*iface
, IPin
**apPin
, ULONG
*nPin
)
803 ok(0, "unexpected call\n");
807 static HRESULT WINAPI
Pin_EndOfStream(IPin
*iface
)
809 ok(0, "unexpected call\n");
813 static HRESULT WINAPI
Pin_BeginFlush(IPin
*iface
)
815 ok(0, "unexpected call\n");
819 static HRESULT WINAPI
Pin_EndFlush(IPin
*iface
)
821 ok(0, "unexpected call\n");
825 static HRESULT WINAPI
Pin_NewSegment(IPin
*iface
, REFERENCE_TIME tStart
,
826 REFERENCE_TIME tStop
, double dRate
)
828 ok(0, "unexpected call\n");
832 static const IPinVtbl PinVtbl
= {
837 Pin_ReceiveConnection
,
840 Pin_ConnectionMediaType
,
846 Pin_QueryInternalConnections
,
853 static test_filter
* impl_from_IKsPropertySet(IKsPropertySet
*iface
)
855 return CONTAINING_RECORD(iface
, test_filter
, IKsPropertySet_iface
);
858 static HRESULT WINAPI
KsPropertySet_QueryInterface(IKsPropertySet
*iface
, REFIID riid
, void **ppv
)
860 ok(0, "unexpected call\n");
864 static ULONG WINAPI
KsPropertySet_AddRef(IKsPropertySet
*iface
)
869 static ULONG WINAPI
KsPropertySet_Release(IKsPropertySet
*iface
)
874 static HRESULT WINAPI
KsPropertySet_Set(IKsPropertySet
*iface
, REFGUID guidPropSet
, DWORD dwPropID
,
875 LPVOID pInstanceData
, DWORD cbInstanceData
, LPVOID pPropData
, DWORD cbPropData
)
877 ok(0, "unexpected call\n");
881 static HRESULT WINAPI
KsPropertySet_Get(IKsPropertySet
*iface
, REFGUID guidPropSet
, DWORD dwPropID
,
882 LPVOID pInstanceData
, DWORD cbInstanceData
, LPVOID pPropData
, DWORD cbPropData
, DWORD
*pcbReturned
)
884 test_filter
*This
= impl_from_IKsPropertySet(iface
);
885 check_calls_list("KsPropertySet_Get", KSPROPERTYSET_GET
, This
->filter_type
);
887 ok(IsEqualIID(guidPropSet
, &ROPSETID_Pin
), "guidPropSet = %s\n", debugstr_guid(guidPropSet
));
888 ok(dwPropID
== 0, "dwPropID = %d\n", dwPropID
);
889 ok(pInstanceData
== NULL
, "pInstanceData != NULL\n");
890 ok(cbInstanceData
== 0, "cbInstanceData != 0\n");
891 ok(cbPropData
== sizeof(GUID
), "cbPropData = %d\n", cbPropData
);
892 *pcbReturned
= sizeof(GUID
);
893 memcpy(pPropData
, &PIN_CATEGORY_EDS
, sizeof(GUID
));
897 static HRESULT WINAPI
KsPropertySet_QuerySupported(IKsPropertySet
*iface
,
898 REFGUID guidPropSet
, DWORD dwPropID
, DWORD
*pTypeSupport
)
900 ok(0, "unexpected call\n");
904 static const IKsPropertySetVtbl KsPropertySetVtbl
= {
905 KsPropertySet_QueryInterface
,
906 KsPropertySet_AddRef
,
907 KsPropertySet_Release
,
910 KsPropertySet_QuerySupported
913 static test_filter
* impl_from_IEnumMediaTypes(IEnumMediaTypes
*iface
)
915 return CONTAINING_RECORD(iface
, test_filter
, IEnumMediaTypes_iface
);
918 static HRESULT WINAPI
EnumMediaTypes_QueryInterface(IEnumMediaTypes
*iface
, REFIID riid
, void **ppv
)
920 ok(0, "unexpected call\n");
924 static ULONG WINAPI
EnumMediaTypes_AddRef(IEnumMediaTypes
*iface
)
929 static ULONG WINAPI
EnumMediaTypes_Release(IEnumMediaTypes
*iface
)
934 static HRESULT WINAPI
EnumMediaTypes_Next(IEnumMediaTypes
*iface
, ULONG cMediaTypes
,
935 AM_MEDIA_TYPE
**ppMediaTypes
, ULONG
*pcFetched
)
937 test_filter
*This
= impl_from_IEnumMediaTypes(iface
);
938 check_calls_list("EnumMediaTypes_Next", ENUMMEDIATYPES_NEXT
, This
->filter_type
);
940 ok(cMediaTypes
== 1, "cMediaTypes = %d\n", cMediaTypes
);
941 ok(ppMediaTypes
!= NULL
, "ppMediaTypes == NULL\n");
942 ok(pcFetched
!= NULL
, "pcFetched == NULL\n");
944 if(!This
->enum_media_types_pos
++) {
945 ppMediaTypes
[0] = CoTaskMemAlloc(sizeof(AM_MEDIA_TYPE
));
946 memset(ppMediaTypes
[0], 0, sizeof(AM_MEDIA_TYPE
));
947 ppMediaTypes
[0]->majortype
= MEDIATYPE_Video
;
956 static HRESULT WINAPI
EnumMediaTypes_Skip(IEnumMediaTypes
*iface
, ULONG cMediaTypes
)
958 ok(0, "unexpected call\n");
962 static HRESULT WINAPI
EnumMediaTypes_Reset(IEnumMediaTypes
*iface
)
964 test_filter
*This
= impl_from_IEnumMediaTypes(iface
);
965 check_calls_list("EnumMediaTypes_Reset", ENUMMEDIATYPES_RESET
, This
->filter_type
);
967 This
->enum_media_types_pos
= 0;
971 static HRESULT WINAPI
EnumMediaTypes_Clone(IEnumMediaTypes
*iface
, IEnumMediaTypes
**ppEnum
)
973 ok(0, "unexpected call\n");
977 static const IEnumMediaTypesVtbl EnumMediaTypesVtbl
= {
978 EnumMediaTypes_QueryInterface
,
979 EnumMediaTypes_AddRef
,
980 EnumMediaTypes_Release
,
983 EnumMediaTypes_Reset
,
987 static void test_CaptureGraphBuilder_RenderStream(void)
989 test_filter source_filter
= {{&BaseFilterVtbl
}, {&EnumPinsVtbl
}, {&PinVtbl
},
990 {&KsPropertySetVtbl
}, {&EnumMediaTypesVtbl
}, PINDIR_OUTPUT
, SOURCE_FILTER
};
991 test_filter sink_filter
= {{&BaseFilterVtbl
}, {&EnumPinsVtbl
}, {&PinVtbl
},
992 {&KsPropertySetVtbl
}, {&EnumMediaTypesVtbl
}, PINDIR_INPUT
, SINK_FILTER
};
993 test_filter intermediate_filter
= {{&BaseFilterVtbl
}, {&EnumPinsVtbl
}, {&PinVtbl
},
994 {&KsPropertySetVtbl
}, {&EnumMediaTypesVtbl
}, PINDIR_OUTPUT
, INTERMEDIATE_FILTER
};
995 ICaptureGraphBuilder2
*cgb
;
998 hr
= CoCreateInstance(&CLSID_CaptureGraphBuilder2
, NULL
, CLSCTX_INPROC_SERVER
,
999 &IID_ICaptureGraphBuilder2
, (void**)&cgb
);
1000 ok(hr
== S_OK
|| broken(hr
== REGDB_E_CLASSNOTREG
),
1001 "couldn't create CaptureGraphBuilder, hr = %08x\n", hr
);
1003 win_skip("CaptureGraphBuilder is not registered\n");
1007 hr
= ICaptureGraphBuilder2_SetFiltergraph(cgb
, &GraphBuilder
);
1008 ok(hr
== S_OK
, "SetFiltergraph failed: %08x\n", hr
);
1010 trace("RenderStream with category and mediatype test\n");
1011 current_calls_list
= renderstream_cat_media
;
1013 hr
= ICaptureGraphBuilder2_RenderStream(cgb
, &PIN_CATEGORY_EDS
,
1014 &MEDIATYPE_Video
, (IUnknown
*)&source_filter
.IBaseFilter_iface
,
1015 NULL
, &sink_filter
.IBaseFilter_iface
);
1016 ok(hr
== S_OK
, "RenderStream failed: %08x\n", hr
);
1017 check_calls_list("test_CaptureGraphBuilder_RenderStream", END
, NOT_FILTER
);
1019 trace("RenderStream with intermediate filter\n");
1020 current_calls_list
= renderstream_intermediate
;
1022 hr
= ICaptureGraphBuilder2_RenderStream(cgb
, &PIN_CATEGORY_EDS
,
1023 &MEDIATYPE_Video
, (IUnknown
*)&source_filter
.IBaseFilter_iface
,
1024 &intermediate_filter
.IBaseFilter_iface
, &sink_filter
.IBaseFilter_iface
);
1025 ok(hr
== S_OK
, "RenderStream failed: %08x\n", hr
);
1026 check_calls_list("test_CaptureGraphBuilder_RenderStream", END
, NOT_FILTER
);
1028 ICaptureGraphBuilder2_Release(cgb
);
1031 static void test_AviMux_QueryInterface(void)
1033 IUnknown
*avimux
, *unk
;
1036 hr
= CoCreateInstance(&CLSID_AviDest
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IUnknown
, (void**)&avimux
);
1037 ok(hr
== S_OK
|| broken(hr
== REGDB_E_CLASSNOTREG
),
1038 "couldn't create AVI Mux filter, hr = %08x\n", hr
);
1040 win_skip("AVI Mux filter is not registered\n");
1044 hr
= IUnknown_QueryInterface(avimux
, &IID_IBaseFilter
, (void**)&unk
);
1045 ok(hr
== S_OK
, "QueryInterface(IID_IBaseFilter) failed: %x\n", hr
);
1046 IUnknown_Release(unk
);
1048 hr
= IUnknown_QueryInterface(avimux
, &IID_IConfigAviMux
, (void**)&unk
);
1049 ok(hr
== S_OK
, "QueryInterface(IID_IConfigAviMux) failed: %x\n", hr
);
1050 IUnknown_Release(unk
);
1052 hr
= IUnknown_QueryInterface(avimux
, &IID_IConfigInterleaving
, (void**)&unk
);
1053 ok(hr
== S_OK
, "QueryInterface(IID_IConfigInterleaving) failed: %x\n", hr
);
1054 IUnknown_Release(unk
);
1056 hr
= IUnknown_QueryInterface(avimux
, &IID_IMediaSeeking
, (void**)&unk
);
1057 ok(hr
== S_OK
, "QueryInterface(IID_IMediaSeeking) failed: %x\n", hr
);
1058 IUnknown_Release(unk
);
1060 hr
= IUnknown_QueryInterface(avimux
, &IID_IPersistMediaPropertyBag
, (void**)&unk
);
1061 ok(hr
== S_OK
, "QueryInterface(IID_IPersistMediaPropertyBag) failed: %x\n", hr
);
1062 IUnknown_Release(unk
);
1064 hr
= IUnknown_QueryInterface(avimux
, &IID_ISpecifyPropertyPages
, (void**)&unk
);
1065 ok(hr
== S_OK
, "QueryInterface(IID_ISpecifyPropertyPages) failed: %x\n", hr
);
1066 IUnknown_Release(unk
);
1068 IUnknown_Release(avimux
);
1071 static void test_AviMux(void)
1073 test_filter source_filter
= {{&BaseFilterVtbl
}, {&EnumPinsVtbl
}, {&PinVtbl
},
1074 {&KsPropertySetVtbl
}, {&EnumMediaTypesVtbl
}, PINDIR_OUTPUT
, SOURCE_FILTER
};
1075 VIDEOINFOHEADER videoinfoheader
;
1076 IPin
*avimux_in
, *avimux_out
, *pin
;
1077 AM_MEDIA_TYPE source_media_type
;
1078 AM_MEDIA_TYPE
*media_type
;
1080 IBaseFilter
*avimux
;
1082 IEnumMediaTypes
*emt
;
1085 hr
= CoCreateInstance(&CLSID_AviDest
, NULL
, CLSCTX_INPROC_SERVER
, &IID_IBaseFilter
, (void**)&avimux
);
1086 ok(hr
== S_OK
|| broken(hr
== REGDB_E_CLASSNOTREG
),
1087 "couldn't create AVI Mux filter, hr = %08x\n", hr
);
1089 win_skip("AVI Mux filter is not registered\n");
1093 hr
= IBaseFilter_EnumPins(avimux
, &ep
);
1094 ok(hr
== S_OK
, "EnumPins returned %x\n", hr
);
1096 hr
= IEnumPins_Next(ep
, 1, &avimux_out
, NULL
);
1097 ok(hr
== S_OK
, "Next returned %x\n", hr
);
1098 hr
= IPin_QueryDirection(avimux_out
, &dir
);
1099 ok(hr
== S_OK
, "QueryDirection returned %x\n", hr
);
1100 ok(dir
== PINDIR_OUTPUT
, "dir = %d\n", dir
);
1102 hr
= IEnumPins_Next(ep
, 1, &avimux_in
, NULL
);
1103 ok(hr
== S_OK
, "Next returned %x\n", hr
);
1104 hr
= IPin_QueryDirection(avimux_in
, &dir
);
1105 ok(hr
== S_OK
, "QueryDirection returned %x\n", hr
);
1106 ok(dir
== PINDIR_INPUT
, "dir = %d\n", dir
);
1107 IEnumPins_Release(ep
);
1109 hr
= IPin_EnumMediaTypes(avimux_out
, &emt
);
1110 ok(hr
== S_OK
, "EnumMediaTypes returned %x\n", hr
);
1111 hr
= IEnumMediaTypes_Next(emt
, 1, &media_type
, NULL
);
1112 ok(hr
== S_OK
, "Next returned %x\n", hr
);
1113 ok(IsEqualIID(&media_type
->majortype
, &MEDIATYPE_Stream
), "majortype = %s\n",
1114 debugstr_guid(&media_type
->majortype
));
1115 ok(IsEqualIID(&media_type
->subtype
, &MEDIASUBTYPE_Avi
), "subtype = %s\n",
1116 debugstr_guid(&media_type
->subtype
));
1117 ok(media_type
->bFixedSizeSamples
, "bFixedSizeSamples = %x\n", media_type
->bFixedSizeSamples
);
1118 ok(!media_type
->bTemporalCompression
, "bTemporalCompression = %x\n", media_type
->bTemporalCompression
);
1119 ok(media_type
->lSampleSize
== 1, "lSampleSize = %d\n", media_type
->lSampleSize
);
1120 ok(IsEqualIID(&media_type
->formattype
, &GUID_NULL
), "formattype = %s\n",
1121 debugstr_guid(&media_type
->formattype
));
1122 ok(!media_type
->pUnk
, "pUnk = %p\n", media_type
->pUnk
);
1123 ok(!media_type
->cbFormat
, "cbFormat = %d\n", media_type
->cbFormat
);
1124 ok(!media_type
->pbFormat
, "pbFormat = %p\n", media_type
->pbFormat
);
1125 CoTaskMemFree(media_type
);
1126 hr
= IEnumMediaTypes_Next(emt
, 1, &media_type
, NULL
);
1127 ok(hr
== S_FALSE
, "Next returned %x\n", hr
);
1128 IEnumMediaTypes_Release(emt
);
1130 hr
= IPin_EnumMediaTypes(avimux_in
, &emt
);
1131 ok(hr
== S_OK
, "EnumMediaTypes returned %x\n", hr
);
1132 hr
= IEnumMediaTypes_Reset(emt
);
1133 ok(hr
== S_OK
, "Reset returned %x\n", hr
);
1134 hr
= IEnumMediaTypes_Next(emt
, 1, &media_type
, NULL
);
1135 ok(hr
== S_FALSE
, "Next returned %x\n", hr
);
1136 IEnumMediaTypes_Release(emt
);
1138 hr
= IPin_ReceiveConnection(avimux_in
, &source_filter
.IPin_iface
, NULL
);
1139 ok(hr
== E_POINTER
, "ReceiveConnection returned %x\n", hr
);
1141 current_calls_list
= NULL
;
1142 memset(&source_media_type
, 0, sizeof(AM_MEDIA_TYPE
));
1143 memset(&videoinfoheader
, 0, sizeof(VIDEOINFOHEADER
));
1144 source_media_type
.majortype
= MEDIATYPE_Video
;
1145 source_media_type
.subtype
= MEDIASUBTYPE_RGB32
;
1146 source_media_type
.formattype
= FORMAT_VideoInfo
;
1147 source_media_type
.bFixedSizeSamples
= TRUE
;
1148 source_media_type
.lSampleSize
= 40000;
1149 source_media_type
.cbFormat
= sizeof(VIDEOINFOHEADER
);
1150 source_media_type
.pbFormat
= (BYTE
*)&videoinfoheader
;
1151 videoinfoheader
.AvgTimePerFrame
= 333333;
1152 videoinfoheader
.bmiHeader
.biSize
= sizeof(BITMAPINFOHEADER
);
1153 videoinfoheader
.bmiHeader
.biWidth
= 100;
1154 videoinfoheader
.bmiHeader
.biHeight
= 100;
1155 videoinfoheader
.bmiHeader
.biPlanes
= 1;
1156 videoinfoheader
.bmiHeader
.biBitCount
= 32;
1157 videoinfoheader
.bmiHeader
.biSizeImage
= 40000;
1158 videoinfoheader
.bmiHeader
.biClrImportant
= 256;
1159 hr
= IPin_ReceiveConnection(avimux_in
, &source_filter
.IPin_iface
, &source_media_type
);
1160 ok(hr
== S_OK
, "ReceiveConnection returned %x\n", hr
);
1162 hr
= IPin_ConnectedTo(avimux_in
, &pin
);
1163 ok(hr
== S_OK
, "ConnectedTo returned %x\n", hr
);
1164 ok(pin
== &source_filter
.IPin_iface
, "incorrect pin: %p, expected %p\n",
1165 pin
, &source_filter
.IPin_iface
);
1167 IPin_Release(avimux_in
);
1168 IPin_Release(avimux_out
);
1169 IBaseFilter_Release(avimux
);
1174 if (SUCCEEDED(CoInitialize(NULL
)))
1176 test_smart_tee_filter();
1177 test_CaptureGraphBuilder_RenderStream();
1178 test_AviMux_QueryInterface();
1183 skip("CoInitialize failed\n");