ReactOS 0.4.16-dev-303-g11d5cb8
videorenderer.c
Go to the documentation of this file.
1/*
2 * Video Renderer (Fullscreen and Windowed using Direct Draw)
3 *
4 * Copyright 2004 Christian Costa
5 *
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.
10 *
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.
15 *
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
19 */
20
21#include "config.h"
22
23#include "quartz_private.h"
24#include "pin.h"
25
26#include "uuids.h"
27#include "vfwmsgs.h"
28#include "amvideo.h"
29#include "windef.h"
30#include "winbase.h"
31#include "dshow.h"
32#include "evcode.h"
33#include "strmif.h"
34#include "ddraw.h"
35#include "dvdmedia.h"
36
37#include <assert.h>
38#include "wine/unicode.h"
39#include "wine/debug.h"
40
42
43typedef struct VideoRendererImpl
44{
46 BaseControlWindow baseControlWindow;
47 BaseControlVideo baseControlVideo;
48
52
55
58/* hEvent == evComplete? */
67
69{
70 return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlWindow.baseWindow);
71}
72
74{
75 return CONTAINING_RECORD(iface, VideoRendererImpl, renderer);
76}
77
79{
80 return CONTAINING_RECORD(iface, VideoRendererImpl, renderer.filter.IBaseFilter_iface);
81}
82
83static inline VideoRendererImpl *impl_from_IVideoWindow(IVideoWindow *iface)
84{
85 return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlWindow.IVideoWindow_iface);
86}
87
88static inline VideoRendererImpl *impl_from_BaseControlVideo(BaseControlVideo *iface)
89{
90 return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlVideo);
91}
92
93static inline VideoRendererImpl *impl_from_IBasicVideo(IBasicVideo *iface)
94{
95 return CONTAINING_RECORD(iface, VideoRendererImpl, baseControlVideo.IBasicVideo_iface);
96}
97
98static DWORD WINAPI MessageLoop(LPVOID lpParameter)
99{
100 VideoRendererImpl* This = lpParameter;
101 MSG msg;
102 BOOL fGotMessage;
103
104 TRACE("Starting message loop\n");
105
106 if (FAILED(BaseWindowImpl_PrepareWindow(&This->baseControlWindow.baseWindow)))
107 {
108 This->ThreadResult = FALSE;
109 SetEvent(This->hEvent);
110 return 0;
111 }
112
113 This->ThreadResult = TRUE;
114 SetEvent(This->hEvent);
115
116 while ((fGotMessage = GetMessageW(&msg, NULL, 0, 0)) != 0 && fGotMessage != -1)
117 {
120 }
121
122 TRACE("End of message loop\n");
123
124 return msg.wParam;
125}
126
128{
129 This->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
130 if (!This->hEvent)
131 return FALSE;
132
133 This->hThread = CreateThread(NULL, 0, MessageLoop, This, 0, &This->ThreadID);
134 if (!This->hThread)
135 {
136 CloseHandle(This->hEvent);
137 return FALSE;
138 }
139
141
142 if (!This->ThreadResult)
143 {
144 CloseHandle(This->hEvent);
145 CloseHandle(This->hThread);
146 return FALSE;
147 }
148
149 return TRUE;
150}
151
153{
154 if (!This->init && (!This->WindowPos.right || !This->WindowPos.top))
155 {
156 DWORD style = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE);
157 DWORD style_ex = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_EXSTYLE);
158
159 if (!This->WindowPos.right)
160 {
161 if (This->DestRect.right)
162 {
163 This->WindowPos.left = This->DestRect.left;
164 This->WindowPos.right = This->DestRect.right;
165 }
166 else
167 {
168 This->WindowPos.left = This->SourceRect.left;
169 This->WindowPos.right = This->SourceRect.right;
170 }
171 }
172 if (!This->WindowPos.bottom)
173 {
174 if (This->DestRect.bottom)
175 {
176 This->WindowPos.top = This->DestRect.top;
177 This->WindowPos.bottom = This->DestRect.bottom;
178 }
179 else
180 {
181 This->WindowPos.top = This->SourceRect.top;
182 This->WindowPos.bottom = This->SourceRect.bottom;
183 }
184 }
185
186 AdjustWindowRectEx(&This->WindowPos, style, FALSE, style_ex);
187
188 TRACE("WindowPos: %s\n", wine_dbgstr_rect(&This->WindowPos));
189 SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL,
190 This->WindowPos.left,
191 This->WindowPos.top,
192 This->WindowPos.right - This->WindowPos.left,
193 This->WindowPos.bottom - This->WindowPos.top,
195
196 GetClientRect(This->baseControlWindow.baseWindow.hWnd, &This->DestRect);
197 }
198 else if (!This->init)
199 This->DestRect = This->WindowPos;
200 This->init = TRUE;
201 if (This->baseControlWindow.AutoShow)
202 ShowWindow(This->baseControlWindow.baseWindow.hWnd, SW_SHOW);
203}
204
206{
207 AM_MEDIA_TYPE amt;
208 HRESULT hr = S_OK;
209 BITMAPINFOHEADER *bmiHeader;
210
211 TRACE("(%p)->(%p, %d)\n", This, data, size);
212
213 hr = IPin_ConnectionMediaType(&This->renderer.pInputPin->pin.IPin_iface, &amt);
214 if (FAILED(hr)) {
215 ERR("Unable to retrieve media type\n");
216 return hr;
217 }
218
219 if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo))
220 {
221 bmiHeader = &((VIDEOINFOHEADER *)amt.pbFormat)->bmiHeader;
222 }
223 else if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo2))
224 {
225 bmiHeader = &((VIDEOINFOHEADER2 *)amt.pbFormat)->bmiHeader;
226 }
227 else
228 {
229 FIXME("Unknown type %s\n", debugstr_guid(&amt.subtype));
230 return VFW_E_RUNTIME_ERROR;
231 }
232
233 TRACE("biSize = %d\n", bmiHeader->biSize);
234 TRACE("biWidth = %d\n", bmiHeader->biWidth);
235 TRACE("biHeight = %d\n", bmiHeader->biHeight);
236 TRACE("biPlanes = %d\n", bmiHeader->biPlanes);
237 TRACE("biBitCount = %d\n", bmiHeader->biBitCount);
238 TRACE("biCompression = %s\n", debugstr_an((LPSTR)&(bmiHeader->biCompression), 4));
239 TRACE("biSizeImage = %d\n", bmiHeader->biSizeImage);
240
241 if (!This->baseControlWindow.baseWindow.hDC) {
242 ERR("Cannot get DC from window!\n");
243 return E_FAIL;
244 }
245
246 TRACE("Src Rect: %s\n", wine_dbgstr_rect(&This->SourceRect));
247 TRACE("Dst Rect: %s\n", wine_dbgstr_rect(&This->DestRect));
248
249 StretchDIBits(This->baseControlWindow.baseWindow.hDC, This->DestRect.left, This->DestRect.top, This->DestRect.right -This->DestRect.left,
250 This->DestRect.bottom - This->DestRect.top, This->SourceRect.left, This->SourceRect.top,
251 This->SourceRect.right - This->SourceRect.left, This->SourceRect.bottom - This->SourceRect.top,
252 data, (BITMAPINFO *)bmiHeader, DIB_RGB_COLORS, SRCCOPY);
253
254 return S_OK;
255}
256
258{
259 /* Preroll means the sample isn't shown, this is used for key frames and things like that */
260 if (IMediaSample_IsPreroll(pSample) == S_OK)
261 return E_FAIL;
262 return S_FALSE;
263}
264
266{
268 LPBYTE pbSrcStream = NULL;
269 LONG cbSrcStream = 0;
270 HRESULT hr;
271
272 TRACE("(%p)->(%p)\n", This, pSample);
273
274 hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
275 if (FAILED(hr))
276 {
277 ERR("Cannot get pointer to sample data (%x)\n", hr);
278 return hr;
279 }
280
281 cbSrcStream = IMediaSample_GetActualDataLength(pSample);
282
283 TRACE("val %p %d\n", pbSrcStream, cbSrcStream);
284
285#if 0 /* For debugging purpose */
286 {
287 int i;
288 for(i = 0; i < cbSrcStream; i++)
289 {
290 if ((i!=0) && !(i%16))
291 TRACE("\n");
292 TRACE("%02x ", pbSrcStream[i]);
293 }
294 TRACE("\n");
295 }
296#endif
297
298 SetEvent(This->hEvent);
299 if (This->renderer.filter.state == State_Paused)
300 {
301 VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream);
302 SetEvent(This->hEvent);
303 if (This->renderer.filter.state == State_Paused)
304 {
305 /* Flushing */
306 return S_OK;
307 }
308 if (This->renderer.filter.state == State_Stopped)
309 {
310 return VFW_E_WRONG_STATE;
311 }
312 } else {
313 VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream);
314 }
315 return S_OK;
316}
317
319{
321
322 if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
323 return S_FALSE;
324
325 if (IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB32) ||
326 IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB24) ||
327 IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB565) ||
328 IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8))
329 {
330 LONG height;
331
332 if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo))
333 {
334 VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pmt->pbFormat;
335 This->SourceRect.left = 0;
336 This->SourceRect.top = 0;
337 This->SourceRect.right = This->VideoWidth = format->bmiHeader.biWidth;
338 height = format->bmiHeader.biHeight;
339 if (height < 0)
340 This->SourceRect.bottom = This->VideoHeight = -height;
341 else
342 This->SourceRect.bottom = This->VideoHeight = height;
343 }
344 else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2))
345 {
346 VIDEOINFOHEADER2 *format2 = (VIDEOINFOHEADER2 *)pmt->pbFormat;
347
348 This->SourceRect.left = 0;
349 This->SourceRect.top = 0;
350 This->SourceRect.right = This->VideoWidth = format2->bmiHeader.biWidth;
351 height = format2->bmiHeader.biHeight;
352 if (height < 0)
353 This->SourceRect.bottom = This->VideoHeight = -height;
354 else
355 This->SourceRect.bottom = This->VideoHeight = height;
356 }
357 else
358 {
359 WARN("Format type %s not supported\n", debugstr_guid(&pmt->formattype));
360 return S_FALSE;
361 }
362 return S_OK;
363 }
364 return S_FALSE;
365}
366
368{
370
371 TRACE("(%p)->()\n", iface);
372
373 if (This->renderer.pMediaSample) {
374 ResetEvent(This->hEvent);
382 }
383 if (This->renderer.filter.state == State_Paused) {
384 ResetEvent(This->hEvent);
385 }
386
387 return BaseRendererImpl_EndFlush(iface);
388}
389
391{
393
394 TRACE("(%p)->()\n", This);
395
396 SetEvent(This->hEvent);
397 if (This->baseControlWindow.AutoShow)
398 /* Black it out */
399 RedrawWindow(This->baseControlWindow.baseWindow.hWnd, NULL, NULL, RDW_INVALIDATE|RDW_ERASE);
400}
401
403{
405
406 TRACE("(%p)\n", This);
407
408 if (This->renderer.pInputPin->pin.pConnectedTo && (This->renderer.filter.state == State_Stopped || !This->renderer.pInputPin->end_of_stream))
409 {
410 if (This->renderer.filter.state == State_Stopped)
411 {
412 ResetEvent(This->hEvent);
414 }
415 }
416}
417
418static LPWSTR WINAPI VideoRenderer_GetClassWindowStyles(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)
419{
420 static const WCHAR classnameW[] = { 'W','i','n','e',' ','A','c','t','i','v','e','M','o','v','i','e',' ','C','l','a','s','s',0 };
421
422 *pClassStyles = 0;
423 *pWindowStyles = WS_SIZEBOX;
424 *pWindowStylesEx = 0;
425
426 return (LPWSTR)classnameW;
427}
428
430{
432 static RECT defRect;
433
434 SetRect(&defRect, 0, 0, This->VideoWidth, This->VideoHeight);
435
436 return defRect;
437}
438
440{
442
443 TRACE("WM_SIZE %d %d\n", Width, Height);
444 GetClientRect(iface->hWnd, &This->DestRect);
445 TRACE("WM_SIZING: DestRect=(%d,%d),(%d,%d)\n",
446 This->DestRect.left,
447 This->DestRect.top,
448 This->DestRect.right - This->DestRect.left,
449 This->DestRect.bottom - This->DestRect.top);
450 return BaseWindowImpl_OnSize(iface, Width, Height);
451}
452
456
457 NULL,
458 NULL,
459 NULL,
462 NULL,
463 NULL,
464 NULL,
466 NULL,
467
468 NULL,
469 NULL,
470 NULL,
471 NULL,
473};
474
478 NULL,
481};
482
483static HRESULT WINAPI VideoRenderer_GetSourceRect(BaseControlVideo* iface, RECT *pSourceRect)
484{
486 CopyRect(pSourceRect,&This->SourceRect);
487 return S_OK;
488}
489
490static HRESULT WINAPI VideoRenderer_GetStaticImage(BaseControlVideo* iface, LONG *pBufferSize, LONG *pDIBImage)
491{
493 BITMAPINFOHEADER *bmiHeader;
494 LONG needed_size;
495 AM_MEDIA_TYPE *amt = &This->renderer.pInputPin->pin.mtCurrent;
496 char *ptr;
497
498 FIXME("(%p/%p)->(%p, %p): partial stub\n", This, iface, pBufferSize, pDIBImage);
499
500 EnterCriticalSection(&This->renderer.filter.csFilter);
501
502 if (!This->renderer.pMediaSample)
503 {
504 LeaveCriticalSection(&This->renderer.filter.csFilter);
505 return (This->renderer.filter.state == State_Paused ? E_UNEXPECTED : VFW_E_NOT_PAUSED);
506 }
507
508 if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo))
509 {
510 bmiHeader = &((VIDEOINFOHEADER *)amt->pbFormat)->bmiHeader;
511 }
512 else if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo2))
513 {
514 bmiHeader = &((VIDEOINFOHEADER2 *)amt->pbFormat)->bmiHeader;
515 }
516 else
517 {
518 FIXME("Unknown type %s\n", debugstr_guid(&amt->subtype));
519 LeaveCriticalSection(&This->renderer.filter.csFilter);
520 return VFW_E_RUNTIME_ERROR;
521 }
522
523 needed_size = bmiHeader->biSize;
524 needed_size += IMediaSample_GetActualDataLength(This->renderer.pMediaSample);
525
526 if (!pDIBImage)
527 {
528 *pBufferSize = needed_size;
529 LeaveCriticalSection(&This->renderer.filter.csFilter);
530 return S_OK;
531 }
532
533 if (needed_size < *pBufferSize)
534 {
535 ERR("Buffer too small %u/%u\n", needed_size, *pBufferSize);
536 LeaveCriticalSection(&This->renderer.filter.csFilter);
537 return E_FAIL;
538 }
539 *pBufferSize = needed_size;
540
541 memcpy(pDIBImage, bmiHeader, bmiHeader->biSize);
542 IMediaSample_GetPointer(This->renderer.pMediaSample, (BYTE **)&ptr);
543 memcpy((char *)pDIBImage + bmiHeader->biSize, ptr, IMediaSample_GetActualDataLength(This->renderer.pMediaSample));
544
545 LeaveCriticalSection(&This->renderer.filter.csFilter);
546 return S_OK;
547}
548
549static HRESULT WINAPI VideoRenderer_GetTargetRect(BaseControlVideo* iface, RECT *pTargetRect)
550{
552 CopyRect(pTargetRect,&This->DestRect);
553 return S_OK;
554}
555
557{
559 AM_MEDIA_TYPE *pmt;
560
561 TRACE("(%p/%p)\n", This, iface);
562
563 pmt = &This->renderer.pInputPin->pin.mtCurrent;
564 if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
565 return (VIDEOINFOHEADER*)pmt->pbFormat;
566 } else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2)) {
567 static VIDEOINFOHEADER vih;
568 VIDEOINFOHEADER2 *vih2 = (VIDEOINFOHEADER2*)pmt->pbFormat;
569 memcpy(&vih,vih2,sizeof(VIDEOINFOHEADER));
570 memcpy(&vih.bmiHeader, &vih2->bmiHeader, sizeof(BITMAPINFOHEADER));
571 return &vih;
572 } else {
573 ERR("Unknown format type %s\n", qzdebugstr_guid(&pmt->formattype));
574 return NULL;
575 }
576}
577
578static HRESULT WINAPI VideoRenderer_IsDefaultSourceRect(BaseControlVideo* iface)
579{
581 FIXME("(%p/%p)->(): stub !!!\n", This, iface);
582
583 return S_OK;
584}
585
586static HRESULT WINAPI VideoRenderer_IsDefaultTargetRect(BaseControlVideo* iface)
587{
589 FIXME("(%p/%p)->(): stub !!!\n", This, iface);
590
591 return S_OK;
592}
593
594static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(BaseControlVideo* iface)
595{
597
598 SetRect(&This->SourceRect, 0, 0, This->VideoWidth, This->VideoHeight);
599
600 return S_OK;
601}
602
603static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo* iface)
604{
606 RECT rect;
607
608 if (!GetClientRect(This->baseControlWindow.baseWindow.hWnd, &rect))
609 return E_FAIL;
610
611 SetRect(&This->DestRect, 0, 0, rect.right, rect.bottom);
612
613 return S_OK;
614}
615
616static HRESULT WINAPI VideoRenderer_SetSourceRect(BaseControlVideo* iface, RECT *pSourceRect)
617{
619 CopyRect(&This->SourceRect,pSourceRect);
620 return S_OK;
621}
622
623static HRESULT WINAPI VideoRenderer_SetTargetRect(BaseControlVideo* iface, RECT *pTargetRect)
624{
626 CopyRect(&This->DestRect,pTargetRect);
627 return S_OK;
628}
629
630static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable = {
641};
642
644{
645 return CONTAINING_RECORD(iface, VideoRendererImpl, IUnknown_inner);
646}
647
649{
651
652 TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv);
653
654 *ppv = NULL;
655
657 *ppv = &This->IUnknown_inner;
658 else if (IsEqualIID(riid, &IID_IBasicVideo))
659 *ppv = &This->baseControlVideo.IBasicVideo_iface;
660 else if (IsEqualIID(riid, &IID_IVideoWindow))
661 *ppv = &This->baseControlWindow.IVideoWindow_iface;
662 else if (IsEqualIID(riid, &IID_IAMFilterMiscFlags))
663 *ppv = &This->IAMFilterMiscFlags_iface;
664 else
665 {
666 HRESULT hr;
667 hr = BaseRendererImpl_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
668 if (SUCCEEDED(hr))
669 return hr;
670 }
671
672 if (*ppv)
673 {
674 IUnknown_AddRef((IUnknown *)*ppv);
675 return S_OK;
676 }
677
678 if (!IsEqualIID(riid, &IID_IPin))
679 FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
680
681 return E_NOINTERFACE;
682}
683
685{
687 ULONG refCount = BaseFilterImpl_AddRef(&This->renderer.filter.IBaseFilter_iface);
688
689 TRACE("(%p)->(): new ref = %d\n", This, refCount);
690
691 return refCount;
692}
693
695{
697 ULONG refCount = BaseRendererImpl_Release(&This->renderer.filter.IBaseFilter_iface);
698
699 TRACE("(%p)->(): new ref = %d\n", This, refCount);
700
701 if (!refCount)
702 {
703 BaseControlWindow_Destroy(&This->baseControlWindow);
704 BaseControlVideo_Destroy(&This->baseControlVideo);
705 PostThreadMessageW(This->ThreadID, WM_QUIT, 0, 0);
707 CloseHandle(This->hThread);
708 CloseHandle(This->hEvent);
709
710 TRACE("Destroying Video Renderer\n");
712
713 return 0;
714 }
715 else
716 return refCount;
717}
718
719static const IUnknownVtbl IInner_VTable =
720{
724};
725
727{
729 return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
730}
731
733{
735 return IUnknown_AddRef(This->outer_unk);
736}
737
739{
741 return IUnknown_Release(This->outer_unk);
742}
743
747{
749
750 TRACE("(%p/%p)->()\n", This, iface);
751
752 EnterCriticalSection(&This->renderer.csRenderLock);
753 if (This->renderer.filter.state != State_Paused)
754 {
755 if (This->renderer.filter.state == State_Stopped)
756 {
757 This->renderer.pInputPin->end_of_stream = 0;
758 ResetEvent(This->hEvent);
760 }
761
762 ResetEvent(This->renderer.RenderEvent);
763 This->renderer.filter.state = State_Paused;
764 }
765 LeaveCriticalSection(&This->renderer.csRenderLock);
766
767 return S_OK;
768}
769
770static const IBaseFilterVtbl VideoRenderer_Vtbl =
771{
787};
788
789/*** IUnknown methods ***/
790static HRESULT WINAPI BasicVideo_QueryInterface(IBasicVideo *iface, REFIID riid, LPVOID *ppvObj)
791{
793
794 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
795
796 return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj);
797}
798
799static ULONG WINAPI BasicVideo_AddRef(IBasicVideo *iface)
800{
802
803 TRACE("(%p/%p)->()\n", This, iface);
804
805 return IUnknown_AddRef(This->outer_unk);
806}
807
808static ULONG WINAPI BasicVideo_Release(IBasicVideo *iface)
809{
811
812 TRACE("(%p/%p)->()\n", This, iface);
813
814 return IUnknown_Release(This->outer_unk);
815}
816
817static const IBasicVideoVtbl IBasicVideo_VTable =
818{
858};
859
860
861/*** IUnknown methods ***/
862static HRESULT WINAPI VideoWindow_QueryInterface(IVideoWindow *iface, REFIID riid, LPVOID *ppvObj)
863{
865
866 TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
867
868 return IUnknown_QueryInterface(This->outer_unk, riid, ppvObj);
869}
870
871static ULONG WINAPI VideoWindow_AddRef(IVideoWindow *iface)
872{
874
875 TRACE("(%p/%p)->()\n", This, iface);
876
877 return IUnknown_AddRef(This->outer_unk);
878}
879
880static ULONG WINAPI VideoWindow_Release(IVideoWindow *iface)
881{
883
884 TRACE("(%p/%p)->()\n", This, iface);
885
886 return IUnknown_Release(This->outer_unk);
887}
888
890 LONG *FullScreenMode)
891{
893
894 TRACE("(%p/%p)->(%p): %d\n", This, iface, FullScreenMode, This->FullScreenMode);
895
896 if (!FullScreenMode)
897 return E_POINTER;
898
899 *FullScreenMode = This->FullScreenMode;
900
901 return S_OK;
902}
903
905 LONG FullScreenMode)
906{
908
909 FIXME("(%p/%p)->(%d): stub !!!\n", This, iface, FullScreenMode);
910
911 if (FullScreenMode) {
912 This->baseControlWindow.baseWindow.WindowStyles = GetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE);
913 ShowWindow(This->baseControlWindow.baseWindow.hWnd, SW_HIDE);
914 SetParent(This->baseControlWindow.baseWindow.hWnd, 0);
915 SetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE, WS_POPUP);
917 GetWindowRect(This->baseControlWindow.baseWindow.hWnd, &This->DestRect);
918 This->WindowPos = This->DestRect;
919 } else {
920 ShowWindow(This->baseControlWindow.baseWindow.hWnd, SW_HIDE);
921 SetParent(This->baseControlWindow.baseWindow.hWnd, This->baseControlWindow.hwndOwner);
922 SetWindowLongW(This->baseControlWindow.baseWindow.hWnd, GWL_STYLE, This->baseControlWindow.baseWindow.WindowStyles);
923 GetClientRect(This->baseControlWindow.baseWindow.hWnd, &This->DestRect);
924 SetWindowPos(This->baseControlWindow.baseWindow.hWnd,0,This->DestRect.left,This->DestRect.top,This->DestRect.right,This->DestRect.bottom,SWP_NOZORDER|SWP_SHOWWINDOW);
925 This->WindowPos = This->DestRect;
926 }
927 This->FullScreenMode = FullScreenMode;
928
929 return S_OK;
930}
931
932static const IVideoWindowVtbl IVideoWindow_VTable =
933{
980};
981
983{
984 return CONTAINING_RECORD(iface, VideoRendererImpl, IAMFilterMiscFlags_iface);
985}
986
988 void **ppv)
989{
991 return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
992}
993
995{
997 return IUnknown_AddRef(This->outer_unk);
998}
999
1001{
1003 return IUnknown_Release(This->outer_unk);
1004}
1005
1007{
1009}
1010
1011static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl = {
1016};
1017
1019{
1020 HRESULT hr;
1022
1023 TRACE("(%p, %p)\n", pUnkOuter, ppv);
1024
1025 *ppv = NULL;
1026
1028 pVideoRenderer->IUnknown_inner.lpVtbl = &IInner_VTable;
1029 pVideoRenderer->IAMFilterMiscFlags_iface.lpVtbl = &IAMFilterMiscFlags_Vtbl;
1030
1031 pVideoRenderer->init = FALSE;
1032 ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT));
1033 ZeroMemory(&pVideoRenderer->DestRect, sizeof(RECT));
1034 ZeroMemory(&pVideoRenderer->WindowPos, sizeof(RECT));
1035 pVideoRenderer->FullScreenMode = OAFALSE;
1036
1037 if (pUnkOuter)
1038 pVideoRenderer->outer_unk = pUnkOuter;
1039 else
1040 pVideoRenderer->outer_unk = &pVideoRenderer->IUnknown_inner;
1041
1042 hr = BaseRenderer_Init(&pVideoRenderer->renderer, &VideoRenderer_Vtbl, pUnkOuter,
1043 &CLSID_VideoRenderer, (DWORD_PTR)(__FILE__ ": VideoRendererImpl.csFilter"),
1044 &BaseFuncTable);
1045
1046 if (FAILED(hr))
1047 goto fail;
1048
1050 &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter,
1051 &pVideoRenderer->renderer.pInputPin->pin, &renderer_BaseWindowFuncTable);
1052 if (FAILED(hr))
1053 goto fail;
1054
1056 &pVideoRenderer->renderer.filter, &pVideoRenderer->renderer.filter.csFilter,
1057 &pVideoRenderer->renderer.pInputPin->pin, &renderer_BaseControlVideoFuncTable);
1058 if (FAILED(hr))
1059 goto fail;
1060
1062 hr = E_FAIL;
1063 goto fail;
1064 }
1065
1066 *ppv = &pVideoRenderer->IUnknown_inner;
1067 return S_OK;
1068
1069fail:
1070 BaseRendererImpl_Release(&pVideoRenderer->renderer.filter.IBaseFilter_iface);
1072 return hr;
1073}
1074
1076{
1077 /* TODO: Attempt to use the VMR-7 renderer instead when possible */
1078 return VideoRenderer_create(pUnkOuter, ppv);
1079}
Arabic default style
Definition: afstyles.h:94
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define msg(x)
Definition: auth_time.c:54
@ AM_FILTER_MISC_FLAGS_IS_RENDERER
Definition: axextend.idl:1239
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
const GUID IID_IUnknown
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
const char * qzdebugstr_guid(const GUID *id)
Definition: main.c:279
static HRESULT WINAPI VideoRenderer_Pause(IBaseFilter *iface)
static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable
static const BaseWindowFuncTable renderer_BaseWindowFuncTable
static VideoRendererImpl * impl_from_IUnknown(IUnknown *iface)
static HRESULT WINAPI VideoRenderer_SetSourceRect(BaseControlVideo *iface, RECT *pSourceRect)
static HRESULT WINAPI VideoWindow_get_FullScreenMode(IVideoWindow *iface, LONG *FullScreenMode)
static HRESULT WINAPI VideoRenderer_GetStaticImage(BaseControlVideo *iface, LONG *pBufferSize, LONG *pDIBImage)
static HRESULT WINAPI VideoRenderer_ShouldDrawSampleNow(BaseRenderer *This, IMediaSample *pSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime)
static void VideoRenderer_AutoShowWindow(VideoRendererImpl *This)
static ULONG WINAPI VideoRendererInner_Release(IUnknown *iface)
static ULONG WINAPI BasicVideo_Release(IBasicVideo *iface)
static VideoRendererImpl * impl_from_IBaseFilter(IBaseFilter *iface)
Definition: videorenderer.c:78
static HRESULT WINAPI VideoWindow_QueryInterface(IVideoWindow *iface, REFIID riid, LPVOID *ppvObj)
static HRESULT WINAPI VideoRendererInner_QueryInterface(IUnknown *iface, REFIID riid, void **ppv)
static const IBaseFilterVtbl VideoRenderer_Vtbl
static HRESULT WINAPI VideoRenderer_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
static VideoRendererImpl * impl_from_IBasicVideo(IBasicVideo *iface)
Definition: videorenderer.c:93
static HRESULT WINAPI VideoWindow_put_FullScreenMode(IVideoWindow *iface, LONG FullScreenMode)
static RECT WINAPI VideoRenderer_GetDefaultRect(BaseWindow *iface)
static VOID WINAPI VideoRenderer_OnStartStreaming(BaseRenderer *iface)
static ULONG WINAPI VideoRendererInner_AddRef(IUnknown *iface)
static VIDEOINFOHEADER *WINAPI VideoRenderer_GetVideoFormat(BaseControlVideo *iface)
static VOID WINAPI VideoRenderer_OnStopStreaming(BaseRenderer *iface)
static HRESULT WINAPI VideoRenderer_IsDefaultTargetRect(BaseControlVideo *iface)
static const BaseRendererFuncTable BaseFuncTable
static BOOL WINAPI VideoRenderer_OnSize(BaseWindow *iface, LONG Width, LONG Height)
static ULONG WINAPI AMFilterMiscFlags_Release(IAMFilterMiscFlags *iface)
HRESULT VideoRenderer_create(IUnknown *pUnkOuter, void **ppv)
HRESULT VideoRendererDefault_create(IUnknown *pUnkOuter, LPVOID *ppv)
static HRESULT WINAPI VideoRenderer_EndFlush(BaseRenderer *iface)
static HRESULT WINAPI BasicVideo_QueryInterface(IBasicVideo *iface, REFIID riid, LPVOID *ppvObj)
static const IBasicVideoVtbl IBasicVideo_VTable
static HRESULT WINAPI VideoRenderer_SetDefaultSourceRect(BaseControlVideo *iface)
static ULONG WINAPI VideoRenderer_AddRef(IBaseFilter *iface)
static HRESULT WINAPI VideoRenderer_IsDefaultSourceRect(BaseControlVideo *iface)
static ULONG WINAPI VideoWindow_Release(IVideoWindow *iface)
static HRESULT WINAPI VideoRenderer_CheckMediaType(BaseRenderer *iface, const AM_MEDIA_TYPE *pmt)
static ULONG WINAPI VideoRenderer_Release(IBaseFilter *iface)
static VideoRendererImpl * impl_from_BaseControlVideo(BaseControlVideo *iface)
Definition: videorenderer.c:88
static ULONG WINAPI BasicVideo_AddRef(IBasicVideo *iface)
static LPWSTR WINAPI VideoRenderer_GetClassWindowStyles(BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)
static HRESULT WINAPI VideoRenderer_DoRenderSample(BaseRenderer *iface, IMediaSample *pSample)
static BOOL CreateRenderingSubsystem(VideoRendererImpl *This)
static DWORD WINAPI MessageLoop(LPVOID lpParameter)
Definition: videorenderer.c:98
static const IVideoWindowVtbl IVideoWindow_VTable
static VideoRendererImpl * impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
static DWORD VideoRenderer_SendSampleData(VideoRendererImpl *This, LPBYTE data, DWORD size)
static HRESULT WINAPI AMFilterMiscFlags_QueryInterface(IAMFilterMiscFlags *iface, REFIID riid, void **ppv)
static HRESULT WINAPI VideoRenderer_GetSourceRect(BaseControlVideo *iface, RECT *pSourceRect)
static VideoRendererImpl * impl_from_BaseWindow(BaseWindow *iface)
Definition: videorenderer.c:68
static VideoRendererImpl * impl_from_BaseRenderer(BaseRenderer *iface)
Definition: videorenderer.c:73
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl
static HRESULT WINAPI VideoRenderer_SetTargetRect(BaseControlVideo *iface, RECT *pTargetRect)
static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags(IAMFilterMiscFlags *iface)
static ULONG WINAPI VideoWindow_AddRef(IVideoWindow *iface)
static HRESULT WINAPI VideoRenderer_GetTargetRect(BaseControlVideo *iface, RECT *pTargetRect)
static ULONG WINAPI AMFilterMiscFlags_AddRef(IAMFilterMiscFlags *iface)
static const IUnknownVtbl IInner_VTable
static VideoRendererImpl * impl_from_IVideoWindow(IVideoWindow *iface)
Definition: videorenderer.c:83
static HRESULT WINAPI VideoRenderer_SetDefaultTargetRect(BaseControlVideo *iface)
#define CloseHandle
Definition: compat.h:739
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:55
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)
Definition: thread.c:137
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
#define INFINITE
Definition: serial.h:102
#define OAFALSE
Definition: dshow.h:53
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
_Must_inspect_result_ _In_ ULONG _Out_writes_bytes_ pBufferSize PVOID _Inout_ PULONG pBufferSize
Definition: fsrtlfuncs.h:1165
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLsizeiptr size
Definition: glext.h:5919
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
Definition: glfuncs.h:248
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:426
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
if(dx< 0)
Definition: linetemp.h:194
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
static PVOID ptr
Definition: dispmode.c:27
static IUnknown * pVideoRenderer
Definition: videorenderer.c:35
#define WS_SIZEBOX
Definition: pedump.c:642
#define WS_POPUP
Definition: pedump.c:616
long LONG
Definition: pedump.c:60
const GUID IID_IPin
Definition: pincontrol.cpp:15
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
HRESULT WINAPI BaseControlVideoImpl_GetTypeInfoCount(IBasicVideo *iface, UINT *pctinfo)
Definition: video.c:83
HRESULT WINAPI BaseControlVideoImpl_GetCurrentImage(IBasicVideo *iface, LONG *pBufferSize, LONG *pDIBImage)
Definition: video.c:576
HRESULT WINAPI BaseControlVideoImpl_get_SourceLeft(IBasicVideo *iface, LONG *pSourceLeft)
Definition: video.c:221
HRESULT WINAPI BaseControlVideoImpl_GetVideoSize(IBasicVideo *iface, LONG *pWidth, LONG *pHeight)
Definition: video.c:548
HRESULT WINAPI BaseControlVideoImpl_SetDefaultDestinationPosition(IBasicVideo *iface)
Definition: video.c:540
HRESULT WINAPI BaseControlVideoImpl_GetDestinationPosition(IBasicVideo *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
Definition: video.c:522
HRESULT WINAPI BaseControlVideoImpl_put_SourceTop(IBasicVideo *iface, LONG SourceTop)
Definition: video.c:268
HRESULT WINAPI BaseControlVideoImpl_get_SourceWidth(IBasicVideo *iface, LONG *pSourceWidth)
Definition: video.c:254
HRESULT WINAPI BaseControlVideoImpl_put_SourceHeight(IBasicVideo *iface, LONG SourceHeight)
Definition: video.c:302
HRESULT WINAPI BaseControlVideoImpl_get_DestinationWidth(IBasicVideo *iface, LONG *pDestinationWidth)
Definition: video.c:389
HRESULT WINAPI BaseControlVideoImpl_SetSourcePosition(IBasicVideo *iface, LONG Left, LONG Top, LONG Width, LONG Height)
Definition: video.c:470
HRESULT WINAPI BaseControlVideoImpl_get_SourceTop(IBasicVideo *iface, LONG *pSourceTop)
Definition: video.c:288
HRESULT WINAPI BaseControlVideo_Destroy(BaseControlVideo *pControlVideo)
Definition: video.c:51
HRESULT WINAPI BaseControlVideoImpl_put_DestinationWidth(IBasicVideo *iface, LONG DestinationWidth)
Definition: video.c:370
HRESULT WINAPI BaseControlVideoImpl_IsUsingDefaultDestination(IBasicVideo *iface)
Definition: video.c:592
HRESULT WINAPI BaseControlVideoImpl_put_SourceLeft(IBasicVideo *iface, LONG SourceLeft)
Definition: video.c:201
HRESULT WINAPI BaseControlVideoImpl_GetTypeInfo(IBasicVideo *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: video.c:90
HRESULT WINAPI BaseControlVideoImpl_GetSourcePosition(IBasicVideo *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
Definition: video.c:483
HRESULT WINAPI BaseControlVideoImpl_get_DestinationLeft(IBasicVideo *iface, LONG *pDestinationLeft)
Definition: video.c:356
HRESULT WINAPI BaseControlVideoImpl_get_DestinationHeight(IBasicVideo *iface, LONG *pDestinationHeight)
Definition: video.c:456
HRESULT WINAPI BaseControlVideoImpl_IsUsingDefaultSource(IBasicVideo *iface)
Definition: video.c:585
HRESULT WINAPI BaseControlVideoImpl_get_BitRate(IBasicVideo *iface, LONG *pBitRate)
Definition: video.c:137
HRESULT WINAPI BaseControlVideoImpl_get_DestinationTop(IBasicVideo *iface, LONG *pDestinationTop)
Definition: video.c:423
HRESULT WINAPI BaseControlVideoImpl_Invoke(IBasicVideo *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
Definition: video.c:104
HRESULT WINAPI BaseControlVideoImpl_put_SourceWidth(IBasicVideo *iface, LONG SourceWidth)
Definition: video.c:235
HRESULT WINAPI BaseControlVideoImpl_GetIDsOfNames(IBasicVideo *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: video.c:97
HRESULT WINAPI BaseControlVideoImpl_get_VideoHeight(IBasicVideo *iface, LONG *pVideoHeight)
Definition: video.c:186
HRESULT WINAPI BaseControlVideoImpl_get_SourceHeight(IBasicVideo *iface, LONG *pSourceHeight)
Definition: video.c:321
HRESULT WINAPI BaseControlVideoImpl_get_AvgTimePerFrame(IBasicVideo *iface, REFTIME *pAvgTimePerFrame)
Definition: video.c:120
HRESULT WINAPI BaseControlVideo_Init(BaseControlVideo *pControlVideo, const IBasicVideoVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin *pPin, const BaseControlVideoFuncTable *pFuncsTable)
Definition: video.c:38
HRESULT WINAPI BaseControlVideoImpl_GetVideoPaletteEntries(IBasicVideo *iface, LONG StartIndex, LONG Entries, LONG *pRetrieved, LONG *pPalette)
Definition: video.c:564
HRESULT WINAPI BaseControlVideoImpl_get_BitErrorRate(IBasicVideo *iface, LONG *pBitErrorRate)
Definition: video.c:154
HRESULT WINAPI BaseControlVideoImpl_put_DestinationTop(IBasicVideo *iface, LONG DestinationTop)
Definition: video.c:403
HRESULT WINAPI BaseControlVideoImpl_put_DestinationHeight(IBasicVideo *iface, LONG DestinationHeight)
Definition: video.c:437
HRESULT WINAPI BaseControlVideoImpl_put_DestinationLeft(IBasicVideo *iface, LONG DestinationLeft)
Definition: video.c:336
HRESULT WINAPI BaseControlVideoImpl_SetDefaultSourcePosition(IBasicVideo *iface)
Definition: video.c:501
HRESULT WINAPI BaseControlVideoImpl_get_VideoWidth(IBasicVideo *iface, LONG *pVideoWidth)
Definition: video.c:171
HRESULT WINAPI BaseControlVideoImpl_SetDestinationPosition(IBasicVideo *iface, LONG Left, LONG Top, LONG Width, LONG Height)
Definition: video.c:509
HRESULT WINAPI BaseControlWindow_Destroy(BaseControlWindow *pControlWindow)
Definition: window.c:223
HRESULT WINAPI BaseControlWindowImpl_HideCursor(IVideoWindow *iface, LONG HideCursor)
Definition: window.c:722
HRESULT WINAPI BaseControlWindowImpl_put_Visible(IVideoWindow *iface, LONG Visible)
Definition: window.c:404
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfo(IVideoWindow *iface, UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
Definition: window.c:236
HRESULT WINAPI BaseControlWindowImpl_put_WindowState(IVideoWindow *iface, LONG WindowState)
Definition: window.c:364
HRESULT WINAPI BaseControlWindowImpl_get_Top(IVideoWindow *iface, LONG *pTop)
Definition: window.c:492
HRESULT WINAPI BaseControlWindowImpl_put_Height(IVideoWindow *iface, LONG Height)
Definition: window.c:505
HRESULT WINAPI BaseControlWindowImpl_get_Height(IVideoWindow *iface, LONG *pHeight)
Definition: window.c:519
HRESULT WINAPI BaseControlWindow_Init(BaseControlWindow *pControlWindow, const IVideoWindowVtbl *lpVtbl, BaseFilter *owner, CRITICAL_SECTION *lock, BasePin *pPin, const BaseWindowFuncTable *pFuncsTable)
Definition: window.c:204
HRESULT WINAPI BaseControlWindowImpl_get_Width(IVideoWindow *iface, LONG *pWidth)
Definition: window.c:467
HRESULT WINAPI BaseControlWindowImpl_put_AutoShow(IVideoWindow *iface, LONG AutoShow)
Definition: window.c:342
HRESULT WINAPI BaseControlWindowImpl_Invoke(IVideoWindow *iface, DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExepInfo, UINT *puArgErr)
Definition: window.c:250
HRESULT WINAPI BaseControlWindowImpl_get_Caption(IVideoWindow *iface, BSTR *strCaption)
Definition: window.c:278
HRESULT WINAPI BaseControlWindowImpl_put_Top(IVideoWindow *iface, LONG Top)
Definition: window.c:478
HRESULT WINAPI BaseControlWindowImpl_put_Owner(IVideoWindow *iface, OAHWND Owner)
Definition: window.c:530
HRESULT WINAPI BaseControlWindowImpl_get_WindowStyle(IVideoWindow *iface, LONG *WindowStyle)
Definition: window.c:308
HRESULT WINAPI BaseControlWindowImpl_GetWindowPosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
Definition: window.c:657
HRESULT WINAPI BaseControlWindowImpl_get_WindowState(IVideoWindow *iface, LONG *WindowState)
Definition: window.c:373
HRESULT WINAPI BaseControlWindowImpl_GetMinIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight)
Definition: window.c:685
HRESULT WINAPI BaseControlWindowImpl_put_Width(IVideoWindow *iface, LONG Width)
Definition: window.c:453
HRESULT WINAPI BaseControlWindowImpl_get_Left(IVideoWindow *iface, LONG *pLeft)
Definition: window.c:440
HRESULT WINAPI BaseControlWindowImpl_GetIDsOfNames(IVideoWindow *iface, REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
Definition: window.c:243
HRESULT WINAPI BaseControlWindowImpl_GetMaxIdealImageSize(IVideoWindow *iface, LONG *pWidth, LONG *pHeight)
Definition: window.c:699
HRESULT WINAPI BaseControlWindowImpl_get_WindowStyleEx(IVideoWindow *iface, LONG *WindowStyleEx)
Definition: window.c:331
HRESULT WINAPI BaseControlWindowImpl_put_Left(IVideoWindow *iface, LONG Left)
Definition: window.c:426
HRESULT WINAPI BaseControlWindowImpl_SetWindowPosition(IVideoWindow *iface, LONG Left, LONG Top, LONG Width, LONG Height)
Definition: window.c:642
HRESULT WINAPI BaseControlWindowImpl_put_BorderColor(IVideoWindow *iface, LONG Color)
Definition: window.c:593
HRESULT WINAPI BaseControlWindowImpl_get_Visible(IVideoWindow *iface, LONG *pVisible)
Definition: window.c:415
HRESULT WINAPI BaseControlWindowImpl_get_BackgroundPalette(IVideoWindow *iface, LONG *pBackgroundPalette)
Definition: window.c:395
BOOL WINAPI BaseControlWindowImpl_PossiblyEatMessage(BaseWindow *This, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: window.c:164
HRESULT WINAPI BaseControlWindowImpl_get_MessageDrain(IVideoWindow *iface, OAHWND *Drain)
Definition: window.c:573
HRESULT WINAPI BaseControlWindowImpl_put_MessageDrain(IVideoWindow *iface, OAHWND Drain)
Definition: window.c:562
HRESULT WINAPI BaseControlWindowImpl_SetWindowForeground(IVideoWindow *iface, LONG Focus)
Definition: window.c:615
HRESULT WINAPI BaseControlWindowImpl_get_AutoShow(IVideoWindow *iface, LONG *AutoShow)
Definition: window.c:353
HRESULT WINAPI BaseControlWindowImpl_GetTypeInfoCount(IVideoWindow *iface, UINT *pctinfo)
Definition: window.c:229
HRESULT WINAPI BaseControlWindowImpl_put_WindowStyle(IVideoWindow *iface, LONG WindowStyle)
Definition: window.c:289
HRESULT WINAPI BaseControlWindowImpl_get_Owner(IVideoWindow *iface, OAHWND *Owner)
Definition: window.c:551
HRESULT WINAPI BaseControlWindowImpl_GetRestorePosition(IVideoWindow *iface, LONG *pLeft, LONG *pTop, LONG *pWidth, LONG *pHeight)
Definition: window.c:713
HRESULT WINAPI BaseControlWindowImpl_NotifyOwnerMessage(IVideoWindow *iface, OAHWND hwnd, LONG uMsg, LONG_PTR wParam, LONG_PTR lParam)
Definition: window.c:673
HRESULT WINAPI BaseControlWindowImpl_put_BackgroundPalette(IVideoWindow *iface, LONG BackgroundPalette)
Definition: window.c:386
HRESULT WINAPI BaseControlWindowImpl_IsCursorHidden(IVideoWindow *iface, LONG *CursorHidden)
Definition: window.c:731
HRESULT WINAPI BaseControlWindowImpl_get_BorderColor(IVideoWindow *iface, LONG *Color)
Definition: window.c:584
HRESULT WINAPI BaseControlWindowImpl_put_Caption(IVideoWindow *iface, BSTR strCaption)
Definition: window.c:266
HRESULT WINAPI BaseControlWindowImpl_put_WindowStyleEx(IVideoWindow *iface, LONG WindowStyleEx)
Definition: window.c:319
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
& rect
Definition: startmenu.cpp:1413
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Height, LONG Width)
Definition: window.c:73
HRESULT WINAPI BaseRendererImpl_SetSyncSource(IBaseFilter *iface, IReferenceClock *clock)
Definition: renderer.c:537
HRESULT WINAPI BaseRendererImpl_EndFlush(BaseRenderer *iface)
Definition: renderer.c:599
HRESULT WINAPI BaseFilterImpl_GetClassID(IBaseFilter *iface, CLSID *pClsid)
Definition: filter.c:77
ULONG WINAPI BaseRendererImpl_Release(IBaseFilter *iface)
Definition: renderer.c:296
HRESULT WINAPI BaseFilterImpl_QueryFilterInfo(IBaseFilter *iface, FILTER_INFO *pInfo)
Definition: filter.c:145
HRESULT WINAPI BaseRendererImpl_Stop(IBaseFilter *iface)
Definition: renderer.c:440
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This)
Definition: window.c:100
HRESULT WINAPI BaseRendererImpl_FindPin(IBaseFilter *iface, LPCWSTR Id, IPin **ppPin)
Definition: renderer.c:421
HRESULT WINAPI BaseRendererImpl_Run(IBaseFilter *iface, REFERENCE_TIME tStart)
Definition: renderer.c:461
ULONG WINAPI BaseFilterImpl_AddRef(IBaseFilter *iface)
Definition: filter.c:54
HRESULT WINAPI BaseFilterImpl_JoinFilterGraph(IBaseFilter *iface, IFilterGraph *pGraph, LPCWSTR pName)
Definition: filter.c:159
HRESULT WINAPI BaseFilterImpl_QueryVendorInfo(IBaseFilter *iface, LPWSTR *pVendorInfo)
Definition: filter.c:178
HRESULT WINAPI BaseFilterImpl_GetSyncSource(IBaseFilter *iface, IReferenceClock **ppClock)
Definition: filter.c:119
HRESULT WINAPI BaseRendererImpl_GetState(IBaseFilter *iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
Definition: renderer.c:550
HRESULT WINAPI BaseRendererImpl_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: renderer.c:280
HRESULT WINAPI BaseFilterImpl_EnumPins(IBaseFilter *iface, IEnumPins **ppEnum)
Definition: filter.c:135
HRESULT WINAPI BaseRenderer_Init(BaseRenderer *This, const IBaseFilterVtbl *Vtbl, IUnknown *pUnkOuter, const CLSID *pClsid, DWORD_PTR DebugInfo, const BaseRendererFuncTable *pBaseFuncsTable)
Definition: renderer.c:241
DWORD biCompression
Definition: amvideo.idl:35
DWORD biSizeImage
Definition: amvideo.idl:36
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
BasePin pin
Definition: strmbase.h:90
LPCRITICAL_SECTION pCritSec
Definition: strmbase.h:37
CRITICAL_SECTION csRenderLock
Definition: strmbase.h:584
BaseInputPin * pInputPin
Definition: strmbase.h:582
BaseFilter filter
Definition: strmbase.h:580
IUnknown IUnknown_inner
Definition: videorenderer.c:49
IUnknown * outer_unk
Definition: videorenderer.c:51
BaseControlVideo baseControlVideo
Definition: videorenderer.c:47
BaseControlWindow baseControlWindow
Definition: videorenderer.c:46
IAMFilterMiscFlags IAMFilterMiscFlags_iface
Definition: videorenderer.c:50
BaseRenderer renderer
Definition: videorenderer.c:45
Definition: format.c:58
BITMAPINFOHEADER bmiHeader
Definition: dvdmedia.h:41
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateEventW(IN LPSECURITY_ATTRIBUTES lpEventAttributes OPTIONAL, IN BOOL bManualReset, IN BOOL bInitialState, IN LPCWSTR lpName OPTIONAL)
Definition: synch.c:651
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
BOOL WINAPI DECLSPEC_HOTPATCH ResetEvent(IN HANDLE hEvent)
Definition: synch.c:714
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
uint32_t DWORD_PTR
Definition: typedefs.h:65
unsigned char * LPBYTE
Definition: typedefs.h:53
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
_In_ HFONT _Out_ PUINT _Out_ PUINT Width
Definition: font.h:89
_In_ HFONT _Out_ PUINT Height
Definition: font.h:88
#define VFW_E_NOT_PAUSED
Definition: vfwmsgs.h:76
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
#define VFW_E_RUNTIME_ERROR
Definition: vfwmsgs.h:50
#define ZeroMemory
Definition: winbase.h:1737
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:2357
#define E_NOINTERFACE
Definition: winerror.h:2364
#define E_UNEXPECTED
Definition: winerror.h:2456
#define E_POINTER
Definition: winerror.h:2365
#define DIB_RGB_COLORS
Definition: wingdi.h:367
#define SRCCOPY
Definition: wingdi.h:333
int WINAPI StretchDIBits(_In_ HDC, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_ int, _In_opt_ const VOID *, _In_ const BITMAPINFO *, _In_ UINT, _In_ DWORD)
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)
#define SW_HIDE
Definition: winuser.h:771
BOOL WINAPI RedrawWindow(_In_opt_ HWND, _In_opt_ LPCRECT, _In_opt_ HRGN, _In_ UINT)
#define WM_QUIT
Definition: winuser.h:1626
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SM_CYSCREEN
Definition: winuser.h:963
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
LONG WINAPI SetWindowLongW(_In_ HWND, _In_ int, _In_ LONG)
LONG WINAPI GetWindowLongW(_In_ HWND, _In_ int)
#define SWP_NOMOVE
Definition: winuser.h:1247
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
#define RDW_ERASE
Definition: winuser.h:1214
#define SWP_DEFERERASE
Definition: winuser.h:1255
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define HWND_TOP
Definition: winuser.h:1210
BOOL WINAPI PostThreadMessageW(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SWP_SHOWWINDOW
Definition: winuser.h:1251
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define SW_SHOW
Definition: winuser.h:778
#define SM_CXSCREEN
Definition: winuser.h:962
#define SWP_NOZORDER
Definition: winuser.h:1250
#define GWL_STYLE
Definition: winuser.h:855
int WINAPI GetSystemMetrics(_In_ int)
#define RDW_INVALIDATE
Definition: winuser.h:1217
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define GWL_EXSTYLE
Definition: winuser.h:854
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184
unsigned char BYTE
Definition: xxhash.c:193