61 ok(
res != 0,
"couldn't find resource\n" );
75 ok(
hr ==
S_OK,
"Failed to create FilterGraph: %#x\n",
hr);
82 LONG video_width, video_height, window_width;
86 hr = IFilterGraph2_QueryInterface(graph, &IID_IBasicVideo, (
void **)&pbv);
87 ok(
hr==
S_OK,
"Cannot get IBasicVideo interface returned: %x\n",
hr);
90 hr = IBasicVideo_GetVideoSize(pbv,
NULL,
NULL);
92 hr = IBasicVideo_GetVideoSize(pbv, &video_width,
NULL);
94 hr = IBasicVideo_GetVideoSize(pbv,
NULL, &video_height);
96 hr = IBasicVideo_GetVideoSize(pbv, &video_width, &video_height);
97 ok(
hr==
S_OK,
"Cannot get video size returned: %x\n",
hr);
101 ok(
hr ==
E_POINTER,
"IBasicVideo_GetSourcePosition returned: %x\n",
hr);
103 ok(
hr ==
E_POINTER,
"IBasicVideo_GetSourcePosition returned: %x\n",
hr);
105 ok(
hr ==
E_POINTER,
"IBasicVideo_GetSourcePosition returned: %x\n",
hr);
107 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
109 ok(
top == 0,
"expected 0, got %d\n",
top);
110 ok(
width == video_width,
"expected %d, got %d\n", video_width,
width);
111 ok(
height == video_height,
"expected %d, got %d\n", video_height,
height);
113 hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, 0, 0);
115 hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, video_width*2, video_height*2);
117 hr = IBasicVideo_put_SourceTop(pbv, -1);
119 hr = IBasicVideo_put_SourceTop(pbv, 0);
120 ok(
hr==
S_OK,
"Cannot put source top returned: %x\n",
hr);
121 hr = IBasicVideo_put_SourceTop(pbv, 1);
124 hr = IBasicVideo_SetSourcePosition(pbv, video_width, 0, video_width, video_height);
126 hr = IBasicVideo_SetSourcePosition(pbv, 0, video_height, video_width, video_height);
128 hr = IBasicVideo_SetSourcePosition(pbv, -1, 0, video_width, video_height);
130 hr = IBasicVideo_SetSourcePosition(pbv, 0, -1, video_width, video_height);
132 hr = IBasicVideo_SetSourcePosition(pbv, video_width/2, video_height/2, video_width, video_height);
134 hr = IBasicVideo_SetSourcePosition(pbv, video_width/2, video_height/2, video_width, video_height);
137 hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, video_width, video_height+1);
139 hr = IBasicVideo_SetSourcePosition(pbv, 0, 0, video_width+1, video_height);
142 hr = IBasicVideo_SetSourcePosition(pbv, video_width/2, video_height/2, video_width/3+1, video_height/3+1);
143 ok(
hr==
S_OK,
"Cannot set source position returned: %x\n",
hr);
145 hr = IBasicVideo_get_SourceLeft(pbv, &
left);
146 ok(
hr==
S_OK,
"Cannot get source left returned: %x\n",
hr);
147 ok(
left==video_width/2,
"expected %d, got %d\n", video_width/2,
left);
148 hr = IBasicVideo_get_SourceTop(pbv, &
top);
149 ok(
hr==
S_OK,
"Cannot get source top returned: %x\n",
hr);
150 ok(
top==video_height/2,
"expected %d, got %d\n", video_height/2,
top);
151 hr = IBasicVideo_get_SourceWidth(pbv, &
width);
152 ok(
hr==
S_OK,
"Cannot get source width returned: %x\n",
hr);
153 ok(
width==video_width/3+1,
"expected %d, got %d\n", video_width/3+1,
width);
154 hr = IBasicVideo_get_SourceHeight(pbv, &
height);
155 ok(
hr==
S_OK,
"Cannot get source height returned: %x\n",
hr);
156 ok(
height==video_height/3+1,
"expected %d, got %d\n", video_height/3+1,
height);
158 hr = IBasicVideo_put_SourceLeft(pbv, video_width/3);
159 ok(
hr==
S_OK,
"Cannot put source left returned: %x\n",
hr);
161 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
162 ok(
left == video_width/3,
"expected %d, got %d\n", video_width/3,
left);
163 ok(
width == video_width/3+1,
"expected %d, got %d\n", video_width/3+1,
width);
165 hr = IBasicVideo_put_SourceTop(pbv, video_height/3);
166 ok(
hr==
S_OK,
"Cannot put source top returned: %x\n",
hr);
168 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
169 ok(
top == video_height/3,
"expected %d, got %d\n", video_height/3,
top);
170 ok(
height == video_height/3+1,
"expected %d, got %d\n", video_height/3+1,
height);
172 hr = IBasicVideo_put_SourceWidth(pbv, video_width/4+1);
173 ok(
hr==
S_OK,
"Cannot put source width returned: %x\n",
hr);
175 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
176 ok(
left == video_width/3,
"expected %d, got %d\n", video_width/3,
left);
177 ok(
width == video_width/4+1,
"expected %d, got %d\n", video_width/4+1,
width);
179 hr = IBasicVideo_put_SourceHeight(pbv, video_height/4+1);
180 ok(
hr==
S_OK,
"Cannot put source height returned: %x\n",
hr);
182 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
183 ok(
top == video_height/3,
"expected %d, got %d\n", video_height/3,
top);
184 ok(
height == video_height/4+1,
"expected %d, got %d\n", video_height/4+1,
height);
190 ok(
hr ==
E_POINTER,
"IBasicVideo_GetDestinationPosition returned: %x\n",
hr);
192 ok(
hr ==
E_POINTER,
"IBasicVideo_GetDestinationPosition returned: %x\n",
hr);
194 ok(
hr ==
E_POINTER,
"IBasicVideo_GetDestinationPosition returned: %x\n",
hr);
196 ok(
hr ==
S_OK,
"Cannot get destination position returned: %x\n",
hr);
198 ok(
top == 0,
"expected 0, got %d\n",
top);
202 hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, 0, 0);
204 hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width*2, video_height*2);
205 ok(
hr==
S_OK,
"Cannot put destination position returned: %x\n",
hr);
207 hr = IBasicVideo_put_DestinationLeft(pbv, -1);
208 ok(
hr==
S_OK,
"Cannot put destination left returned: %x\n",
hr);
209 hr = IBasicVideo_put_DestinationLeft(pbv, 0);
210 ok(
hr==
S_OK,
"Cannot put destination left returned: %x\n",
hr);
211 hr = IBasicVideo_put_DestinationLeft(pbv, 1);
212 ok(
hr==
S_OK,
"Cannot put destination left returned: %x\n",
hr);
214 hr = IBasicVideo_SetDestinationPosition(pbv, video_width, 0, video_width, video_height);
215 ok(
hr==
S_OK,
"Cannot set destinaiton position returned: %x\n",
hr);
216 hr = IBasicVideo_SetDestinationPosition(pbv, 0, video_height, video_width, video_height);
217 ok(
hr==
S_OK,
"Cannot set destinaiton position returned: %x\n",
hr);
218 hr = IBasicVideo_SetDestinationPosition(pbv, -1, 0, video_width, video_height);
219 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
220 hr = IBasicVideo_SetDestinationPosition(pbv, 0, -1, video_width, video_height);
221 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
222 hr = IBasicVideo_SetDestinationPosition(pbv, video_width/2, video_height/2, video_width, video_height);
223 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
224 hr = IBasicVideo_SetDestinationPosition(pbv, video_width/2, video_height/2, video_width, video_height);
225 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
227 hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width, video_height+1);
228 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
229 hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width+1, video_height);
230 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
232 hr = IBasicVideo_SetDestinationPosition(pbv, video_width/2, video_height/2, video_width/3+1, video_height/3+1);
233 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
235 hr = IBasicVideo_get_DestinationLeft(pbv, &
left);
236 ok(
hr==
S_OK,
"Cannot get destination left returned: %x\n",
hr);
237 ok(
left==video_width/2,
"expected %d, got %d\n", video_width/2,
left);
238 hr = IBasicVideo_get_DestinationTop(pbv, &
top);
239 ok(
hr==
S_OK,
"Cannot get destination top returned: %x\n",
hr);
240 ok(
top==video_height/2,
"expected %d, got %d\n", video_height/2,
top);
241 hr = IBasicVideo_get_DestinationWidth(pbv, &
width);
242 ok(
hr==
S_OK,
"Cannot get destination width returned: %x\n",
hr);
243 ok(
width==video_width/3+1,
"expected %d, got %d\n", video_width/3+1,
width);
244 hr = IBasicVideo_get_DestinationHeight(pbv, &
height);
245 ok(
hr==
S_OK,
"Cannot get destination height returned: %x\n",
hr);
246 ok(
height==video_height/3+1,
"expected %d, got %d\n", video_height/3+1,
height);
248 hr = IBasicVideo_put_DestinationLeft(pbv, video_width/3);
249 ok(
hr==
S_OK,
"Cannot put destination left returned: %x\n",
hr);
251 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
252 ok(
left == video_width/3,
"expected %d, got %d\n", video_width/3,
left);
253 ok(
width == video_width/3+1,
"expected %d, got %d\n", video_width/3+1,
width);
255 hr = IBasicVideo_put_DestinationTop(pbv, video_height/3);
256 ok(
hr==
S_OK,
"Cannot put destination top returned: %x\n",
hr);
258 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
259 ok(
top == video_height/3,
"expected %d, got %d\n", video_height/3,
top);
260 ok(
height == video_height/3+1,
"expected %d, got %d\n", video_height/3+1,
height);
262 hr = IBasicVideo_put_DestinationWidth(pbv, video_width/4+1);
263 ok(
hr==
S_OK,
"Cannot put destination width returned: %x\n",
hr);
265 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
266 ok(
left == video_width/3,
"expected %d, got %d\n", video_width/3,
left);
267 ok(
width == video_width/4+1,
"expected %d, got %d\n", video_width/4+1,
width);
269 hr = IBasicVideo_put_DestinationHeight(pbv, video_height/4+1);
270 ok(
hr==
S_OK,
"Cannot put destination height returned: %x\n",
hr);
272 ok(
hr ==
S_OK,
"Cannot get source position returned: %x\n",
hr);
273 ok(
top == video_height/3,
"expected %d, got %d\n", video_height/3,
top);
274 ok(
height == video_height/4+1,
"expected %d, got %d\n", video_height/4+1,
height);
277 hr = IBasicVideo_SetDefaultSourcePosition(pbv);
278 ok(
hr==
S_OK,
"IBasicVideo_SetDefaultSourcePosition returned: %x\n",
hr);
281 hr = IBasicVideo_SetDestinationPosition(pbv, 0, 0, video_width, video_height);
282 ok(
hr==
S_OK,
"Cannot set destination position returned: %x\n",
hr);
284 IBasicVideo_Release(pbv);
295 IFilterGraph2_SetDefaultSyncSource(graph);
296 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (
void **)&seeking);
297 ok(
hr ==
S_OK,
"QueryInterface(IMediaControl) failed: %08x\n",
hr);
299 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (
void **)&
filter);
300 ok(
hr ==
S_OK,
"QueryInterface(IMediaFilter) failed: %08x\n",
hr);
303 hr = IMediaSeeking_GetTimeFormat(seeking, &
format);
304 ok(
hr ==
S_OK,
"GetTimeFormat failed: %#x\n",
hr);
308 hr = IMediaSeeking_ConvertTimeFormat(seeking, &
pos,
NULL, 0x123456789a,
NULL);
309 ok(
hr ==
S_OK,
"ConvertTimeFormat failed: %#x\n",
hr);
313 hr = IMediaSeeking_ConvertTimeFormat(seeking, &
pos, &TIME_FORMAT_MEDIA_TIME, 0x123456789a,
NULL);
314 ok(
hr ==
S_OK,
"ConvertTimeFormat failed: %#x\n",
hr);
318 hr = IMediaSeeking_ConvertTimeFormat(seeking, &
pos,
NULL, 0x123456789a, &TIME_FORMAT_MEDIA_TIME);
319 ok(
hr ==
S_OK,
"ConvertTimeFormat failed: %#x\n",
hr);
322 hr = IMediaSeeking_GetCurrentPosition(seeking, &
pos);
323 ok(
hr ==
S_OK,
"GetCurrentPosition failed: %#x\n",
hr);
326 hr = IMediaSeeking_GetDuration(seeking, &duration);
327 ok(
hr ==
S_OK,
"GetDuration failed: %#x\n",
hr);
330 hr = IMediaSeeking_GetStopPosition(seeking, &stop);
331 ok(
hr ==
S_OK,
"GetCurrentPosition failed: %08x\n",
hr);
332 ok(stop == duration || stop == duration + 1,
"expected %s, got %s\n",
336 ok(
hr ==
S_OK,
"SetPositions failed: %#x\n",
hr);
338 ok(
hr ==
S_OK,
"SetPositions failed: %#x\n",
hr);
342 ok(
hr ==
S_OK,
"SetPositions failed: %08x\n",
hr);
346 hr = IMediaSeeking_GetCurrentPosition(seeking, &
pos);
347 ok(
hr ==
S_OK,
"GetCurrentPosition failed: %08x\n",
hr);
349 IFilterGraph2_SetDefaultSyncSource(graph);
351 IMediaSeeking_Release(seeking);
352 IMediaFilter_Release(
filter);
357 IMediaControl *control;
361 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (
void **)&control);
362 ok(
hr ==
S_OK,
"QueryInterface(IMediaControl) failed: %x\n",
hr);
364 hr = IMediaControl_GetState(control, 1000, &
state);
365 ok(
hr ==
S_OK,
"GetState() failed: %x\n",
hr);
368 hr = IMediaControl_Run(control);
374 hr = IMediaControl_Stop(control);
376 hr = IMediaControl_GetState(control, 1000, &
state);
377 ok(
hr ==
S_OK,
"GetState() failed: %x\n",
hr);
380 hr = IMediaControl_Pause(control);
382 hr = IMediaControl_GetState(control, 1000, &
state);
383 ok(
hr ==
S_OK,
"GetState() failed: %x\n",
hr);
386 hr = IMediaControl_Run(control);
388 hr = IMediaControl_GetState(control, 1000, &
state);
389 ok(
hr ==
S_OK,
"GetState() failed: %x\n",
hr);
392 hr = IMediaControl_Pause(control);
394 hr = IMediaControl_GetState(control, 1000, &
state);
395 ok(
hr ==
S_OK,
"GetState() failed: %x\n",
hr);
398 hr = IMediaControl_Stop(control);
400 hr = IMediaControl_GetState(control, 1000, &
state);
401 ok(
hr ==
S_OK,
"GetState() failed: %x\n",
hr);
404 IMediaControl_Release(control);
409 IMediaEvent *media_event;
411 IMediaControl *control;
421 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaFilter, (
void **)&
filter);
422 ok(
hr ==
S_OK,
"QueryInterface(IMediaFilter) failed: %#x\n",
hr);
424 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaControl, (
void **)&control);
425 ok(
hr ==
S_OK,
"QueryInterface(IMediaControl) failed: %#x\n",
hr);
427 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaEvent, (
void **)&media_event);
428 ok(
hr ==
S_OK,
"QueryInterface(IMediaEvent) failed: %#x\n",
hr);
430 hr = IFilterGraph2_QueryInterface(graph, &IID_IMediaSeeking, (
void **)&seeking);
431 ok(
hr ==
S_OK,
"QueryInterface(IMediaEvent) failed: %#x\n",
hr);
433 hr = IMediaControl_Stop(control);
435 hr = IMediaControl_GetState(control, 1000, &
state);
436 ok(
hr ==
S_OK,
"GetState() timed out\n");
438 hr = IMediaSeeking_GetDuration(seeking, &stop);
439 ok(
hr ==
S_OK,
"GetDuration() failed: %#x\n",
hr);
442 ok(
hr ==
S_OK,
"SetPositions() failed: %#x\n",
hr);
445 ok(
hr ==
S_OK,
"SetSyncSource() failed: %#x\n",
hr);
447 hr = IMediaEvent_GetEventHandle(media_event, (OAEVENT *)&
event);
448 ok(
hr ==
S_OK,
"GetEventHandle() failed: %#x\n",
hr);
451 while ((
hr = IMediaEvent_GetEvent(media_event, &
code, &lparam1, &lparam2, 0)) ==
S_OK);
455 hr = IMediaControl_Run(control);
463 while ((
hr = IMediaEvent_GetEvent(media_event, &
code, &lparam1, &lparam2, 0)) ==
S_OK)
472 ok(got_eos,
"didn't get EOS\n");
474 hr = IMediaSeeking_GetCurrentPosition(seeking, &
current);
475 ok(
hr ==
S_OK,
"GetCurrentPosition() failed: %#x\n",
hr);
479 hr = IMediaControl_Stop(control);
481 hr = IMediaControl_GetState(control, 1000, &
state);
482 ok(
hr ==
S_OK,
"GetState() timed out\n");
484 hr = IFilterGraph2_SetDefaultSyncSource(graph);
485 ok(
hr ==
S_OK,
"SetDefaultSinkSource() failed: %#x\n",
hr);
487 IMediaSeeking_Release(seeking);
488 IMediaEvent_Release(media_event);
489 IMediaControl_Release(control);
490 IMediaFilter_Release(
filter);
503 static const WCHAR outputW[] = {
'O',
'u',
't',
'p',
'u',
't',0};
504 static const WCHAR inW[] = {
'I',
'n',0};
506 IPin *pin_in, *pin_out;
514 ok(
hr ==
S_OK,
"Failed to create VideoRenderer: %#x\n",
hr);
516 hr = IFilterGraph2_AddSourceFilter(graph,
filename,
NULL, &source_filter);
517 ok(
hr ==
S_OK,
"AddSourceFilter failed: %#x\n",
hr);
520 ok(
hr ==
S_OK,
"QueryInterface(IBaseFilter) failed: %#x\n",
hr);
521 hr = IFilterGraph2_AddFilter(graph, video_filter,
NULL);
522 ok(
hr ==
S_OK,
"AddFilter failed: %#x\n",
hr);
524 hr = IBaseFilter_FindPin(source_filter, outputW, &pin_out);
526 hr = IBaseFilter_FindPin(video_filter,
inW, &pin_in);
528 hr = IFilterGraph2_Connect(graph, pin_out, pin_in);
533 IPin_Release(pin_in);
534 IPin_Release(pin_out);
535 IBaseFilter_Release(source_filter);
536 IBaseFilter_Release(video_filter);
537 IVideoWindow_Release(
window);
538 IFilterGraph2_Release(graph);
568 refs = IFilterGraph2_Release(graph);
569 ok(!refs,
"Graph has %u references\n", refs);
580 refs = IFilterGraph2_Release(graph);
581 ok(!refs,
"Graph has %u references\n", refs);
623 IFilterGraph2_Release(graph);
637 static const WCHAR testFilterW[] = {
't',
'e',
's',
't',
'F',
'i',
'l',
't',
'e',
'r',0};
638 static const WCHAR fooBarW[] = {
'f',
'o',
'o',
'B',
'a',
'r',0};
645 ok(
hr ==
S_OK,
"CoCreateInstance failed with %x\n",
hr);
646 ok(pF !=
NULL,
"pF is NULL\n");
648 hr = IGraphBuilder_AddFilter(pgraph,
NULL, testFilterW);
652 hr = IGraphBuilder_AddFilter(pgraph, pF, testFilterW);
653 ok(
hr ==
S_OK,
"failed to add pF to the graph: %x\n",
hr);
656 hr = IBaseFilter_EnumPins(pF, &pEnum);
657 ok(
hr ==
S_OK,
"IBaseFilter_EnumPins failed for pF: %x\n",
hr);
658 ok(pEnum !=
NULL,
"pEnum is NULL\n");
659 hr = IEnumPins_Next(pEnum, 1, &pIn,
NULL);
660 ok(
hr ==
S_OK,
"IEnumPins_Next failed for pF: %x\n",
hr);
661 ok(pIn !=
NULL,
"pIn is NULL\n");
662 hr = IPin_QueryDirection(pIn, &
dir);
663 ok(
hr ==
S_OK,
"IPin_QueryDirection failed: %x\n",
hr);
666 hr = IGraphBuilder_FindFilterByName(pgraph, fooBarW, &pF2);
668 ok(pF2 ==
NULL,
"IGraphBuilder_FindFilterByName returned %p\n", pF2);
669 hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, &pF2);
670 ok(
hr ==
S_OK,
"IGraphBuilder_FindFilterByName returned %x\n",
hr);
671 ok(pF2 !=
NULL,
"IGraphBuilder_FindFilterByName returned NULL\n");
672 hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW,
NULL);
673 ok(
hr ==
E_POINTER,
"IGraphBuilder_FindFilterByName returned %x\n",
hr);
675 hr = IGraphBuilder_Connect(pgraph,
NULL, pIn);
678 hr = IGraphBuilder_Connect(pgraph, pIn,
NULL);
681 hr = IGraphBuilder_Connect(pgraph, pIn, pIn);
684 if (pIn) IPin_Release(pIn);
685 if (pEnum) IEnumPins_Release(pEnum);
686 if (pF) IBaseFilter_Release(pF);
687 if (pF2) IBaseFilter_Release(pF2);
688 IGraphBuilder_Release(pgraph);
694 if (pMediaType->pbFormat)
697 pMediaType->pbFormat =
NULL;
699 if (pMediaType->pUnk)
701 IUnknown_Release(pMediaType->pUnk);
702 pMediaType->pUnk =
NULL;
709 if (!pSrc->pbFormat)
return S_OK;
712 memcpy(pDest->pbFormat, pSrc->pbFormat, pSrc->cbFormat);
714 IUnknown_AddRef(pDest->pUnk);
768 if (!pEnumMediaTypes)
775 pEnumMediaTypes->
uIndex = 0;
778 for (
i = 0;
i < cMediaTypes;
i++)
824 for (
i = 0;
i <
This->cMediaTypes;
i++)
837 cFetched =
min(
This->cMediaTypes,
This->uIndex + cMediaTypes) -
This->uIndex;
842 for (
i = 0;
i < cFetched;
i++)
852 if ((cMediaTypes != 1) || pcFetched)
853 *pcFetched = cFetched;
855 This->uIndex += cFetched;
857 if (cFetched != cMediaTypes)
866 if (
This->uIndex + cMediaTypes < This->cMediaTypes)
868 This->uIndex += cMediaTypes;
890 return IEnumMediaTypes_Skip(*ppEnum,
This->uIndex);
909 lstrcpyW(pDest->achName, pSrc->achName);
910 pDest->dir = pSrc->dir;
911 pDest->pFilter = pSrc->pFilter;
987 if (
This->pConnectedTo)
992 IPin_QueryDirection(pReceivePin, &pindirReceive);
1003 This->pConnectedTo = pReceivePin;
1004 IPin_AddRef(pReceivePin);
1019 if (
This->pConnectedTo)
1021 IPin_Release(
This->pConnectedTo);
1040 if (
This->pConnectedTo)
1042 *ppPin =
This->pConnectedTo;
1043 IPin_AddRef(*ppPin);
1064 if (
This->pConnectedTo)
1085 IBaseFilter_AddRef(pInfo->pFilter);
1094 *pPinDir =
This->pinInfo.dir;
1180 This->pConnectedTo = pReceivePin;
1181 IPin_AddRef(pReceivePin);
1183 hr = IPin_ReceiveConnection(pReceivePin, &
This->IPin_iface, pmt);
1187 IPin_Release(
This->pConnectedTo);
1303 IBaseFilter_AddRef(&
base->IBaseFilter_iface);
1344 IBaseFilter_Release(&
This->base->IBaseFilter_iface);
1362 if (cPins > 1 && !pcFetched)
1368 while (
i < cPins &&
hr ==
S_OK)
1370 hr =
This->receive_pin(
This->base,
This->uIndex +
i, &ppPins[
i], &synctime);
1375 if (synctime !=
This->synctime)
1379 if (!
i && synctime !=
This->synctime)
1402 if (synctime !=
This->synctime)
1406 This->uIndex += cPins;
1429 return IEnumPins_Skip(*ppEnum,
This->uIndex);
1463 static const WCHAR wcsOutputPinName[] = {
'o',
'u',
't',
'p',
'u',
't',
' ',
'p',
'i',
'n',0};
1473 pTestFilter->
clsid = *pClsid;
1477 pTestFilter->
state = State_Stopped;
1482 while(pinData[nPins].mediasubtype) ++nPins;
1485 if (!pTestFilter->
ppPins)
1492 for (
i = 0;
i < nPins;
i++)
1495 mt.majortype = MEDIATYPE_Video;
1496 mt.formattype = FORMAT_None;
1499 pinInfo.dir = pinData[
i].
pinDir;
1517 pTestFilter->
nPins = nPins;
1525 for (
i = 0;
i < nPins;
i++)
1527 if (pTestFilter->
ppPins[
i]) IPin_Release(pTestFilter->
ppPins[
i]);
1578 for (
i = 0;
i <
This->nPins;
i++)
1584 IPin_Disconnect(pConnectedTo);
1585 IPin_Release(pConnectedTo);
1587 IPin_Disconnect(
This->ppPins[
i]);
1589 IPin_Release(
This->ppPins[
i]);
1609 *pClsid =
This->clsid;
1637 *pState =
This->state;
1661 if (
pos >=
tf->nPins)
1686 pInfo->pGraph =
This->filterInfo.pGraph;
1689 IFilterGraph_AddRef(pInfo->pGraph);
1704 *
This->filterInfo.achName =
'\0';
1705 This->filterInfo.pGraph = pGraph;
1751 LPCLASSFACTORY iface,
1761 IClassFactory_AddRef(iface);
1780 LPCLASSFACTORY iface,
1802 LPCLASSFACTORY iface,
1821 FILTER_INFO filterInfo;
1827 ok(
hr ==
S_OK,
"IPin_ConnectedTo failed with %x\n",
hr);
1829 hr = IPin_QueryPinInfo(
pin, &pinInfo);
1830 ok(
hr ==
S_OK,
"IPin_QueryPinInfo failed with %x\n",
hr);
1834 hr = IBaseFilter_QueryFilterInfo(pinInfo.pFilter, &filterInfo);
1837 IBaseFilter_Release(pinInfo.pFilter);
1840 ok(
hr ==
S_OK,
"IBaseFilter_QueryFilterInfo failed with %x\n",
hr);
1841 IBaseFilter_Release(pinInfo.pFilter);
1843 IFilterGraph_Release(filterInfo.pGraph);
1853 DWORD cookie1 = 0, cookie2 = 0, cookie3 = 0;
1859 static const CLSID CLSID_TestFilter2 = {
1863 {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce}
1865 static const CLSID CLSID_TestFilter3 = {
1869 {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce}
1871 static const CLSID CLSID_TestFilter4 = {
1875 {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce}
1877 static const GUID mediasubtype1 = {
1881 {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce}
1883 static const GUID mediasubtype2 = {
1887 {0xe8, 0x9b, 0x00, 0x19, 0x66, 0x2f, 0xf0, 0xce}
1912 PinData2, &CLSID_TestFilter2
1916 PinData4, &CLSID_TestFilter3
1920 PinData5, &CLSID_TestFilter4
1927 static const WCHAR wszFilterInstanceName1[] = {
'T',
'e',
's',
't',
'f',
'i',
'l',
't',
'e',
'r',
'I',
1928 'n',
's',
't',
'a',
'n',
'c',
'e',
'1', 0 };
1929 static const WCHAR wszFilterInstanceName2[] = {
'T',
'e',
's',
't',
'f',
'i',
'l',
't',
'e',
'r',
'I',
1930 'n',
's',
't',
'a',
'n',
'c',
'e',
'2', 0 };
1931 static const WCHAR wszFilterInstanceName3[] = {
'T',
'e',
's',
't',
'f',
'i',
'l',
't',
'e',
'r',
'I',
1932 'n',
's',
't',
'a',
'n',
'c',
'e',
'3', 0 };
1933 static const WCHAR wszFilterInstanceName4[] = {
'T',
'e',
's',
't',
'f',
'i',
'l',
't',
'e',
'r',
'I',
1934 'n',
's',
't',
'a',
'n',
'c',
'e',
'4', 0 };
1943 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
1945 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->
IBaseFilter_iface, wszFilterInstanceName1);
1946 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
1949 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
1951 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName2);
1952 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
1957 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
1959 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName3);
1960 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
1962 hr = IFilterGraph2_Render(pgraph2, ptestfilter->
ppPins[0]);
1963 ok(
hr ==
S_OK,
"IFilterGraph2_Render failed with %08x\n",
hr);
1967 IFilterGraph2_Release(pgraph2);
1974 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
1976 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->
IBaseFilter_iface, wszFilterInstanceName1);
1977 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
1980 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
1982 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName3);
1983 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
1988 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
1990 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName2);
1991 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
1993 hr = IFilterGraph2_Render(pgraph2, ptestfilter->
ppPins[0]);
1994 ok(
hr ==
S_OK,
"IFilterGraph2_Render failed with %08x\n",
hr);
1996 hr = IFilterGraph2_Disconnect(pgraph2,
NULL);
1997 ok(
hr ==
E_POINTER,
"IFilterGraph2_Disconnect failed. Expected E_POINTER, received %08x\n",
hr);
2000 ok(
strcmp(ConnectedFilterName1, ConnectedFilterName2),
2001 "expected connected filters to be different but got %s both times\n", ConnectedFilterName1);
2003 IFilterGraph2_Release(pgraph2);
2014 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2016 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->
IBaseFilter_iface, wszFilterInstanceName1);
2017 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2020 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2022 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName2);
2023 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2028 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2030 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName3);
2031 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2036 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2038 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName4);
2039 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2041 hr = IFilterGraph2_Render(pgraph2, ptestfilter->
ppPins[0]);
2042 ok(
hr ==
S_OK,
"IFilterGraph2_Render failed with %08x\n",
hr);
2045 ok(!
strcmp(ConnectedFilterName1,
"TestfilterInstance3") || !
strcmp(ConnectedFilterName1,
"TestfilterInstance2"),
2046 "unexpected connected filter: %s\n", ConnectedFilterName1);
2048 IFilterGraph2_Release(pgraph2);
2055 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2057 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->
IBaseFilter_iface, wszFilterInstanceName1);
2058 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2061 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2063 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName3);
2064 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2069 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2071 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName4);
2072 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2077 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2079 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter2->
IBaseFilter_iface, wszFilterInstanceName2);
2080 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2082 hr = IFilterGraph2_Render(pgraph2, ptestfilter->
ppPins[0]);
2083 ok(
hr ==
S_OK,
"IFilterGraph2_Render failed with %08x\n",
hr);
2086 ok(!
strcmp(ConnectedFilterName2,
"TestfilterInstance3") || !
strcmp(ConnectedFilterName2,
"TestfilterInstance2"),
2087 "unexpected connected filter: %s\n", ConnectedFilterName2);
2088 ok(
strcmp(ConnectedFilterName1, ConnectedFilterName2),
2089 "expected connected filters to be different but got %s both times\n", ConnectedFilterName1);
2091 IFilterGraph2_Release(pgraph2);
2099 ok(
hr ==
S_OK,
"CoCreateInstance failed with %08x\n",
hr);
2102 ok(
hr ==
S_OK,
"createtestfilter failed with %08x\n",
hr);
2104 hr = IFilterGraph2_AddFilter(pgraph2, &ptestfilter->
IBaseFilter_iface, wszFilterInstanceName1);
2105 ok(
hr ==
S_OK,
"IFilterGraph2_AddFilter failed with %08x\n",
hr);
2111 ok(
hr ==
S_OK,
"CoRegisterClassObject failed with %08x\n",
hr);
2115 ok(
hr ==
S_OK,
"CoRegisterClassObject failed with %08x\n",
hr);
2119 ok(
hr ==
S_OK,
"CoRegisterClassObject failed with %08x\n",
hr);
2122 rgf2.
dwMerit = MERIT_UNLIKELY;
2123 S2(
U(rgf2)).cPins2 = 1;
2124 S2(
U(rgf2)).rgPins2 = rgPins2;
2132 rgPinType[0].clsMajorType = &MEDIATYPE_Video;
2133 rgPinType[0].clsMinorType = &mediasubtype1;
2135 hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter2, wszFilterInstanceName2,
NULL,
2136 &CLSID_LegacyAmFilterCategory,
NULL, &rgf2);
2138 skip(
"Not authorized to register filters\n");
2141 ok(
hr ==
S_OK,
"IFilterMapper2_RegisterFilter failed with %x\n",
hr);
2143 rgf2.
dwMerit = MERIT_PREFERRED;
2144 rgPinType[0].clsMinorType = &mediasubtype2;
2146 hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter4, wszFilterInstanceName4,
NULL,
2147 &CLSID_LegacyAmFilterCategory,
NULL, &rgf2);
2148 ok(
hr ==
S_OK,
"IFilterMapper2_RegisterFilter failed with %x\n",
hr);
2150 S2(
U(rgf2)).cPins2 = 2;
2152 rgPinType[0].clsMinorType = &mediasubtype1;
2161 rgPinType[1].clsMajorType = &MEDIATYPE_Video;
2162 rgPinType[1].clsMinorType = &mediasubtype2;
2164 hr = IFilterMapper2_RegisterFilter(pMapper2, &CLSID_TestFilter3, wszFilterInstanceName3,
NULL,
2165 &CLSID_LegacyAmFilterCategory,
NULL, &rgf2);
2166 ok(
hr ==
S_OK,
"IFilterMapper2_RegisterFilter failed with %x\n",
hr);
2168 hr = IFilterGraph2_Render(pgraph2, ptestfilter->
ppPins[0]);
2169 ok(
hr ==
S_OK,
"IFilterGraph2_Render failed with %08x\n",
hr);
2172 ok(!
strcmp(ConnectedFilterName1,
"TestfilterInstance3"),
2173 "unexpected connected filter: %s\n", ConnectedFilterName1);
2175 hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory,
NULL,
2176 &CLSID_TestFilter2);
2177 ok(
hr ==
S_OK,
"IFilterMapper2_UnregisterFilter failed with %x\n",
hr);
2178 hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory,
NULL,
2179 &CLSID_TestFilter3);
2180 ok(
hr ==
S_OK,
"IFilterMapper2_UnregisterFilter failed with %x\n",
hr);
2181 hr = IFilterMapper2_UnregisterFilter(pMapper2, &CLSID_LegacyAmFilterCategory,
NULL,
2182 &CLSID_TestFilter4);
2183 ok(
hr ==
S_OK,
"IFilterMapper2_UnregisterFilter failed with %x\n",
hr);
2187 IFilterGraph2_Release(pgraph2);
2188 IFilterMapper2_Release(pMapper2);
2191 ok(
hr ==
S_OK,
"CoRevokeClassObject failed with %08x\n",
hr);
2193 ok(
hr ==
S_OK,
"CoRevokeClassObject failed with %08x\n",
hr);
2195 ok(
hr ==
S_OK,
"CoRevokeClassObject failed with %08x\n",
hr);
2219 This->AddRef_called++;
2226 This->Release_called++;
2246 ok(
hr ==
S_OK,
"CoCreateInstance returned %x\n",
hr);
2249 hr = IUnknown_QueryInterface(pgraph, &
IID_IUnknown, (
void **)&punk);
2250 ok(
hr ==
S_OK,
"CoCreateInstance returned %x\n",
hr);
2252 IUnknown_Release(punk);
2259 hr = IUnknown_QueryInterface(pgraph, &IID_IFilterMapper, (
void **)&punk);
2260 ok(
hr ==
S_OK,
"CoCreateInstance returned %x\n",
hr);
2262 IUnknown_Release(punk);
2269 hr = IUnknown_QueryInterface(pgraph, &IID_IFilterMapper2, (
void **)&punk);
2270 ok(
hr ==
S_OK,
"CoCreateInstance returned %x\n",
hr);
2272 IUnknown_Release(punk);
2279 hr = IUnknown_QueryInterface(pgraph, &IID_IFilterMapper3, (
void **)&punk);
2280 ok(
hr ==
S_OK,
"CoCreateInstance returned %x\n",
hr);
2282 IUnknown_Release(punk);
2287 IUnknown_Release(pgraph);
int strcmp(const char *String1, const char *String2)
#define InterlockedIncrement
#define InterlockedDecrement
@ AM_SEEKING_NoPositioning
@ AM_SEEKING_AbsolutePositioning
enum _PinDirection PIN_DIRECTION
const GUID IID_IClassFactory
const GUID IID_IBaseFilter
static const WCHAR wcsInputPinName[]
#define ERROR_CALL_NOT_IMPLEMENTED
#define INVALID_HANDLE_VALUE
static __inline const char * wine_dbgstr_longlong(ULONGLONG ll)
#define WideCharToMultiByte
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
DWORD WINAPI GetTempPathW(IN DWORD count, OUT LPWSTR path)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
HRESULT WINAPI CoRegisterClassObject(REFCLSID rclsid, LPUNKNOWN pUnk, DWORD dwClsContext, DWORD flags, LPDWORD lpdwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoRevokeClassObject(DWORD dwRegister)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLdouble GLdouble GLdouble GLdouble top
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLfloat GLfloat GLfloat GLfloat h
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
VOID WINAPI CoTaskMemFree(LPVOID ptr)
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
#define memcpy(s1, s2, n)
struct task_struct * current
static IHTMLWindow2 * window
static HRESULT WINAPI TestFilter_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
static const IPinVtbl TestFilter_OutputPin_Vtbl
struct IEnumPinsImpl IEnumPinsImpl
static HRESULT createenumpins(IEnumPins **ppEnum, FNOBTAINPIN receive_pin, TestFilterImpl *base)
static ULONG WINAPI IEnumPinsImpl_AddRef(IEnumPins *iface)
static HRESULT WINAPI TestFilter_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
static IEnumMediaTypesImpl * impl_from_IEnumMediaTypes(IEnumMediaTypes *iface)
static HRESULT WINAPI IEnumMediaTypesImpl_Reset(IEnumMediaTypes *iface)
static HRESULT WINAPI TestFilter_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
static TestFilterImpl * impl_from_IBaseFilter(IBaseFilter *iface)
static void test_render_run(const WCHAR *file)
static HRESULT get_connected_filter_name(TestFilterImpl *pFilter, char *FilterName)
static HRESULT WINAPI IEnumPinsImpl_Clone(IEnumPins *iface, IEnumPins **ppEnum)
static HRESULT IEnumMediaTypesImpl_Construct(const AM_MEDIA_TYPE *pMediaTypes, ULONG cMediaTypes, IEnumMediaTypes **ppEnum)
static HRESULT WINAPI IEnumPinsImpl_QueryInterface(IEnumPins *iface, REFIID riid, LPVOID *ppv)
static HRESULT WINAPI TestFilter_InputPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
static const struct IEnumMediaTypesVtbl IEnumMediaTypesImpl_Vtbl
static HRESULT WINAPI IEnumMediaTypesImpl_Clone(IEnumMediaTypes *iface, IEnumMediaTypes **ppEnum)
static WCHAR * load_resource(const WCHAR *name)
static void rungraph(IFilterGraph2 *graph)
static void test_media_event(IFilterGraph2 *graph)
static HRESULT WINAPI TestFilter_Pin_NewSegment(IPin *iface, REFERENCE_TIME tStart, REFERENCE_TIME tStop, double dRate)
static AM_MEDIA_TYPE * CreateMediaType(AM_MEDIA_TYPE const *pSrc)
struct IEnumMediaTypesImpl IEnumMediaTypesImpl
static HRESULT getpin_callback(TestFilterImpl *tf, ULONG pos, IPin **pin, DWORD *lastsynctick)
static BOOL CompareMediaTypes(const AM_MEDIA_TYPE *pmt1, const AM_MEDIA_TYPE *pmt2, BOOL bWildcards)
static IEnumPinsImpl * impl_from_IEnumPins(IEnumPins *iface)
static ULONG WINAPI IUnknownImpl_AddRef(IUnknown *iface)
static TestClassFactoryImpl * impl_from_IClassFactory(IClassFactory *iface)
static HRESULT WINAPI Test_IClassFactory_QueryInterface(LPCLASSFACTORY iface, REFIID riid, LPVOID *ppvObj)
static void DeleteMediaType(AM_MEDIA_TYPE *pMediaType)
HRESULT(* FNOBTAINPIN)(TestFilterImpl *tf, ULONG pos, IPin **pin, DWORD *lastsynctick)
static ULONG WINAPI IEnumPinsImpl_Release(IEnumPins *iface)
static const struct IEnumPinsVtbl IEnumPinsImpl_Vtbl
static HRESULT WINAPI TestFilter_Pin_Disconnect(IPin *iface)
static HRESULT WINAPI TestFilter_GetClassID(IBaseFilter *iface, CLSID *pClsid)
static HRESULT WINAPI TestFilter_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
static HRESULT TestFilter_OutputPin_ConnectSpecific(ITestPinImpl *This, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI IEnumPinsImpl_Next(IEnumPins *iface, ULONG cPins, IPin **ppPins, ULONG *pcFetched)
static HRESULT WINAPI IEnumPinsImpl_Skip(IEnumPins *iface, ULONG cPins)
static HRESULT WINAPI IEnumMediaTypesImpl_Next(IEnumMediaTypes *iface, ULONG cMediaTypes, AM_MEDIA_TYPE **ppMediaTypes, ULONG *pcFetched)
static HRESULT WINAPI Test_IClassFactory_LockServer(LPCLASSFACTORY iface, BOOL fLock)
static const WCHAR avifile[]
static HRESULT WINAPI TestFilter_Pin_EndFlush(IPin *iface)
static HRESULT WINAPI Test_IClassFactory_CreateInstance(LPCLASSFACTORY iface, LPUNKNOWN pUnkOuter, REFIID riid, LPVOID *ppvObj)
static DWORD WINAPI call_RenderFile_multithread(LPVOID lParam)
static const IBaseFilterVtbl TestFilter_Vtbl
static HRESULT WINAPI TestFilter_Pin_QueryAccept(IPin *iface, const AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI TestFilter_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
static HRESULT WINAPI TestFilter_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
static HRESULT WINAPI IEnumMediaTypesImpl_Skip(IEnumMediaTypes *iface, ULONG cMediaTypes)
static HRESULT WINAPI TestFilter_InputPin_Connect(IPin *iface, IPin *pConnector, const AM_MEDIA_TYPE *pmt)
static const IPinVtbl TestFilter_InputPin_Vtbl
static void Copy_PinInfo(PIN_INFO *pDest, const PIN_INFO *pSrc)
static void test_aggregate_filter_graph(void)
static ULONG WINAPI IEnumMediaTypesImpl_AddRef(IEnumMediaTypes *iface)
static HRESULT WINAPI TestFilter_Pin_ConnectionMediaType(IPin *iface, AM_MEDIA_TYPE *pmt)
static HRESULT WINAPI TestFilter_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
static const WCHAR mpegfile[]
static ULONG WINAPI IEnumMediaTypesImpl_Release(IEnumMediaTypes *iface)
static HRESULT createtestfilter(const CLSID *pClsid, const TestFilterPinData *pinData, TestFilterImpl **tf)
static HRESULT WINAPI TestFilter_Pin_QueryInternalConnections(IPin *iface, IPin **apPin, ULONG *cPin)
static HRESULT WINAPI TestFilter_Pin_QueryDirection(IPin *iface, PIN_DIRECTION *pPinDir)
static HRESULT WINAPI IUnknownImpl_QueryInterface(IUnknown *iface, REFIID riid, LPVOID *ppv)
static HRESULT WINAPI TestFilter_Pin_EndOfStream(IPin *iface)
static HRESULT WINAPI TestFilter_Pin_ConnectedTo(IPin *iface, IPin **ppPin)
static ULONG WINAPI Test_IClassFactory_AddRef(LPCLASSFACTORY iface)
static HRESULT WINAPI TestFilter_Pin_BeginFlush(IPin *iface)
static HRESULT WINAPI TestFilter_Pin_QueryId(IPin *iface, LPWSTR *Id)
static void test_render_filter_priority(void)
static ULONG WINAPI TestFilter_AddRef(IBaseFilter *iface)
static void test_basic_video(IFilterGraph2 *graph)
static HRESULT TestFilter_Pin_Construct(const IPinVtbl *Pin_Vtbl, const PIN_INFO *pPinInfo, AM_MEDIA_TYPE *pinmt, LPCRITICAL_SECTION pCritSec, IPin **ppPin)
static ULONG WINAPI TestFilter_Pin_Release(IPin *iface)
static IFilterGraph2 * create_graph(void)
static CONST_VTBL IUnknownVtbl IUnknownImpl_Vtbl
static void test_state_change(IFilterGraph2 *graph)
struct IUnknownImpl IUnknownImpl
static HRESULT WINAPI TestFilter_Pin_QueryPinInfo(IPin *iface, PIN_INFO *pInfo)
static ULONG WINAPI IUnknownImpl_Release(IUnknown *iface)
static HRESULT WINAPI TestFilter_Pin_QueryInterface(IPin *iface, REFIID riid, LPVOID *ppv)
static HRESULT WINAPI TestFilter_SetSyncSource(IBaseFilter *iface, IReferenceClock *pClock)
static HRESULT WINAPI TestFilter_Stop(IBaseFilter *iface)
static ITestPinImpl * impl_from_IPin(IPin *iface)
static HRESULT WINAPI TestFilter_Pin_EnumMediaTypes(IPin *iface, IEnumMediaTypes **ppEnum)
static HRESULT WINAPI TestFilter_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
static HRESULT WINAPI TestFilter_OutputPin_Connect(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
static IUnknownImpl * IUnknownImpl_from_iface(IUnknown *iface)
static HRESULT WINAPI IEnumPinsImpl_Reset(IEnumPins *iface)
static HRESULT test_graph_builder_connect(WCHAR *filename)
static void test_render_with_multithread(void)
static void FreeMediaType(AM_MEDIA_TYPE *pMediaType)
static void test_graph_builder(void)
static HRESULT WINAPI TestFilter_Pause(IBaseFilter *iface)
static ULONG WINAPI TestFilter_Pin_AddRef(IPin *iface)
static void test_media_seeking(IFilterGraph2 *graph)
static HRESULT WINAPI IEnumMediaTypesImpl_QueryInterface(IEnumMediaTypes *iface, REFIID riid, LPVOID *ppv)
static HRESULT WINAPI TestFilter_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
static ULONG WINAPI Test_IClassFactory_Release(LPCLASSFACTORY iface)
static HRESULT CopyMediaType(AM_MEDIA_TYPE *pDest, const AM_MEDIA_TYPE *pSrc)
static IClassFactoryVtbl TestClassFactory_Vtbl
static ULONG WINAPI TestFilter_Release(IBaseFilter *iface)
static HRESULT WINAPI TestFilter_OutputPin_ReceiveConnection(IPin *iface, IPin *pReceivePin, const AM_MEDIA_TYPE *pmt)
@ COINIT_APARTMENTTHREADED
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
IEnumPins IEnumPins_iface
LPCRITICAL_SECTION pCritSec
const CLSID * clsPinCategory
const REGPINMEDIUM * lpMedium
const REGPINTYPES * lpMediaType
const TestFilterPinData * filterPinData
IClassFactory IClassFactory_iface
CRITICAL_SECTION csFilter
IBaseFilter IBaseFilter_iface
const GUID * mediasubtype
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
#define CONTAINING_RECORD(address, type, field)
#define VFW_E_ALREADY_CONNECTED
#define VFW_E_TYPE_NOT_ACCEPTED
#define VFW_E_INVALID_DIRECTION
#define VFW_E_NO_ACCEPTABLE_TYPES
#define VFW_S_PARTIAL_RENDER
#define VFW_E_ENUM_OUT_OF_SYNC
#define VFW_E_CANNOT_CONNECT
#define VFW_S_AUDIO_NOT_RENDERED
#define VFW_E_NOT_CONNECTED
static const WCHAR wcsOutputPinName[]
DWORD WINAPI GetLastError(void)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
#define CLASS_E_NOAGGREGATION
int WINAPI GetSystemMetrics(_In_ int)