2 * Video Renderer (Fullscreen and Windowed using Direct Draw)
4 * Copyright 2004 Christian Costa
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
23 #define NONAMELESSSTRUCT
24 #define NONAMELESSUNION
25 #include "quartz_private.h"
26 #include "control_private.h"
41 #include "wine/unicode.h"
42 #include "wine/debug.h"
44 WINE_DEFAULT_DEBUG_CHANNEL(quartz);
46 static BOOL wnd_class_registered = FALSE;
48 static const WCHAR wcsInputPinName[] = {'i','n','p','u','t',' ','p','i','n',0};
50 static const IBaseFilterVtbl VideoRenderer_Vtbl;
51 static const IUnknownVtbl IInner_VTable;
52 static const IBasicVideoVtbl IBasicVideo_VTable;
53 static const IVideoWindowVtbl IVideoWindow_VTable;
54 static const IPinVtbl VideoRenderer_InputPin_Vtbl;
56 typedef struct VideoRendererImpl
58 const IBaseFilterVtbl * lpVtbl;
59 const IBasicVideoVtbl * IBasicVideo_vtbl;
60 const IVideoWindowVtbl * IVideoWindow_vtbl;
61 const IUnknownVtbl * IInner_vtbl;
64 CRITICAL_SECTION csFilter;
66 REFERENCE_TIME rtStreamStart;
67 IReferenceClock * pClock;
68 FILTER_INFO filterInfo;
90 REFERENCE_TIME rtLastStop;
91 MediaSeekingImpl mediaSeeking;
93 /* During pause we can hold a single sample, for use in GetCurrentImage */
94 IMediaSample *sample_held;
97 static LRESULT CALLBACK VideoWndProcA(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
99 VideoRendererImpl* pVideoRenderer = (VideoRendererImpl*)GetWindowLongA(hwnd, 0);
100 LPRECT lprect = (LPRECT)lParam;
102 if (pVideoRenderer && pVideoRenderer->hWndMsgDrain)
108 case WM_LBUTTONDBLCLK:
111 case WM_MBUTTONDBLCLK:
114 case WM_MOUSEACTIVATE:
116 case WM_NCLBUTTONDBLCLK:
117 case WM_NCLBUTTONDOWN:
119 case WM_NCMBUTTONDBLCLK:
120 case WM_NCMBUTTONDOWN:
123 case WM_NCRBUTTONDBLCLK:
124 case WM_NCRBUTTONDOWN:
126 case WM_RBUTTONDBLCLK:
129 PostMessageA(pVideoRenderer->hWndMsgDrain, uMsg, wParam, lParam);
139 /* TRACE("WM_SIZING %d %d %d %d\n", lprect->left, lprect->top, lprect->right, lprect->bottom); */
140 SetWindowPos(hwnd, NULL, lprect->left, lprect->top, lprect->right - lprect->left, lprect->bottom - lprect->top, SWP_NOZORDER);
141 GetClientRect(hwnd, &pVideoRenderer->DestRect);
142 TRACE("WM_SIZING: DestRect=(%d,%d),(%d,%d)\n",
143 pVideoRenderer->DestRect.left,
144 pVideoRenderer->DestRect.top,
145 pVideoRenderer->DestRect.right - pVideoRenderer->DestRect.left,
146 pVideoRenderer->DestRect.bottom - pVideoRenderer->DestRect.top);
149 TRACE("WM_SIZE %d %d\n", LOWORD(lParam), HIWORD(lParam));
150 GetClientRect(hwnd, &pVideoRenderer->DestRect);
151 TRACE("WM_SIZING: DestRect=(%d,%d),(%d,%d)\n",
152 pVideoRenderer->DestRect.left,
153 pVideoRenderer->DestRect.top,
154 pVideoRenderer->DestRect.right - pVideoRenderer->DestRect.left,
155 pVideoRenderer->DestRect.bottom - pVideoRenderer->DestRect.top);
158 return DefWindowProcA(hwnd, uMsg, wParam, lParam);
163 static BOOL CreateRenderingWindow(VideoRendererImpl* This)
167 TRACE("(%p)->()\n", This);
170 winclass.lpfnWndProc = VideoWndProcA;
171 winclass.cbClsExtra = 0;
172 winclass.cbWndExtra = sizeof(VideoRendererImpl*);
173 winclass.hInstance = NULL;
174 winclass.hIcon = NULL;
175 winclass.hCursor = NULL;
176 winclass.hbrBackground = GetStockObject(BLACK_BRUSH);
177 winclass.lpszMenuName = NULL;
178 winclass.lpszClassName = "Wine ActiveMovie Class";
180 if (!wnd_class_registered)
182 if (!RegisterClassA(&winclass))
184 ERR("Unable to register window %u\n", GetLastError());
187 wnd_class_registered = TRUE;
190 This->hWnd = CreateWindowExA(0, "Wine ActiveMovie Class", "Wine ActiveMovie Window", WS_SIZEBOX,
191 CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, NULL,
196 ERR("Unable to create window\n");
200 SetWindowLongA(This->hWnd, 0, (LONG)This);
205 static DWORD WINAPI MessageLoop(LPVOID lpParameter)
207 VideoRendererImpl* This = (VideoRendererImpl*) lpParameter;
211 TRACE("Starting message loop\n");
213 if (!CreateRenderingWindow(This))
215 This->ThreadResult = FALSE;
216 SetEvent(This->hEvent);
220 This->ThreadResult = TRUE;
221 SetEvent(This->hEvent);
223 while ((fGotMessage = GetMessageA(&msg, NULL, 0, 0)) != 0 && fGotMessage != -1)
225 TranslateMessage(&msg);
226 DispatchMessageA(&msg);
229 TRACE("End of message loop\n");
234 static BOOL CreateRenderingSubsystem(VideoRendererImpl* This)
236 This->hEvent = CreateEventW(NULL, TRUE, FALSE, NULL);
240 This->hThread = CreateThread(NULL, 0, MessageLoop, (LPVOID)This, 0, &This->ThreadID);
243 CloseHandle(This->hEvent);
247 WaitForSingleObject(This->hEvent, INFINITE);
249 if (!This->ThreadResult)
251 CloseHandle(This->hEvent);
252 CloseHandle(This->hThread);
259 static const IMemInputPinVtbl MemInputPin_Vtbl =
261 MemInputPin_QueryInterface,
264 MemInputPin_GetAllocator,
265 MemInputPin_NotifyAllocator,
266 MemInputPin_GetAllocatorRequirements,
268 MemInputPin_ReceiveMultiple,
269 MemInputPin_ReceiveCanBlock
272 static DWORD VideoRenderer_SendSampleData(VideoRendererImpl* This, LPBYTE data, DWORD size)
278 BITMAPINFOHEADER *bmiHeader;
280 TRACE("%p %p %d\n", This, data, size);
282 sdesc.dwSize = sizeof(sdesc);
283 hr = IPin_ConnectionMediaType((IPin *)This->pInputPin, &amt);
285 ERR("Unable to retrieve media type\n");
289 if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo))
291 bmiHeader = &((VIDEOINFOHEADER *)amt.pbFormat)->bmiHeader;
293 else if (IsEqualIID(&amt.formattype, &FORMAT_VideoInfo2))
295 bmiHeader = &((VIDEOINFOHEADER2 *)amt.pbFormat)->bmiHeader;
299 FIXME("Unknown type %s\n", debugstr_guid(&amt.subtype));
300 return VFW_E_RUNTIME_ERROR;
304 TRACE("biSize = %d\n", bmiHeader->biSize);
305 TRACE("biWidth = %d\n", bmiHeader->biWidth);
306 TRACE("biHeight = %d\n", bmiHeader->biHeight);
307 TRACE("biPlanes = %d\n", bmiHeader->biPlanes);
308 TRACE("biBitCount = %d\n", bmiHeader->biBitCount);
309 TRACE("biCompression = %s\n", debugstr_an((LPSTR)&(bmiHeader->biCompression), 4));
310 TRACE("biSizeImage = %d\n", bmiHeader->biSizeImage);
314 if (!This->WindowPos.right || !This->WindowPos.bottom)
315 This->WindowPos = This->SourceRect;
317 TRACE("WindowPos: %d %d %d %d\n", This->WindowPos.left, This->WindowPos.top, This->WindowPos.right, This->WindowPos.bottom);
318 SetWindowPos(This->hWnd, NULL,
319 This->WindowPos.left,
321 This->WindowPos.right - This->WindowPos.left,
322 This->WindowPos.bottom - This->WindowPos.top,
323 SWP_NOZORDER|SWP_NOMOVE);
325 GetClientRect(This->hWnd, &This->DestRect);
329 hDC = GetDC(This->hWnd);
332 ERR("Cannot get DC from window!\n");
336 TRACE("Src Rect: %d %d %d %d\n", This->SourceRect.left, This->SourceRect.top, This->SourceRect.right, This->SourceRect.bottom);
337 TRACE("Dst Rect: %d %d %d %d\n", This->DestRect.left, This->DestRect.top, This->DestRect.right, This->DestRect.bottom);
339 StretchDIBits(hDC, This->DestRect.left, This->DestRect.top, This->DestRect.right -This->DestRect.left,
340 This->DestRect.bottom - This->DestRect.top, This->SourceRect.left, This->SourceRect.top,
341 This->SourceRect.right - This->SourceRect.left, This->SourceRect.bottom - This->SourceRect.top,
342 data, (BITMAPINFO *)bmiHeader, DIB_RGB_COLORS, SRCCOPY);
344 ReleaseDC(This->hWnd, hDC);
346 ShowWindow(This->hWnd, SW_SHOW);
351 static HRESULT VideoRenderer_Sample(LPVOID iface, IMediaSample * pSample)
353 VideoRendererImpl *This = (VideoRendererImpl *)iface;
354 LPBYTE pbSrcStream = NULL;
355 long cbSrcStream = 0;
356 REFERENCE_TIME tStart, tStop;
358 EnterCriticalSection(&This->csFilter);
359 if (This->pInputPin->flushing || This->pInputPin->end_of_stream)
362 if (This->state == State_Stopped)
364 LeaveCriticalSection(&This->csFilter);
365 return VFW_E_WRONG_STATE;
368 TRACE("%p %p\n", iface, pSample);
370 hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
372 ERR("Cannot get sample time (%x)\n", hr);
374 if (This->rtLastStop != tStart)
376 if (IMediaSample_IsDiscontinuity(pSample) == S_FALSE)
377 ERR("Unexpected discontinuity: Last: %u.%03u, tStart: %u.%03u\n",
378 (DWORD)(This->rtLastStop / 10000000),
379 (DWORD)((This->rtLastStop / 10000)%1000),
380 (DWORD)(tStart / 10000000), (DWORD)((tStart / 10000)%1000));
381 This->rtLastStop = tStart;
384 /* Preroll means the sample isn't shown, this is used for key frames and things like that */
385 if (IMediaSample_IsPreroll(pSample) == S_OK)
387 This->rtLastStop = tStop;
388 LeaveCriticalSection(&This->csFilter);
392 hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
395 ERR("Cannot get pointer to sample data (%x)\n", hr);
396 LeaveCriticalSection(&This->csFilter);
400 cbSrcStream = IMediaSample_GetActualDataLength(pSample);
402 TRACE("val %p %ld\n", pbSrcStream, cbSrcStream);
404 #if 0 /* For debugging purpose */
407 for(i = 0; i < cbSrcStream; i++)
409 if ((i!=0) && !(i%16))
411 TRACE("%02x ", pbSrcStream[i]);
417 SetEvent(This->hEvent);
418 if (This->state == State_Paused)
420 This->sample_held = pSample;
421 LeaveCriticalSection(&This->csFilter);
422 WaitForSingleObject(This->blocked, INFINITE);
423 EnterCriticalSection(&This->csFilter);
424 This->sample_held = NULL;
425 if (This->state == State_Paused)
428 LeaveCriticalSection(&This->csFilter);
431 if (This->state == State_Stopped)
433 LeaveCriticalSection(&This->csFilter);
434 return VFW_E_WRONG_STATE;
438 if (This->pClock && This->state == State_Running)
440 REFERENCE_TIME time, trefstart, trefstop;
443 /* Perhaps I <SHOULD> use the reference clock AdviseTime function here
444 * I'm not going to! When I tried, it seemed to generate lag and
445 * it caused instability.
447 IReferenceClock_GetTime(This->pClock, &time);
449 trefstart = This->rtStreamStart;
450 trefstop = (REFERENCE_TIME)((double)(tStop - tStart) / This->pInputPin->dRate) + This->rtStreamStart;
451 delta = (LONG)((trefstart-time)/10000);
452 This->rtStreamStart = trefstop;
453 This->rtLastStop = tStop;
457 TRACE("Sleeping for %u ms\n", delta);
460 else if (time > trefstop)
462 TRACE("Dropping sample: Time: %u.%03u ms trefstop: %u.%03u ms!\n",
463 (DWORD)(time / 10000000), (DWORD)((time / 10000)%1000),
464 (DWORD)(trefstop / 10000000), (DWORD)((trefstop / 10000)%1000) );
465 This->rtLastStop = tStop;
466 LeaveCriticalSection(&This->csFilter);
470 This->rtLastStop = tStop;
472 VideoRenderer_SendSampleData(This, pbSrcStream, cbSrcStream);
474 LeaveCriticalSection(&This->csFilter);
478 static HRESULT VideoRenderer_QueryAccept(LPVOID iface, const AM_MEDIA_TYPE * pmt)
480 if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video))
483 if (IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB32) ||
484 IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB24) ||
485 IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB565) ||
486 IsEqualIID(&pmt->subtype, &MEDIASUBTYPE_RGB8))
488 VideoRendererImpl* This = (VideoRendererImpl*) iface;
490 if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo))
492 VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pmt->pbFormat;
493 This->SourceRect.left = 0;
494 This->SourceRect.top = 0;
495 This->SourceRect.right = This->VideoWidth = format->bmiHeader.biWidth;
496 This->SourceRect.bottom = This->VideoHeight = format->bmiHeader.biHeight;
498 else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2))
500 VIDEOINFOHEADER2 *format2 = (VIDEOINFOHEADER2 *)pmt->pbFormat;
502 This->SourceRect.left = 0;
503 This->SourceRect.top = 0;
504 This->SourceRect.right = This->VideoWidth = format2->bmiHeader.biWidth;
505 This->SourceRect.bottom = This->VideoHeight = format2->bmiHeader.biHeight;
509 WARN("Format type %s not supported\n", debugstr_guid(&pmt->formattype));
517 static inline VideoRendererImpl *impl_from_IMediaSeeking( IMediaSeeking *iface )
519 return (VideoRendererImpl *)((char*)iface - FIELD_OFFSET(VideoRendererImpl, mediaSeeking.lpVtbl));
522 static HRESULT WINAPI VideoRendererImpl_Seeking_QueryInterface(IMediaSeeking * iface, REFIID riid, LPVOID * ppv)
524 VideoRendererImpl *This = impl_from_IMediaSeeking(iface);
526 return IUnknown_QueryInterface((IUnknown *)This, riid, ppv);
529 static ULONG WINAPI VideoRendererImpl_Seeking_AddRef(IMediaSeeking * iface)
531 VideoRendererImpl *This = impl_from_IMediaSeeking(iface);
533 return IUnknown_AddRef((IUnknown *)This);
536 static ULONG WINAPI VideoRendererImpl_Seeking_Release(IMediaSeeking * iface)
538 VideoRendererImpl *This = impl_from_IMediaSeeking(iface);
540 return IUnknown_Release((IUnknown *)This);
543 static const IMediaSeekingVtbl VideoRendererImpl_Seeking_Vtbl =
545 VideoRendererImpl_Seeking_QueryInterface,
546 VideoRendererImpl_Seeking_AddRef,
547 VideoRendererImpl_Seeking_Release,
548 MediaSeekingImpl_GetCapabilities,
549 MediaSeekingImpl_CheckCapabilities,
550 MediaSeekingImpl_IsFormatSupported,
551 MediaSeekingImpl_QueryPreferredFormat,
552 MediaSeekingImpl_GetTimeFormat,
553 MediaSeekingImpl_IsUsingTimeFormat,
554 MediaSeekingImpl_SetTimeFormat,
555 MediaSeekingImpl_GetDuration,
556 MediaSeekingImpl_GetStopPosition,
557 MediaSeekingImpl_GetCurrentPosition,
558 MediaSeekingImpl_ConvertTimeFormat,
559 MediaSeekingImpl_SetPositions,
560 MediaSeekingImpl_GetPositions,
561 MediaSeekingImpl_GetAvailable,
562 MediaSeekingImpl_SetRate,
563 MediaSeekingImpl_GetRate,
564 MediaSeekingImpl_GetPreroll
567 static HRESULT VideoRendererImpl_Change(IBaseFilter *iface)
569 TRACE("(%p)\n", iface);
573 HRESULT VideoRenderer_create(IUnknown * pUnkOuter, LPVOID * ppv)
577 VideoRendererImpl * pVideoRenderer;
579 TRACE("(%p, %p)\n", pUnkOuter, ppv);
583 pVideoRenderer = CoTaskMemAlloc(sizeof(VideoRendererImpl));
584 pVideoRenderer->pUnkOuter = pUnkOuter;
585 pVideoRenderer->bUnkOuterValid = FALSE;
586 pVideoRenderer->bAggregatable = FALSE;
587 pVideoRenderer->IInner_vtbl = &IInner_VTable;
589 pVideoRenderer->lpVtbl = &VideoRenderer_Vtbl;
590 pVideoRenderer->IBasicVideo_vtbl = &IBasicVideo_VTable;
591 pVideoRenderer->IVideoWindow_vtbl = &IVideoWindow_VTable;
593 pVideoRenderer->refCount = 1;
594 InitializeCriticalSection(&pVideoRenderer->csFilter);
595 pVideoRenderer->csFilter.DebugInfo->Spare[0] = (DWORD_PTR)(__FILE__ ": VideoRendererImpl.csFilter");
596 pVideoRenderer->state = State_Stopped;
597 pVideoRenderer->pClock = NULL;
598 pVideoRenderer->init = 0;
599 pVideoRenderer->AutoShow = 1;
600 pVideoRenderer->rtLastStop = -1;
601 ZeroMemory(&pVideoRenderer->filterInfo, sizeof(FILTER_INFO));
602 ZeroMemory(&pVideoRenderer->SourceRect, sizeof(RECT));
603 ZeroMemory(&pVideoRenderer->DestRect, sizeof(RECT));
604 ZeroMemory(&pVideoRenderer->WindowPos, sizeof(RECT));
605 pVideoRenderer->hWndMsgDrain = NULL;
607 /* construct input pin */
608 piInput.dir = PINDIR_INPUT;
609 piInput.pFilter = (IBaseFilter *)pVideoRenderer;
610 lstrcpynW(piInput.achName, wcsInputPinName, sizeof(piInput.achName) / sizeof(piInput.achName[0]));
612 hr = InputPin_Construct(&VideoRenderer_InputPin_Vtbl, &piInput, VideoRenderer_Sample, (LPVOID)pVideoRenderer, VideoRenderer_QueryAccept, NULL, &pVideoRenderer->csFilter, NULL, (IPin **)&pVideoRenderer->pInputPin);
616 MediaSeekingImpl_Init((IBaseFilter*)pVideoRenderer, VideoRendererImpl_Change, VideoRendererImpl_Change, VideoRendererImpl_Change, &pVideoRenderer->mediaSeeking, &pVideoRenderer->csFilter);
617 pVideoRenderer->mediaSeeking.lpVtbl = &VideoRendererImpl_Seeking_Vtbl;
619 pVideoRenderer->sample_held = NULL;
620 *ppv = (LPVOID)pVideoRenderer;
624 pVideoRenderer->csFilter.DebugInfo->Spare[0] = 0;
625 DeleteCriticalSection(&pVideoRenderer->csFilter);
626 CoTaskMemFree(pVideoRenderer);
629 if (!CreateRenderingSubsystem(pVideoRenderer))
632 pVideoRenderer->blocked = CreateEventW(NULL, FALSE, FALSE, NULL);
633 if (!pVideoRenderer->blocked)
635 hr = HRESULT_FROM_WIN32(GetLastError());
636 IUnknown_Release((IUnknown *)pVideoRenderer);
642 HRESULT VideoRendererDefault_create(IUnknown * pUnkOuter, LPVOID * ppv)
644 /* TODO: Attempt to use the VMR-7 renderer instead when possible */
645 return VideoRenderer_create(pUnkOuter, ppv);
648 static HRESULT WINAPI VideoRendererInner_QueryInterface(IUnknown * iface, REFIID riid, LPVOID * ppv)
650 ICOM_THIS_MULTI(VideoRendererImpl, IInner_vtbl, iface);
651 TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv);
653 if (This->bAggregatable)
654 This->bUnkOuterValid = TRUE;
658 if (IsEqualIID(riid, &IID_IUnknown))
659 *ppv = (LPVOID)&(This->IInner_vtbl);
660 else if (IsEqualIID(riid, &IID_IPersist))
662 else if (IsEqualIID(riid, &IID_IMediaFilter))
664 else if (IsEqualIID(riid, &IID_IBaseFilter))
666 else if (IsEqualIID(riid, &IID_IBasicVideo))
667 *ppv = (LPVOID)&(This->IBasicVideo_vtbl);
668 else if (IsEqualIID(riid, &IID_IVideoWindow))
669 *ppv = (LPVOID)&(This->IVideoWindow_vtbl);
670 else if (IsEqualIID(riid, &IID_IMediaSeeking))
671 *ppv = &This->mediaSeeking;
675 IUnknown_AddRef((IUnknown *)(*ppv));
679 if (!IsEqualIID(riid, &IID_IPin))
680 FIXME("No interface for %s!\n", qzdebugstr_guid(riid));
682 return E_NOINTERFACE;
685 static ULONG WINAPI VideoRendererInner_AddRef(IUnknown * iface)
687 ICOM_THIS_MULTI(VideoRendererImpl, IInner_vtbl, iface);
688 ULONG refCount = InterlockedIncrement(&This->refCount);
690 TRACE("(%p/%p)->() AddRef from %d\n", This, iface, refCount - 1);
695 static ULONG WINAPI VideoRendererInner_Release(IUnknown * iface)
697 ICOM_THIS_MULTI(VideoRendererImpl, IInner_vtbl, iface);
698 ULONG refCount = InterlockedDecrement(&This->refCount);
700 TRACE("(%p/%p)->() Release from %d\n", This, iface, refCount + 1);
706 DestroyWindow(This->hWnd);
707 PostThreadMessageA(This->ThreadID, WM_QUIT, 0, 0);
708 WaitForSingleObject(This->hThread, INFINITE);
709 CloseHandle(This->hThread);
710 CloseHandle(This->hEvent);
713 IReferenceClock_Release(This->pClock);
715 if (SUCCEEDED(IPin_ConnectedTo((IPin *)This->pInputPin, &pConnectedTo)))
717 IPin_Disconnect(pConnectedTo);
718 IPin_Release(pConnectedTo);
720 IPin_Disconnect((IPin *)This->pInputPin);
722 IPin_Release((IPin *)This->pInputPin);
726 This->csFilter.DebugInfo->Spare[0] = 0;
727 DeleteCriticalSection(&This->csFilter);
729 TRACE("Destroying Video Renderer\n");
738 static const IUnknownVtbl IInner_VTable =
740 VideoRendererInner_QueryInterface,
741 VideoRendererInner_AddRef,
742 VideoRendererInner_Release
745 static HRESULT WINAPI VideoRenderer_QueryInterface(IBaseFilter * iface, REFIID riid, LPVOID * ppv)
747 VideoRendererImpl *This = (VideoRendererImpl *)iface;
749 if (This->bAggregatable)
750 This->bUnkOuterValid = TRUE;
754 if (This->bAggregatable)
755 return IUnknown_QueryInterface(This->pUnkOuter, riid, ppv);
757 if (IsEqualIID(riid, &IID_IUnknown))
761 IUnknown_AddRef((IUnknown *)&(This->IInner_vtbl));
762 hr = IUnknown_QueryInterface((IUnknown *)&(This->IInner_vtbl), riid, ppv);
763 IUnknown_Release((IUnknown *)&(This->IInner_vtbl));
764 This->bAggregatable = TRUE;
769 return E_NOINTERFACE;
772 return IUnknown_QueryInterface((IUnknown *)&(This->IInner_vtbl), riid, ppv);
775 static ULONG WINAPI VideoRenderer_AddRef(IBaseFilter * iface)
777 VideoRendererImpl *This = (VideoRendererImpl *)iface;
779 if (This->pUnkOuter && This->bUnkOuterValid)
780 return IUnknown_AddRef(This->pUnkOuter);
781 return IUnknown_AddRef((IUnknown *)&(This->IInner_vtbl));
784 static ULONG WINAPI VideoRenderer_Release(IBaseFilter * iface)
786 VideoRendererImpl *This = (VideoRendererImpl *)iface;
788 if (This->pUnkOuter && This->bUnkOuterValid)
789 return IUnknown_Release(This->pUnkOuter);
790 return IUnknown_Release((IUnknown *)&(This->IInner_vtbl));
793 /** IPersist methods **/
795 static HRESULT WINAPI VideoRenderer_GetClassID(IBaseFilter * iface, CLSID * pClsid)
797 VideoRendererImpl *This = (VideoRendererImpl *)iface;
799 TRACE("(%p/%p)->(%p)\n", This, iface, pClsid);
801 *pClsid = CLSID_VideoRenderer;
806 /** IMediaFilter methods **/
808 static HRESULT WINAPI VideoRenderer_Stop(IBaseFilter * iface)
810 VideoRendererImpl *This = (VideoRendererImpl *)iface;
812 TRACE("(%p/%p)->()\n", This, iface);
814 EnterCriticalSection(&This->csFilter);
816 This->state = State_Stopped;
817 SetEvent(This->hEvent);
818 SetEvent(This->blocked);
820 LeaveCriticalSection(&This->csFilter);
825 static HRESULT WINAPI VideoRenderer_Pause(IBaseFilter * iface)
827 VideoRendererImpl *This = (VideoRendererImpl *)iface;
829 TRACE("(%p/%p)->()\n", This, iface);
831 EnterCriticalSection(&This->csFilter);
832 if (This->state != State_Paused)
834 if (This->state == State_Stopped)
836 This->pInputPin->end_of_stream = 0;
837 ResetEvent(This->hEvent);
840 This->state = State_Paused;
841 ResetEvent(This->blocked);
843 LeaveCriticalSection(&This->csFilter);
848 static HRESULT WINAPI VideoRenderer_Run(IBaseFilter * iface, REFERENCE_TIME tStart)
850 VideoRendererImpl *This = (VideoRendererImpl *)iface;
852 TRACE("(%p/%p)->(%s)\n", This, iface, wine_dbgstr_longlong(tStart));
854 EnterCriticalSection(&This->csFilter);
855 if (This->state != State_Running)
857 if (This->state == State_Stopped)
859 This->pInputPin->end_of_stream = 0;
860 ResetEvent(This->hEvent);
862 SetEvent(This->blocked);
864 This->rtStreamStart = tStart;
865 This->state = State_Running;
867 LeaveCriticalSection(&This->csFilter);
872 static HRESULT WINAPI VideoRenderer_GetState(IBaseFilter * iface, DWORD dwMilliSecsTimeout, FILTER_STATE *pState)
874 VideoRendererImpl *This = (VideoRendererImpl *)iface;
877 TRACE("(%p/%p)->(%d, %p)\n", This, iface, dwMilliSecsTimeout, pState);
879 if (WaitForSingleObject(This->hEvent, dwMilliSecsTimeout) == WAIT_TIMEOUT)
880 hr = VFW_S_STATE_INTERMEDIATE;
884 EnterCriticalSection(&This->csFilter);
886 *pState = This->state;
888 LeaveCriticalSection(&This->csFilter);
893 static HRESULT WINAPI VideoRenderer_SetSyncSource(IBaseFilter * iface, IReferenceClock *pClock)
895 VideoRendererImpl *This = (VideoRendererImpl *)iface;
897 TRACE("(%p/%p)->(%p)\n", This, iface, pClock);
899 EnterCriticalSection(&This->csFilter);
902 IReferenceClock_Release(This->pClock);
903 This->pClock = pClock;
905 IReferenceClock_AddRef(This->pClock);
907 LeaveCriticalSection(&This->csFilter);
912 static HRESULT WINAPI VideoRenderer_GetSyncSource(IBaseFilter * iface, IReferenceClock **ppClock)
914 VideoRendererImpl *This = (VideoRendererImpl *)iface;
916 TRACE("(%p/%p)->(%p)\n", This, iface, ppClock);
918 EnterCriticalSection(&This->csFilter);
920 *ppClock = This->pClock;
922 IReferenceClock_AddRef(This->pClock);
924 LeaveCriticalSection(&This->csFilter);
929 /** IBaseFilter implementation **/
931 static HRESULT VideoRenderer_GetPin(IBaseFilter *iface, ULONG pos, IPin **pin, DWORD *lastsynctick)
933 VideoRendererImpl *This = (VideoRendererImpl *)iface;
935 /* Our pins are static, not changing so setting static tick count is ok */
941 *pin = (IPin *)This->pInputPin;
946 static HRESULT WINAPI VideoRenderer_EnumPins(IBaseFilter * iface, IEnumPins **ppEnum)
948 VideoRendererImpl *This = (VideoRendererImpl *)iface;
950 TRACE("(%p/%p)->(%p)\n", This, iface, ppEnum);
952 return IEnumPinsImpl_Construct(ppEnum, VideoRenderer_GetPin, iface);
955 static HRESULT WINAPI VideoRenderer_FindPin(IBaseFilter * iface, LPCWSTR Id, IPin **ppPin)
957 VideoRendererImpl *This = (VideoRendererImpl *)iface;
959 TRACE("(%p/%p)->(%p,%p)\n", This, iface, debugstr_w(Id), ppPin);
961 FIXME("VideoRenderer::FindPin(...)\n");
963 /* FIXME: critical section */
968 static HRESULT WINAPI VideoRenderer_QueryFilterInfo(IBaseFilter * iface, FILTER_INFO *pInfo)
970 VideoRendererImpl *This = (VideoRendererImpl *)iface;
972 TRACE("(%p/%p)->(%p)\n", This, iface, pInfo);
974 strcpyW(pInfo->achName, This->filterInfo.achName);
975 pInfo->pGraph = This->filterInfo.pGraph;
978 IFilterGraph_AddRef(pInfo->pGraph);
983 static HRESULT WINAPI VideoRenderer_JoinFilterGraph(IBaseFilter * iface, IFilterGraph *pGraph, LPCWSTR pName)
985 VideoRendererImpl *This = (VideoRendererImpl *)iface;
987 TRACE("(%p/%p)->(%p, %s)\n", This, iface, pGraph, debugstr_w(pName));
989 EnterCriticalSection(&This->csFilter);
992 strcpyW(This->filterInfo.achName, pName);
994 *This->filterInfo.achName = '\0';
995 This->filterInfo.pGraph = pGraph; /* NOTE: do NOT increase ref. count */
997 LeaveCriticalSection(&This->csFilter);
1002 static HRESULT WINAPI VideoRenderer_QueryVendorInfo(IBaseFilter * iface, LPWSTR *pVendorInfo)
1004 VideoRendererImpl *This = (VideoRendererImpl *)iface;
1005 TRACE("(%p/%p)->(%p)\n", This, iface, pVendorInfo);
1009 static const IBaseFilterVtbl VideoRenderer_Vtbl =
1011 VideoRenderer_QueryInterface,
1012 VideoRenderer_AddRef,
1013 VideoRenderer_Release,
1014 VideoRenderer_GetClassID,
1016 VideoRenderer_Pause,
1018 VideoRenderer_GetState,
1019 VideoRenderer_SetSyncSource,
1020 VideoRenderer_GetSyncSource,
1021 VideoRenderer_EnumPins,
1022 VideoRenderer_FindPin,
1023 VideoRenderer_QueryFilterInfo,
1024 VideoRenderer_JoinFilterGraph,
1025 VideoRenderer_QueryVendorInfo
1028 static HRESULT WINAPI VideoRenderer_InputPin_EndOfStream(IPin * iface)
1030 InputPin* This = (InputPin*)iface;
1031 IMediaEventSink* pEventSink;
1034 TRACE("(%p/%p)->()\n", This, iface);
1036 hr = IFilterGraph_QueryInterface(((VideoRendererImpl*)This->pin.pinInfo.pFilter)->filterInfo.pGraph, &IID_IMediaEventSink, (LPVOID*)&pEventSink);
1039 hr = IMediaEventSink_Notify(pEventSink, EC_COMPLETE, S_OK, 0);
1040 IMediaEventSink_Release(pEventSink);
1046 static HRESULT WINAPI VideoRenderer_InputPin_BeginFlush(IPin * iface)
1048 InputPin* This = (InputPin*)iface;
1049 VideoRendererImpl *pVideoRenderer = (VideoRendererImpl *)This->pin.pinInfo.pFilter;
1052 TRACE("(%p/%p)->()\n", This, iface);
1054 EnterCriticalSection(This->pin.pCritSec);
1055 if (pVideoRenderer->state == State_Paused)
1056 SetEvent(pVideoRenderer->blocked);
1058 hr = InputPin_BeginFlush(iface);
1059 LeaveCriticalSection(This->pin.pCritSec);
1064 static HRESULT WINAPI VideoRenderer_InputPin_EndFlush(IPin * iface)
1066 InputPin* This = (InputPin*)iface;
1067 VideoRendererImpl *pVideoRenderer = (VideoRendererImpl *)This->pin.pinInfo.pFilter;
1070 TRACE("(%p/%p)->()\n", This, iface);
1072 EnterCriticalSection(This->pin.pCritSec);
1073 if (pVideoRenderer->state == State_Paused)
1074 ResetEvent(pVideoRenderer->blocked);
1076 hr = InputPin_EndFlush(iface);
1077 LeaveCriticalSection(This->pin.pCritSec);
1082 static const IPinVtbl VideoRenderer_InputPin_Vtbl =
1084 InputPin_QueryInterface,
1088 InputPin_ReceiveConnection,
1089 IPinImpl_Disconnect,
1090 IPinImpl_ConnectedTo,
1091 IPinImpl_ConnectionMediaType,
1092 IPinImpl_QueryPinInfo,
1093 IPinImpl_QueryDirection,
1095 IPinImpl_QueryAccept,
1096 IPinImpl_EnumMediaTypes,
1097 IPinImpl_QueryInternalConnections,
1098 VideoRenderer_InputPin_EndOfStream,
1099 VideoRenderer_InputPin_BeginFlush,
1100 VideoRenderer_InputPin_EndFlush,
1104 /*** IUnknown methods ***/
1105 static HRESULT WINAPI Basicvideo_QueryInterface(IBasicVideo *iface,
1108 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1110 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1112 return VideoRenderer_QueryInterface((IBaseFilter*)This, riid, ppvObj);
1115 static ULONG WINAPI Basicvideo_AddRef(IBasicVideo *iface) {
1116 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1118 TRACE("(%p/%p)->()\n", This, iface);
1120 return VideoRenderer_AddRef((IBaseFilter*)This);
1123 static ULONG WINAPI Basicvideo_Release(IBasicVideo *iface) {
1124 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1126 TRACE("(%p/%p)->()\n", This, iface);
1128 return VideoRenderer_Release((IBaseFilter*)This);
1131 /*** IDispatch methods ***/
1132 static HRESULT WINAPI Basicvideo_GetTypeInfoCount(IBasicVideo *iface,
1134 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1136 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1141 static HRESULT WINAPI Basicvideo_GetTypeInfo(IBasicVideo *iface,
1144 ITypeInfo**ppTInfo) {
1145 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1147 FIXME("(%p/%p)->(%d, %d, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1152 static HRESULT WINAPI Basicvideo_GetIDsOfNames(IBasicVideo *iface,
1158 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1160 FIXME("(%p/%p)->(%s (%p), %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1165 static HRESULT WINAPI Basicvideo_Invoke(IBasicVideo *iface,
1166 DISPID dispIdMember,
1170 DISPPARAMS*pDispParams,
1172 EXCEPINFO*pExepInfo,
1174 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1176 FIXME("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
1181 /*** IBasicVideo methods ***/
1182 static HRESULT WINAPI Basicvideo_get_AvgTimePerFrame(IBasicVideo *iface,
1183 REFTIME *pAvgTimePerFrame) {
1184 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1186 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pAvgTimePerFrame);
1191 static HRESULT WINAPI Basicvideo_get_BitRate(IBasicVideo *iface,
1193 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1195 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pBitRate);
1200 static HRESULT WINAPI Basicvideo_get_BitErrorRate(IBasicVideo *iface,
1201 long *pBitErrorRate) {
1202 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1204 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pBitErrorRate);
1209 static HRESULT WINAPI Basicvideo_get_VideoWidth(IBasicVideo *iface,
1210 long *pVideoWidth) {
1211 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1213 TRACE("(%p/%p)->(%p)\n", This, iface, pVideoWidth);
1215 *pVideoWidth = This->VideoWidth;
1220 static HRESULT WINAPI Basicvideo_get_VideoHeight(IBasicVideo *iface,
1221 long *pVideoHeight) {
1222 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1224 TRACE("(%p/%p)->(%p)\n", This, iface, pVideoHeight);
1226 *pVideoHeight = This->VideoHeight;
1231 static HRESULT WINAPI Basicvideo_put_SourceLeft(IBasicVideo *iface,
1233 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1235 TRACE("(%p/%p)->(%ld)\n", This, iface, SourceLeft);
1237 This->SourceRect.left = SourceLeft;
1242 static HRESULT WINAPI Basicvideo_get_SourceLeft(IBasicVideo *iface,
1243 long *pSourceLeft) {
1244 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1246 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceLeft);
1248 *pSourceLeft = This->SourceRect.left;
1253 static HRESULT WINAPI Basicvideo_put_SourceWidth(IBasicVideo *iface,
1255 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1257 TRACE("(%p/%p)->(%ld)\n", This, iface, SourceWidth);
1259 This->SourceRect.right = This->SourceRect.left + SourceWidth;
1264 static HRESULT WINAPI Basicvideo_get_SourceWidth(IBasicVideo *iface,
1265 long *pSourceWidth) {
1266 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1268 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceWidth);
1270 *pSourceWidth = This->SourceRect.right - This->SourceRect.left;
1275 static HRESULT WINAPI Basicvideo_put_SourceTop(IBasicVideo *iface,
1277 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1279 TRACE("(%p/%p)->(%ld)\n", This, iface, SourceTop);
1281 This->SourceRect.top = SourceTop;
1286 static HRESULT WINAPI Basicvideo_get_SourceTop(IBasicVideo *iface,
1288 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1290 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceTop);
1292 *pSourceTop = This->SourceRect.top;
1297 static HRESULT WINAPI Basicvideo_put_SourceHeight(IBasicVideo *iface,
1298 long SourceHeight) {
1299 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1301 TRACE("(%p/%p)->(%ld)\n", This, iface, SourceHeight);
1303 This->SourceRect.bottom = This->SourceRect.top + SourceHeight;
1308 static HRESULT WINAPI Basicvideo_get_SourceHeight(IBasicVideo *iface,
1309 long *pSourceHeight) {
1310 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1312 TRACE("(%p/%p)->(%p)\n", This, iface, pSourceHeight);
1314 *pSourceHeight = This->SourceRect.bottom - This->SourceRect.top;
1319 static HRESULT WINAPI Basicvideo_put_DestinationLeft(IBasicVideo *iface,
1320 long DestinationLeft) {
1321 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1323 TRACE("(%p/%p)->(%ld)\n", This, iface, DestinationLeft);
1325 This->DestRect.left = DestinationLeft;
1330 static HRESULT WINAPI Basicvideo_get_DestinationLeft(IBasicVideo *iface,
1331 long *pDestinationLeft) {
1332 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1334 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationLeft);
1336 *pDestinationLeft = This->DestRect.left;
1341 static HRESULT WINAPI Basicvideo_put_DestinationWidth(IBasicVideo *iface,
1342 long DestinationWidth) {
1343 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1345 TRACE("(%p/%p)->(%ld)\n", This, iface, DestinationWidth);
1347 This->DestRect.right = This->DestRect.left + DestinationWidth;
1352 static HRESULT WINAPI Basicvideo_get_DestinationWidth(IBasicVideo *iface,
1353 long *pDestinationWidth) {
1354 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1356 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationWidth);
1358 *pDestinationWidth = This->DestRect.right - This->DestRect.left;
1363 static HRESULT WINAPI Basicvideo_put_DestinationTop(IBasicVideo *iface,
1364 long DestinationTop) {
1365 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1367 TRACE("(%p/%p)->(%ld)\n", This, iface, DestinationTop);
1369 This->DestRect.top = DestinationTop;
1374 static HRESULT WINAPI Basicvideo_get_DestinationTop(IBasicVideo *iface,
1375 long *pDestinationTop) {
1376 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1378 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationTop);
1380 *pDestinationTop = This->DestRect.top;
1385 static HRESULT WINAPI Basicvideo_put_DestinationHeight(IBasicVideo *iface,
1386 long DestinationHeight) {
1387 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1389 TRACE("(%p/%p)->(%ld)\n", This, iface, DestinationHeight);
1391 This->DestRect.right = This->DestRect.left + DestinationHeight;
1396 static HRESULT WINAPI Basicvideo_get_DestinationHeight(IBasicVideo *iface,
1397 long *pDestinationHeight) {
1398 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1400 TRACE("(%p/%p)->(%p)\n", This, iface, pDestinationHeight);
1402 *pDestinationHeight = This->DestRect.right - This->DestRect.left;
1407 static HRESULT WINAPI Basicvideo_SetSourcePosition(IBasicVideo *iface,
1412 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1414 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld)\n", This, iface, Left, Top, Width, Height);
1416 This->SourceRect.left = Left;
1417 This->SourceRect.top = Top;
1418 This->SourceRect.right = Left + Width;
1419 This->SourceRect.bottom = Top + Height;
1424 static HRESULT WINAPI Basicvideo_GetSourcePosition(IBasicVideo *iface,
1429 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1431 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This, iface, pLeft, pTop, pWidth, pHeight);
1433 *pLeft = This->SourceRect.left;
1434 *pTop = This->SourceRect.top;
1435 *pWidth = This->SourceRect.right - This->SourceRect.left;
1436 *pHeight = This->SourceRect.bottom - This->SourceRect.top;
1441 static HRESULT WINAPI Basicvideo_SetDefaultSourcePosition(IBasicVideo *iface) {
1442 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1444 TRACE("(%p/%p)->()\n", This, iface);
1446 This->SourceRect.left = 0;
1447 This->SourceRect.top = 0;
1448 This->SourceRect.right = This->VideoWidth;
1449 This->SourceRect.bottom = This->VideoHeight;
1454 static HRESULT WINAPI Basicvideo_SetDestinationPosition(IBasicVideo *iface,
1459 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1461 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld)\n", This, iface, Left, Top, Width, Height);
1463 This->DestRect.left = Left;
1464 This->DestRect.top = Top;
1465 This->DestRect.right = Left + Width;
1466 This->DestRect.bottom = Top + Height;
1471 static HRESULT WINAPI Basicvideo_GetDestinationPosition(IBasicVideo *iface,
1476 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1478 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This, iface, pLeft, pTop, pWidth, pHeight);
1480 *pLeft = This->DestRect.left;
1481 *pTop = This->DestRect.top;
1482 *pWidth = This->DestRect.right - This->DestRect.left;
1483 *pHeight = This->DestRect.bottom - This->DestRect.top;
1488 static HRESULT WINAPI Basicvideo_SetDefaultDestinationPosition(IBasicVideo *iface) {
1489 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1492 TRACE("(%p/%p)->()\n", This, iface);
1494 if (!GetClientRect(This->hWnd, &rect))
1497 This->SourceRect.left = 0;
1498 This->SourceRect.top = 0;
1499 This->SourceRect.right = rect.right;
1500 This->SourceRect.bottom = rect.bottom;
1505 static HRESULT WINAPI Basicvideo_GetVideoSize(IBasicVideo *iface,
1508 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1510 TRACE("(%p/%p)->(%p, %p)\n", This, iface, pWidth, pHeight);
1512 *pWidth = This->VideoWidth;
1513 *pHeight = This->VideoHeight;
1518 static HRESULT WINAPI Basicvideo_GetVideoPaletteEntries(IBasicVideo *iface,
1523 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1525 FIXME("(%p/%p)->(%ld, %ld, %p, %p): stub !!!\n", This, iface, StartIndex, Entries, pRetrieved, pPalette);
1530 static HRESULT WINAPI Basicvideo_GetCurrentImage(IBasicVideo *iface,
1533 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1534 BITMAPINFOHEADER *bmiHeader;
1536 AM_MEDIA_TYPE *amt = &This->pInputPin->pin.mtCurrent;
1539 EnterCriticalSection(&This->csFilter);
1541 if (!This->sample_held)
1543 LeaveCriticalSection(&This->csFilter);
1544 return (This->state == State_Paused ? E_UNEXPECTED : VFW_E_NOT_PAUSED);
1547 FIXME("(%p/%p)->(%p, %p): partial stub\n", This, iface, pBufferSize, pDIBImage);
1549 if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo))
1551 bmiHeader = &((VIDEOINFOHEADER *)amt->pbFormat)->bmiHeader;
1553 else if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo2))
1555 bmiHeader = &((VIDEOINFOHEADER2 *)amt->pbFormat)->bmiHeader;
1559 FIXME("Unknown type %s\n", debugstr_guid(&amt->subtype));
1560 LeaveCriticalSection(&This->csFilter);
1561 return VFW_E_RUNTIME_ERROR;
1564 needed_size = bmiHeader->biSize;
1565 needed_size += IMediaSample_GetActualDataLength(This->sample_held);
1569 *pBufferSize = needed_size;
1570 LeaveCriticalSection(&This->csFilter);
1574 if (needed_size < *pBufferSize)
1576 ERR("Buffer too small %u/%lu\n", needed_size, *pBufferSize);
1577 LeaveCriticalSection(&This->csFilter);
1580 *pBufferSize = needed_size;
1582 memcpy(pDIBImage, bmiHeader, bmiHeader->biSize);
1583 IMediaSample_GetPointer(This->sample_held, (BYTE **)&ptr);
1584 memcpy((char *)pDIBImage + bmiHeader->biSize, ptr, IMediaSample_GetActualDataLength(This->sample_held));
1586 LeaveCriticalSection(&This->csFilter);
1591 static HRESULT WINAPI Basicvideo_IsUsingDefaultSource(IBasicVideo *iface) {
1592 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1594 FIXME("(%p/%p)->(): stub !!!\n", This, iface);
1599 static HRESULT WINAPI Basicvideo_IsUsingDefaultDestination(IBasicVideo *iface) {
1600 ICOM_THIS_MULTI(VideoRendererImpl, IBasicVideo_vtbl, iface);
1602 FIXME("(%p/%p)->(): stub !!!\n", This, iface);
1608 static const IBasicVideoVtbl IBasicVideo_VTable =
1610 Basicvideo_QueryInterface,
1613 Basicvideo_GetTypeInfoCount,
1614 Basicvideo_GetTypeInfo,
1615 Basicvideo_GetIDsOfNames,
1617 Basicvideo_get_AvgTimePerFrame,
1618 Basicvideo_get_BitRate,
1619 Basicvideo_get_BitErrorRate,
1620 Basicvideo_get_VideoWidth,
1621 Basicvideo_get_VideoHeight,
1622 Basicvideo_put_SourceLeft,
1623 Basicvideo_get_SourceLeft,
1624 Basicvideo_put_SourceWidth,
1625 Basicvideo_get_SourceWidth,
1626 Basicvideo_put_SourceTop,
1627 Basicvideo_get_SourceTop,
1628 Basicvideo_put_SourceHeight,
1629 Basicvideo_get_SourceHeight,
1630 Basicvideo_put_DestinationLeft,
1631 Basicvideo_get_DestinationLeft,
1632 Basicvideo_put_DestinationWidth,
1633 Basicvideo_get_DestinationWidth,
1634 Basicvideo_put_DestinationTop,
1635 Basicvideo_get_DestinationTop,
1636 Basicvideo_put_DestinationHeight,
1637 Basicvideo_get_DestinationHeight,
1638 Basicvideo_SetSourcePosition,
1639 Basicvideo_GetSourcePosition,
1640 Basicvideo_SetDefaultSourcePosition,
1641 Basicvideo_SetDestinationPosition,
1642 Basicvideo_GetDestinationPosition,
1643 Basicvideo_SetDefaultDestinationPosition,
1644 Basicvideo_GetVideoSize,
1645 Basicvideo_GetVideoPaletteEntries,
1646 Basicvideo_GetCurrentImage,
1647 Basicvideo_IsUsingDefaultSource,
1648 Basicvideo_IsUsingDefaultDestination
1652 /*** IUnknown methods ***/
1653 static HRESULT WINAPI Videowindow_QueryInterface(IVideoWindow *iface,
1656 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1658 TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_guid(riid), riid, ppvObj);
1660 return VideoRenderer_QueryInterface((IBaseFilter*)This, riid, ppvObj);
1663 static ULONG WINAPI Videowindow_AddRef(IVideoWindow *iface) {
1664 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1666 TRACE("(%p/%p)->()\n", This, iface);
1668 return VideoRenderer_AddRef((IBaseFilter*)This);
1671 static ULONG WINAPI Videowindow_Release(IVideoWindow *iface) {
1672 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1674 TRACE("(%p/%p)->()\n", This, iface);
1676 return VideoRenderer_Release((IBaseFilter*)This);
1679 /*** IDispatch methods ***/
1680 static HRESULT WINAPI Videowindow_GetTypeInfoCount(IVideoWindow *iface,
1682 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1684 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pctinfo);
1689 static HRESULT WINAPI Videowindow_GetTypeInfo(IVideoWindow *iface,
1692 ITypeInfo**ppTInfo) {
1693 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1695 FIXME("(%p/%p)->(%d, %d, %p): stub !!!\n", This, iface, iTInfo, lcid, ppTInfo);
1700 static HRESULT WINAPI Videowindow_GetIDsOfNames(IVideoWindow *iface,
1706 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1708 FIXME("(%p/%p)->(%s (%p), %p, %d, %d, %p): stub !!!\n", This, iface, debugstr_guid(riid), riid, rgszNames, cNames, lcid, rgDispId);
1713 static HRESULT WINAPI Videowindow_Invoke(IVideoWindow *iface,
1714 DISPID dispIdMember,
1718 DISPPARAMS*pDispParams,
1720 EXCEPINFO*pExepInfo,
1722 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1724 FIXME("(%p/%p)->(%d, %s (%p), %d, %04x, %p, %p, %p, %p): stub !!!\n", This, iface, dispIdMember, debugstr_guid(riid), riid, lcid, wFlags, pDispParams, pVarResult, pExepInfo, puArgErr);
1729 /*** IVideoWindow methods ***/
1730 static HRESULT WINAPI Videowindow_put_Caption(IVideoWindow *iface,
1732 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1734 TRACE("(%p/%p)->(%s (%p))\n", This, iface, debugstr_w(strCaption), strCaption);
1736 if (!SetWindowTextW(This->hWnd, strCaption))
1742 static HRESULT WINAPI Videowindow_get_Caption(IVideoWindow *iface,
1744 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1746 TRACE("(%p/%p)->(%p)\n", This, iface, strCaption);
1748 GetWindowTextW(This->hWnd, (LPWSTR)strCaption, 100);
1753 static HRESULT WINAPI Videowindow_put_WindowStyle(IVideoWindow *iface,
1755 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1758 old = GetWindowLongA(This->hWnd, GWL_STYLE);
1760 TRACE("(%p/%p)->(%x -> %lx)\n", This, iface, old, WindowStyle);
1762 if (WindowStyle & (WS_DISABLED|WS_HSCROLL|WS_ICONIC|WS_MAXIMIZE|WS_MINIMIZE|WS_VSCROLL))
1763 return E_INVALIDARG;
1765 SetWindowLongA(This->hWnd, GWL_STYLE, WindowStyle);
1770 static HRESULT WINAPI Videowindow_get_WindowStyle(IVideoWindow *iface,
1771 long *WindowStyle) {
1772 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1774 TRACE("(%p/%p)->(%p)\n", This, iface, WindowStyle);
1776 *WindowStyle = GetWindowLongA(This->hWnd, GWL_STYLE);
1781 static HRESULT WINAPI Videowindow_put_WindowStyleEx(IVideoWindow *iface,
1782 long WindowStyleEx) {
1783 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1785 TRACE("(%p/%p)->(%ld)\n", This, iface, WindowStyleEx);
1787 if (WindowStyleEx & (WS_DISABLED|WS_HSCROLL|WS_ICONIC|WS_MAXIMIZE|WS_MINIMIZE|WS_VSCROLL))
1788 return E_INVALIDARG;
1790 if (!SetWindowLongA(This->hWnd, GWL_EXSTYLE, WindowStyleEx))
1796 static HRESULT WINAPI Videowindow_get_WindowStyleEx(IVideoWindow *iface,
1797 long *WindowStyleEx) {
1798 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1800 TRACE("(%p/%p)->(%p)\n", This, iface, WindowStyleEx);
1802 *WindowStyleEx = GetWindowLongA(This->hWnd, GWL_EXSTYLE);
1807 static HRESULT WINAPI Videowindow_put_AutoShow(IVideoWindow *iface,
1809 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1811 TRACE("(%p/%p)->(%ld)\n", This, iface, AutoShow);
1813 This->AutoShow = 1; /* FXIME: Should be AutoShow */;
1818 static HRESULT WINAPI Videowindow_get_AutoShow(IVideoWindow *iface,
1820 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1822 TRACE("(%p/%p)->(%p)\n", This, iface, AutoShow);
1824 *AutoShow = This->AutoShow;
1829 static HRESULT WINAPI Videowindow_put_WindowState(IVideoWindow *iface,
1831 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1833 FIXME("(%p/%p)->(%ld): stub !!!\n", This, iface, WindowState);
1838 static HRESULT WINAPI Videowindow_get_WindowState(IVideoWindow *iface,
1839 long *WindowState) {
1840 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1842 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, WindowState);
1847 static HRESULT WINAPI Videowindow_put_BackgroundPalette(IVideoWindow *iface,
1848 long BackgroundPalette) {
1849 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1851 FIXME("(%p/%p)->(%ld): stub !!!\n", This, iface, BackgroundPalette);
1856 static HRESULT WINAPI Videowindow_get_BackgroundPalette(IVideoWindow *iface,
1857 long *pBackgroundPalette) {
1858 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1860 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, pBackgroundPalette);
1865 static HRESULT WINAPI Videowindow_put_Visible(IVideoWindow *iface,
1867 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1869 TRACE("(%p/%p)->(%ld)\n", This, iface, Visible);
1871 ShowWindow(This->hWnd, Visible ? SW_SHOW : SW_HIDE);
1876 static HRESULT WINAPI Videowindow_get_Visible(IVideoWindow *iface,
1878 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1880 TRACE("(%p/%p)->(%p)\n", This, iface, pVisible);
1882 *pVisible = IsWindowVisible(This->hWnd);
1887 static HRESULT WINAPI Videowindow_put_Left(IVideoWindow *iface,
1889 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1891 TRACE("(%p/%p)->(%ld)\n", This, iface, Left);
1893 if (!SetWindowPos(This->hWnd, NULL, Left, This->WindowPos.top, 0, 0, SWP_NOZORDER|SWP_NOSIZE))
1896 This->WindowPos.left = Left;
1901 static HRESULT WINAPI Videowindow_get_Left(IVideoWindow *iface,
1903 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1905 TRACE("(%p/%p)->(%p)\n", This, iface, pLeft);
1907 *pLeft = This->WindowPos.left;
1912 static HRESULT WINAPI Videowindow_put_Width(IVideoWindow *iface,
1914 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1916 TRACE("(%p/%p)->(%ld)\n", This, iface, Width);
1918 if (!SetWindowPos(This->hWnd, NULL, 0, 0, Width, This->WindowPos.bottom-This->WindowPos.top, SWP_NOZORDER|SWP_NOMOVE))
1921 This->WindowPos.right = This->WindowPos.left + Width;
1926 static HRESULT WINAPI Videowindow_get_Width(IVideoWindow *iface,
1928 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1930 TRACE("(%p/%p)->(%p)\n", This, iface, pWidth);
1932 *pWidth = This->WindowPos.right - This->WindowPos.left;
1937 static HRESULT WINAPI Videowindow_put_Top(IVideoWindow *iface,
1939 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1941 TRACE("(%p/%p)->(%ld)\n", This, iface, Top);
1943 if (!SetWindowPos(This->hWnd, NULL, This->WindowPos.left, Top, 0, 0, SWP_NOZORDER|SWP_NOSIZE))
1946 This->WindowPos.top = Top;
1951 static HRESULT WINAPI Videowindow_get_Top(IVideoWindow *iface,
1953 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1955 TRACE("(%p/%p)->(%p)\n", This, iface, pTop);
1957 *pTop = This->WindowPos.top;
1962 static HRESULT WINAPI Videowindow_put_Height(IVideoWindow *iface,
1964 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1966 TRACE("(%p/%p)->(%ld)\n", This, iface, Height);
1968 if (!SetWindowPos(This->hWnd, NULL, 0, 0, This->WindowPos.right-This->WindowPos.left, Height, SWP_NOZORDER|SWP_NOMOVE))
1971 This->WindowPos.bottom = This->WindowPos.top + Height;
1976 static HRESULT WINAPI Videowindow_get_Height(IVideoWindow *iface,
1978 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1980 TRACE("(%p/%p)->(%p)\n", This, iface, pHeight);
1982 *pHeight = This->WindowPos.bottom - This->WindowPos.top;
1987 static HRESULT WINAPI Videowindow_put_Owner(IVideoWindow *iface,
1989 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
1991 TRACE("(%p/%p)->(%08x)\n", This, iface, (DWORD) Owner);
1993 SetParent(This->hWnd, (HWND)Owner);
1998 static HRESULT WINAPI Videowindow_get_Owner(IVideoWindow *iface,
2000 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2002 TRACE("(%p/%p)->(%08x)\n", This, iface, (DWORD) Owner);
2004 *(HWND*)Owner = GetParent(This->hWnd);
2009 static HRESULT WINAPI Videowindow_put_MessageDrain(IVideoWindow *iface,
2011 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2013 TRACE("(%p/%p)->(%08x)\n", This, iface, (DWORD) Drain);
2015 This->hWndMsgDrain = (HWND)Drain;
2020 static HRESULT WINAPI Videowindow_get_MessageDrain(IVideoWindow *iface,
2022 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2024 TRACE("(%p/%p)->(%p)\n", This, iface, Drain);
2026 *Drain = (OAHWND)This->hWndMsgDrain;
2031 static HRESULT WINAPI Videowindow_get_BorderColor(IVideoWindow *iface,
2033 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2035 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, Color);
2040 static HRESULT WINAPI Videowindow_put_BorderColor(IVideoWindow *iface,
2042 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2044 FIXME("(%p/%p)->(%ld): stub !!!\n", This, iface, Color);
2049 static HRESULT WINAPI Videowindow_get_FullScreenMode(IVideoWindow *iface,
2050 long *FullScreenMode) {
2051 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2053 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, FullScreenMode);
2058 static HRESULT WINAPI Videowindow_put_FullScreenMode(IVideoWindow *iface,
2059 long FullScreenMode) {
2060 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2062 FIXME("(%p/%p)->(%ld): stub !!!\n", This, iface, FullScreenMode);
2067 static HRESULT WINAPI Videowindow_SetWindowForeground(IVideoWindow *iface,
2069 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2074 TRACE("(%p/%p)->(%ld)\n", This, iface, Focus);
2076 if ((Focus != FALSE) && (Focus != TRUE))
2077 return E_INVALIDARG;
2079 hr = IPin_ConnectedTo((IPin *)This->pInputPin, &pPin);
2080 if ((hr != S_OK) || !pPin)
2081 return VFW_E_NOT_CONNECTED;
2084 ret = SetForegroundWindow(This->hWnd);
2086 ret = SetWindowPos(This->hWnd, HWND_TOP, 0, 0, 0, 0, SWP_NOMOVE|SWP_NOSIZE);
2094 static HRESULT WINAPI Videowindow_NotifyOwnerMessage(IVideoWindow *iface,
2099 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2101 TRACE("(%p/%p)->(%08x, %ld, %08lx, %08lx)\n", This, iface, (DWORD) hwnd, uMsg, wParam, lParam);
2103 if (!PostMessageA(This->hWnd, uMsg, wParam, lParam))
2109 static HRESULT WINAPI Videowindow_SetWindowPosition(IVideoWindow *iface,
2114 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2116 TRACE("(%p/%p)->(%ld, %ld, %ld, %ld)\n", This, iface, Left, Top, Width, Height);
2118 if (!SetWindowPos(This->hWnd, NULL, Left, Top, Width, Height, SWP_NOZORDER))
2121 This->WindowPos.left = Left;
2122 This->WindowPos.top = Top;
2123 This->WindowPos.right = Left + Width;
2124 This->WindowPos.bottom = Top + Height;
2129 static HRESULT WINAPI Videowindow_GetWindowPosition(IVideoWindow *iface,
2134 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2136 TRACE("(%p/%p)->(%p, %p, %p, %p)\n", This, iface, pLeft, pTop, pWidth, pHeight);
2138 *pLeft = This->WindowPos.left;
2139 *pTop = This->WindowPos.top;
2140 *pWidth = This->WindowPos.right - This->WindowPos.left;
2141 *pHeight = This->WindowPos.bottom - This->WindowPos.top;
2146 static HRESULT WINAPI Videowindow_GetMinIdealImageSize(IVideoWindow *iface,
2149 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2151 FIXME("(%p/%p)->(%p, %p): semi stub !!!\n", This, iface, pWidth, pHeight);
2153 *pWidth = This->VideoWidth;
2154 *pHeight = This->VideoHeight;
2159 static HRESULT WINAPI Videowindow_GetMaxIdealImageSize(IVideoWindow *iface,
2162 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2164 FIXME("(%p/%p)->(%p, %p): semi stub !!!\n", This, iface, pWidth, pHeight);
2166 *pWidth = This->VideoWidth;
2167 *pHeight = This->VideoHeight;
2172 static HRESULT WINAPI Videowindow_GetRestorePosition(IVideoWindow *iface,
2177 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2179 FIXME("(%p/%p)->(%p, %p, %p, %p): stub !!!\n", This, iface, pLeft, pTop, pWidth, pHeight);
2184 static HRESULT WINAPI Videowindow_HideCursor(IVideoWindow *iface,
2186 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2188 FIXME("(%p/%p)->(%ld): stub !!!\n", This, iface, HideCursor);
2193 static HRESULT WINAPI Videowindow_IsCursorHidden(IVideoWindow *iface,
2194 long *CursorHidden) {
2195 ICOM_THIS_MULTI(VideoRendererImpl, IVideoWindow_vtbl, iface);
2197 FIXME("(%p/%p)->(%p): stub !!!\n", This, iface, CursorHidden);
2202 static const IVideoWindowVtbl IVideoWindow_VTable =
2204 Videowindow_QueryInterface,
2206 Videowindow_Release,
2207 Videowindow_GetTypeInfoCount,
2208 Videowindow_GetTypeInfo,
2209 Videowindow_GetIDsOfNames,
2211 Videowindow_put_Caption,
2212 Videowindow_get_Caption,
2213 Videowindow_put_WindowStyle,
2214 Videowindow_get_WindowStyle,
2215 Videowindow_put_WindowStyleEx,
2216 Videowindow_get_WindowStyleEx,
2217 Videowindow_put_AutoShow,
2218 Videowindow_get_AutoShow,
2219 Videowindow_put_WindowState,
2220 Videowindow_get_WindowState,
2221 Videowindow_put_BackgroundPalette,
2222 Videowindow_get_BackgroundPalette,
2223 Videowindow_put_Visible,
2224 Videowindow_get_Visible,
2225 Videowindow_put_Left,
2226 Videowindow_get_Left,
2227 Videowindow_put_Width,
2228 Videowindow_get_Width,
2229 Videowindow_put_Top,
2230 Videowindow_get_Top,
2231 Videowindow_put_Height,
2232 Videowindow_get_Height,
2233 Videowindow_put_Owner,
2234 Videowindow_get_Owner,
2235 Videowindow_put_MessageDrain,
2236 Videowindow_get_MessageDrain,
2237 Videowindow_get_BorderColor,
2238 Videowindow_put_BorderColor,
2239 Videowindow_get_FullScreenMode,
2240 Videowindow_put_FullScreenMode,
2241 Videowindow_SetWindowForeground,
2242 Videowindow_NotifyOwnerMessage,
2243 Videowindow_SetWindowPosition,
2244 Videowindow_GetWindowPosition,
2245 Videowindow_GetMinIdealImageSize,
2246 Videowindow_GetMaxIdealImageSize,
2247 Videowindow_GetRestorePosition,
2248 Videowindow_HideCursor,
2249 Videowindow_IsCursorHidden