Started implementing AVI splitter.
[wine/multimedia.git] / dlls / quartz / vidren.c
blob47cade822f195a96442cc0032b482ae81234be1b
1 /*
2 * Implements CLSID_VideoRenderer.
4 * hidenori@a2.ctktv.ne.jp
6 * FIXME - use clock
7 */
9 #include "config.h"
11 #include <stdlib.h>
12 #include "windef.h"
13 #include "winbase.h"
14 #include "wingdi.h"
15 #include "winuser.h"
16 #include "winerror.h"
17 #include "mmsystem.h"
18 #include "strmif.h"
19 #include "control.h"
20 #include "vfwmsgs.h"
21 #include "uuids.h"
22 #include "amvideo.h"
23 #include "evcode.h"
25 #include "debugtools.h"
26 DEFAULT_DEBUG_CHANNEL(quartz);
28 #include "quartz_private.h"
29 #include "vidren.h"
32 static const WCHAR QUARTZ_VideoRenderer_Name[] =
33 { 'V','i','d','e','o',' ','R','e','n','d','e','r','e','r',0 };
34 static const WCHAR QUARTZ_VideoRendererPin_Name[] =
35 { 'I','n',0 };
37 #define VIDRENMSG_UPDATE (WM_APP+0)
38 #define VIDRENMSG_ENDTHREAD (WM_APP+1)
40 static const CHAR VIDREN_szWndClass[] = "Wine_VideoRenderer";
41 static const CHAR VIDREN_szWndName[] = "Wine Video Renderer";
46 static void VIDREN_OnPaint( CVideoRendererImpl* This, HWND hwnd )
48 PAINTSTRUCT ps;
49 const VIDEOINFOHEADER* pinfo;
50 const AM_MEDIA_TYPE* pmt;
52 TRACE("(%p,%08x)\n",This,hwnd);
54 if ( !BeginPaint( hwnd, &ps ) )
55 return;
57 pmt = This->pPin->pin.pmtConn;
58 if ( (!This->m_bSampleIsValid) || pmt == NULL )
59 goto err;
61 pinfo = (const VIDEOINFOHEADER*)pmt->pbFormat;
63 StretchDIBits(
64 ps.hdc,
65 0, 0,
66 abs(pinfo->bmiHeader.biWidth), abs(pinfo->bmiHeader.biHeight),
67 0, 0,
68 abs(pinfo->bmiHeader.biWidth), abs(pinfo->bmiHeader.biHeight),
69 This->m_pSampleData, (BITMAPINFO*)(&pinfo->bmiHeader),
70 DIB_RGB_COLORS, SRCCOPY );
72 err:
73 EndPaint( hwnd, &ps );
76 static void VIDREN_OnQueryNewPalette( CVideoRendererImpl* This, HWND hwnd )
78 FIXME("(%p,%08x)\n",This,hwnd);
81 static void VIDREN_OnUpdate( CVideoRendererImpl* This, HWND hwnd )
83 MSG msg;
85 TRACE("(%p,%08x)\n",This,hwnd);
87 InvalidateRect(hwnd,NULL,FALSE);
88 UpdateWindow(hwnd);
90 /* FIXME */
91 while ( PeekMessageA(&msg,hwnd,
92 VIDRENMSG_UPDATE,VIDRENMSG_UPDATE,
93 PM_REMOVE) != FALSE )
95 /* discard this message. */
100 static LRESULT CALLBACK
101 VIDREN_WndProc(
102 HWND hwnd, UINT message,
103 WPARAM wParam, LPARAM lParam )
105 CVideoRendererImpl* This = (CVideoRendererImpl*)
106 GetWindowLongA( hwnd, 0L );
108 TRACE("(%p) - %u/%u/%ld\n",This,message,wParam,lParam);
110 if ( message == WM_NCCREATE )
112 This = (CVideoRendererImpl*)(((CREATESTRUCTA*)lParam)->lpCreateParams);
113 SetWindowLongA( hwnd, 0L, (LONG)This );
114 This->m_hwnd = hwnd;
117 if ( message == WM_NCDESTROY )
119 PostQuitMessage(0);
120 This->m_hwnd = (HWND)NULL;
121 SetWindowLongA( hwnd, 0L, (LONG)NULL );
122 This = NULL;
125 if ( This != NULL )
127 switch ( message )
129 case WM_PAINT:
130 TRACE("WM_PAINT begin\n");
131 EnterCriticalSection( &This->m_csSample );
132 VIDREN_OnPaint( This, hwnd );
133 LeaveCriticalSection( &This->m_csSample );
134 TRACE("WM_PAINT end\n");
135 return 0;
136 case WM_CLOSE:
137 ShowWindow( hwnd, SW_HIDE );
138 return 0;
139 case WM_PALETTECHANGED:
140 if ( hwnd == (HWND)wParam )
141 break;
142 /* fall through */
143 case WM_QUERYNEWPALETTE:
144 VIDREN_OnQueryNewPalette( This, hwnd );
145 break;
146 case VIDRENMSG_UPDATE:
147 VIDREN_OnUpdate( This, hwnd );
148 return 0;
149 case VIDRENMSG_ENDTHREAD:
150 DestroyWindow(hwnd);
151 return 0;
152 default:
153 break;
157 return DefWindowProcA( hwnd, message, wParam, lParam );
160 static BOOL VIDREN_Register( HINSTANCE hInst )
162 WNDCLASSA wc;
163 ATOM atom;
165 wc.style = 0;
166 wc.lpfnWndProc = VIDREN_WndProc;
167 wc.cbClsExtra = 0;
168 wc.cbWndExtra = sizeof(LONG);
169 wc.hInstance = hInst;
170 wc.hIcon = LoadIconA((HINSTANCE)NULL,IDI_WINLOGOA);
171 wc.hCursor = LoadCursorA((HINSTANCE)NULL,IDC_ARROWA);
172 wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);
173 wc.lpszMenuName = NULL;
174 wc.lpszClassName = VIDREN_szWndClass;
176 atom = RegisterClassA( &wc );
177 if ( atom != (ATOM)0 )
178 return TRUE;
180 /* FIXME */
181 return FALSE;
184 static HWND VIDREN_Create( HWND hwndOwner, CVideoRendererImpl* This )
186 HINSTANCE hInst = (HINSTANCE)GetModuleHandleA(NULL);
187 const VIDEOINFOHEADER* pinfo;
188 DWORD dwExStyle = 0;
189 DWORD dwStyle = WS_OVERLAPPED|WS_CAPTION|WS_MINIMIZEBOX|WS_MAXIMIZEBOX;
190 RECT rcWnd;
192 if ( !VIDREN_Register( hInst ) )
193 return (HWND)NULL;
195 pinfo = (const VIDEOINFOHEADER*)This->pPin->pin.pmtConn->pbFormat;
197 TRACE("width %ld, height %ld\n", pinfo->bmiHeader.biWidth, pinfo->bmiHeader.biHeight);
199 rcWnd.left = 0;
200 rcWnd.top = 0;
201 rcWnd.right = pinfo->bmiHeader.biWidth;
202 rcWnd.bottom = abs(pinfo->bmiHeader.biHeight);
203 AdjustWindowRectEx( &rcWnd, dwStyle, FALSE, dwExStyle );
205 TRACE("window width %d,height %d\n",
206 rcWnd.right-rcWnd.left,rcWnd.bottom-rcWnd.top);
208 return CreateWindowExA(
209 dwExStyle,
210 VIDREN_szWndClass, VIDREN_szWndName,
211 dwStyle | WS_VISIBLE,
212 100,100, /* FIXME */
213 rcWnd.right-rcWnd.left, rcWnd.bottom-rcWnd.top,
214 hwndOwner, (HMENU)NULL,
215 hInst, (LPVOID)This );
218 static DWORD WINAPI VIDREN_ThreadEntry( LPVOID pv )
220 CVideoRendererImpl* This = (CVideoRendererImpl*)pv;
221 MSG msg;
223 TRACE("(%p)\n",This);
224 if ( !VIDREN_Create( (HWND)NULL, This ) )
225 return 0;
226 TRACE("VIDREN_Create succeeded\n");
228 SetEvent( This->m_hEventInit );
229 TRACE("Enter message loop\n");
231 while ( GetMessageA(&msg,(HWND)NULL,0,0) )
233 TranslateMessage(&msg);
234 DispatchMessageA(&msg);
237 return 0;
240 static HRESULT VIDREN_StartThread( CVideoRendererImpl* This )
242 DWORD dwRes;
243 DWORD dwThreadId;
244 HANDLE hEvents[2];
246 if ( This->m_hEventInit != (HANDLE)NULL ||
247 This->m_hwnd != (HWND)NULL ||
248 This->m_hThread != (HANDLE)NULL ||
249 This->pPin->pin.pmtConn == NULL )
250 return E_UNEXPECTED;
252 This->m_hEventInit = CreateEventA(NULL,TRUE,FALSE,NULL);
253 if ( This->m_hEventInit == (HANDLE)NULL )
254 return E_OUTOFMEMORY;
256 This->m_hThread = CreateThread(
257 NULL, 0,
258 VIDREN_ThreadEntry,
259 (LPVOID)This,
260 0, &dwThreadId );
261 if ( This->m_hThread == (HANDLE)NULL )
262 return E_FAIL;
264 hEvents[0] = This->m_hEventInit;
265 hEvents[1] = This->m_hThread;
267 dwRes = WaitForMultipleObjects(2,hEvents,FALSE,INFINITE);
268 if ( dwRes != WAIT_OBJECT_0 )
269 return E_FAIL;
271 return S_OK;
274 static void VIDREN_EndThread( CVideoRendererImpl* This )
276 if ( This->m_hwnd != (HWND)NULL )
277 PostMessageA( This->m_hwnd, VIDRENMSG_ENDTHREAD, 0, 0 );
279 if ( This->m_hThread != (HANDLE)NULL )
281 WaitForSingleObject( This->m_hThread, INFINITE );
282 CloseHandle( This->m_hThread );
283 This->m_hThread = (HANDLE)NULL;
285 if ( This->m_hEventInit != (HANDLE)NULL )
287 CloseHandle( This->m_hEventInit );
288 This->m_hEventInit = (HANDLE)NULL;
294 /***************************************************************************
296 * CVideoRendererImpl methods
300 static HRESULT CVideoRendererImpl_OnActive( CBaseFilterImpl* pImpl )
302 CVideoRendererImpl_THIS(pImpl,basefilter);
304 FIXME( "(%p)\n", This );
306 This->m_bSampleIsValid = FALSE;
308 return NOERROR;
311 static HRESULT CVideoRendererImpl_OnInactive( CBaseFilterImpl* pImpl )
313 CVideoRendererImpl_THIS(pImpl,basefilter);
315 FIXME( "(%p)\n", This );
317 EnterCriticalSection( &This->m_csSample );
318 This->m_bSampleIsValid = FALSE;
319 LeaveCriticalSection( &This->m_csSample );
321 return NOERROR;
324 static const CBaseFilterHandlers filterhandlers =
326 CVideoRendererImpl_OnActive, /* pOnActive */
327 CVideoRendererImpl_OnInactive, /* pOnInactive */
328 NULL, /* pOnStop */
331 /***************************************************************************
333 * CVideoRendererPinImpl methods
337 static HRESULT CVideoRendererPinImpl_OnPreConnect( CPinBaseImpl* pImpl, IPin* pPin )
339 CVideoRendererPinImpl_THIS(pImpl,pin);
341 TRACE("(%p,%p)\n",This,pPin);
343 return NOERROR;
346 static HRESULT CVideoRendererPinImpl_OnPostConnect( CPinBaseImpl* pImpl, IPin* pPin )
348 CVideoRendererPinImpl_THIS(pImpl,pin);
349 const VIDEOINFOHEADER* pinfo;
350 HRESULT hr;
352 TRACE("(%p,%p)\n",This,pPin);
354 if ( This->pRender->m_pSampleData != NULL )
356 QUARTZ_FreeMem(This->pRender->m_pSampleData);
357 This->pRender->m_pSampleData = NULL;
359 This->pRender->m_cbSampleData = 0;
360 This->pRender->m_bSampleIsValid = FALSE;
362 pinfo = (const VIDEOINFOHEADER*)This->pin.pmtConn->pbFormat;
363 if ( pinfo == NULL )
364 return E_FAIL;
366 This->pRender->m_bSampleIsValid = FALSE;
367 This->pRender->m_cbSampleData = DIBSIZE(pinfo->bmiHeader);
368 This->pRender->m_pSampleData = (BYTE*)QUARTZ_AllocMem(This->pRender->m_cbSampleData);
369 if ( This->pRender->m_pSampleData == NULL )
370 return E_OUTOFMEMORY;
372 hr = VIDREN_StartThread(This->pRender);
373 if ( FAILED(hr) )
374 return hr;
376 return NOERROR;
379 static HRESULT CVideoRendererPinImpl_OnDisconnect( CPinBaseImpl* pImpl )
381 CVideoRendererPinImpl_THIS(pImpl,pin);
383 TRACE("(%p)\n",This);
385 VIDREN_EndThread(This->pRender);
387 if ( This->pRender->m_pSampleData != NULL )
389 QUARTZ_FreeMem(This->pRender->m_pSampleData);
390 This->pRender->m_pSampleData = NULL;
392 This->pRender->m_cbSampleData = 0;
393 This->pRender->m_bSampleIsValid = FALSE;
395 return NOERROR;
398 static HRESULT CVideoRendererPinImpl_CheckMediaType( CPinBaseImpl* pImpl, const AM_MEDIA_TYPE* pmt )
400 CVideoRendererPinImpl_THIS(pImpl,pin);
401 const VIDEOINFOHEADER* pinfo;
403 TRACE("(%p,%p)\n",This,pmt);
405 if ( !IsEqualGUID( &pmt->majortype, &MEDIATYPE_Video ) )
406 return E_FAIL;
407 if ( !IsEqualGUID( &pmt->formattype, &FORMAT_VideoInfo ) )
408 return E_FAIL;
410 * check subtype.
412 if ( !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB555 ) &&
413 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB565 ) &&
414 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB24 ) &&
415 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB32 ) )
416 return E_FAIL;
418 /****
421 if ( !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB8 ) &&
422 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB555 ) &&
423 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB565 ) &&
424 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB24 ) &&
425 !IsEqualGUID( &pmt->subtype, &MEDIASUBTYPE_RGB32 ) )
426 return E_FAIL;
428 ****/
430 pinfo = (const VIDEOINFOHEADER*)pmt->pbFormat;
431 if ( pinfo == NULL ||
432 pinfo->bmiHeader.biSize < sizeof(BITMAPINFOHEADER) ||
433 pinfo->bmiHeader.biWidth <= 0 ||
434 pinfo->bmiHeader.biHeight == 0 ||
435 pinfo->bmiHeader.biPlanes != 1 ||
436 pinfo->bmiHeader.biCompression != 0 )
437 return E_FAIL;
439 return NOERROR;
442 static HRESULT CVideoRendererPinImpl_Receive( CPinBaseImpl* pImpl, IMediaSample* pSample )
444 CVideoRendererPinImpl_THIS(pImpl,pin);
445 HWND hwnd;
446 BYTE* pData = NULL;
447 LONG lLength;
448 HRESULT hr;
450 TRACE( "(%p,%p)\n",This,pSample );
452 hwnd = This->pRender->m_hwnd;
453 if ( hwnd == (HWND)NULL ||
454 This->pRender->m_hThread == (HWND)NULL )
455 return E_UNEXPECTED;
456 if ( This->pRender->m_fInFlush )
457 return S_FALSE;
458 if ( pSample == NULL )
459 return E_POINTER;
461 /* FIXME - wait/skip/qualitycontrol */
464 /* duplicate this sample. */
465 hr = IMediaSample_GetPointer(pSample,&pData);
466 if ( FAILED(hr) )
467 return hr;
468 lLength = (LONG)IMediaSample_GetActualDataLength(pSample);
469 if ( lLength <= 0 || (lLength < (LONG)This->pRender->m_cbSampleData) )
471 ERR( "invalid length: %ld\n", lLength );
472 return NOERROR;
475 EnterCriticalSection( &This->pRender->m_csSample );
476 memcpy(This->pRender->m_pSampleData,pData,lLength);
477 This->pRender->m_bSampleIsValid = TRUE;
478 PostMessageA( hwnd, VIDRENMSG_UPDATE, 0, 0 );
479 LeaveCriticalSection( &This->pRender->m_csSample );
481 return NOERROR;
484 static HRESULT CVideoRendererPinImpl_ReceiveCanBlock( CPinBaseImpl* pImpl )
486 CVideoRendererPinImpl_THIS(pImpl,pin);
488 TRACE( "(%p)\n", This );
490 /* might block. */
491 return S_OK;
494 static HRESULT CVideoRendererPinImpl_EndOfStream( CPinBaseImpl* pImpl )
496 CVideoRendererPinImpl_THIS(pImpl,pin);
498 FIXME( "(%p)\n", This );
500 This->pRender->m_fInFlush = FALSE;
502 /* FIXME - don't notify twice until stopped or seeked. */
503 return CBaseFilterImpl_MediaEventNotify(
504 &This->pRender->basefilter, EC_COMPLETE,
505 (LONG_PTR)S_OK, (LONG_PTR)(IBaseFilter*)(This->pRender) );
508 static HRESULT CVideoRendererPinImpl_BeginFlush( CPinBaseImpl* pImpl )
510 CVideoRendererPinImpl_THIS(pImpl,pin);
512 FIXME( "(%p)\n", This );
514 This->pRender->m_fInFlush = TRUE;
515 EnterCriticalSection( &This->pRender->m_csSample );
516 This->pRender->m_bSampleIsValid = FALSE;
517 LeaveCriticalSection( &This->pRender->m_csSample );
519 return NOERROR;
522 static HRESULT CVideoRendererPinImpl_EndFlush( CPinBaseImpl* pImpl )
524 CVideoRendererPinImpl_THIS(pImpl,pin);
526 FIXME( "(%p)\n", This );
528 This->pRender->m_fInFlush = FALSE;
530 return NOERROR;
533 static HRESULT CVideoRendererPinImpl_NewSegment( CPinBaseImpl* pImpl, REFERENCE_TIME rtStart, REFERENCE_TIME rtStop, double rate )
535 CVideoRendererPinImpl_THIS(pImpl,pin);
537 FIXME( "(%p)\n", This );
539 This->pRender->m_fInFlush = FALSE;
541 return NOERROR;
547 static const CBasePinHandlers pinhandlers =
549 CVideoRendererPinImpl_OnPreConnect, /* pOnPreConnect */
550 CVideoRendererPinImpl_OnPostConnect, /* pOnPostConnect */
551 CVideoRendererPinImpl_OnDisconnect, /* pOnDisconnect */
552 CVideoRendererPinImpl_CheckMediaType, /* pCheckMediaType */
553 NULL, /* pQualityNotify */
554 CVideoRendererPinImpl_Receive, /* pReceive */
555 CVideoRendererPinImpl_ReceiveCanBlock, /* pReceiveCanBlock */
556 CVideoRendererPinImpl_EndOfStream, /* pEndOfStream */
557 CVideoRendererPinImpl_BeginFlush, /* pBeginFlush */
558 CVideoRendererPinImpl_EndFlush, /* pEndFlush */
559 CVideoRendererPinImpl_NewSegment, /* pNewSegment */
563 /***************************************************************************
565 * new/delete CVideoRendererImpl
569 /* can I use offsetof safely? - FIXME? */
570 static QUARTZ_IFEntry FilterIFEntries[] =
572 { &IID_IPersist, offsetof(CVideoRendererImpl,basefilter)-offsetof(CVideoRendererImpl,unk) },
573 { &IID_IMediaFilter, offsetof(CVideoRendererImpl,basefilter)-offsetof(CVideoRendererImpl,unk) },
574 { &IID_IBaseFilter, offsetof(CVideoRendererImpl,basefilter)-offsetof(CVideoRendererImpl,unk) },
575 { &IID_IBasicVideo, offsetof(CVideoRendererImpl,basvid)-offsetof(CVideoRendererImpl,unk) },
576 { &IID_IBasicVideo2, offsetof(CVideoRendererImpl,basvid)-offsetof(CVideoRendererImpl,unk) },
577 { &IID_IVideoWindow, offsetof(CVideoRendererImpl,vidwin)-offsetof(CVideoRendererImpl,unk) },
580 static void QUARTZ_DestroyVideoRenderer(IUnknown* punk)
582 CVideoRendererImpl_THIS(punk,unk);
584 TRACE( "(%p)\n", This );
585 CVideoRendererImpl_OnInactive(&This->basefilter);
586 VIDREN_EndThread(This);
588 if ( This->pPin != NULL )
590 IUnknown_Release(This->pPin->unk.punkControl);
591 This->pPin = NULL;
594 CVideoRendererImpl_UninitIBasicVideo2(This);
595 CVideoRendererImpl_UninitIVideoWindow(This);
596 CBaseFilterImpl_UninitIBaseFilter(&This->basefilter);
598 DeleteCriticalSection( &This->m_csSample );
601 HRESULT QUARTZ_CreateVideoRenderer(IUnknown* punkOuter,void** ppobj)
603 CVideoRendererImpl* This = NULL;
604 HRESULT hr;
606 TRACE("(%p,%p)\n",punkOuter,ppobj);
608 This = (CVideoRendererImpl*)
609 QUARTZ_AllocObj( sizeof(CVideoRendererImpl) );
610 if ( This == NULL )
611 return E_OUTOFMEMORY;
612 This->pPin = NULL;
613 This->m_fInFlush = FALSE;
615 This->m_hEventInit = (HANDLE)NULL;
616 This->m_hThread = (HANDLE)NULL;
617 This->m_hwnd = (HWND)NULL;
618 This->m_bSampleIsValid = FALSE;
619 This->m_pSampleData = NULL;
620 This->m_cbSampleData = 0;
622 QUARTZ_IUnkInit( &This->unk, punkOuter );
624 hr = CBaseFilterImpl_InitIBaseFilter(
625 &This->basefilter,
626 This->unk.punkControl,
627 &CLSID_VideoRenderer,
628 QUARTZ_VideoRenderer_Name,
629 &filterhandlers );
630 if ( SUCCEEDED(hr) )
632 hr = CVideoRendererImpl_InitIBasicVideo2(This);
633 if ( SUCCEEDED(hr) )
635 hr = CVideoRendererImpl_InitIVideoWindow(This);
636 if ( FAILED(hr) )
638 CVideoRendererImpl_UninitIBasicVideo2(This);
641 if ( FAILED(hr) )
643 CBaseFilterImpl_UninitIBaseFilter(&This->basefilter);
647 if ( FAILED(hr) )
649 QUARTZ_FreeObj(This);
650 return hr;
653 This->unk.pEntries = FilterIFEntries;
654 This->unk.dwEntries = sizeof(FilterIFEntries)/sizeof(FilterIFEntries[0]);
655 This->unk.pOnFinalRelease = QUARTZ_DestroyVideoRenderer;
657 hr = QUARTZ_CreateVideoRendererPin(
658 This,
659 &This->basefilter.csFilter,
660 &This->pPin );
661 if ( SUCCEEDED(hr) )
662 hr = QUARTZ_CompList_AddComp(
663 This->basefilter.pInPins,
664 (IUnknown*)&This->pPin->pin,
665 NULL, 0 );
666 if ( FAILED(hr) )
668 IUnknown_Release( This->unk.punkControl );
669 return hr;
672 InitializeCriticalSection( &This->m_csSample );
674 *ppobj = (void*)&(This->unk);
676 return S_OK;
679 /***************************************************************************
681 * new/delete CVideoRendererPinImpl
685 /* can I use offsetof safely? - FIXME? */
686 static QUARTZ_IFEntry PinIFEntries[] =
688 { &IID_IPin, offsetof(CVideoRendererPinImpl,pin)-offsetof(CVideoRendererPinImpl,unk) },
689 { &IID_IMemInputPin, offsetof(CVideoRendererPinImpl,meminput)-offsetof(CVideoRendererPinImpl,unk) },
692 static void QUARTZ_DestroyVideoRendererPin(IUnknown* punk)
694 CVideoRendererPinImpl_THIS(punk,unk);
696 TRACE( "(%p)\n", This );
698 CPinBaseImpl_UninitIPin( &This->pin );
699 CMemInputPinBaseImpl_UninitIMemInputPin( &This->meminput );
702 HRESULT QUARTZ_CreateVideoRendererPin(
703 CVideoRendererImpl* pFilter,
704 CRITICAL_SECTION* pcsPin,
705 CVideoRendererPinImpl** ppPin)
707 CVideoRendererPinImpl* This = NULL;
708 HRESULT hr;
710 TRACE("(%p,%p,%p)\n",pFilter,pcsPin,ppPin);
712 This = (CVideoRendererPinImpl*)
713 QUARTZ_AllocObj( sizeof(CVideoRendererPinImpl) );
714 if ( This == NULL )
715 return E_OUTOFMEMORY;
717 QUARTZ_IUnkInit( &This->unk, NULL );
718 This->pRender = pFilter;
720 hr = CPinBaseImpl_InitIPin(
721 &This->pin,
722 This->unk.punkControl,
723 pcsPin,
724 &pFilter->basefilter,
725 QUARTZ_VideoRendererPin_Name,
726 FALSE,
727 &pinhandlers );
729 if ( SUCCEEDED(hr) )
731 hr = CMemInputPinBaseImpl_InitIMemInputPin(
732 &This->meminput,
733 This->unk.punkControl,
734 &This->pin );
735 if ( FAILED(hr) )
737 CPinBaseImpl_UninitIPin( &This->pin );
741 if ( FAILED(hr) )
743 QUARTZ_FreeObj(This);
744 return hr;
747 This->unk.pEntries = PinIFEntries;
748 This->unk.dwEntries = sizeof(PinIFEntries)/sizeof(PinIFEntries[0]);
749 This->unk.pOnFinalRelease = QUARTZ_DestroyVideoRendererPin;
751 *ppPin = This;
753 TRACE("returned successfully.\n");
755 return S_OK;
758 /***************************************************************************
760 * CVideoRendererImpl::IBasicVideo2
765 static HRESULT WINAPI
766 IBasicVideo2_fnQueryInterface(IBasicVideo2* iface,REFIID riid,void** ppobj)
768 CVideoRendererImpl_THIS(iface,basvid);
770 TRACE("(%p)->()\n",This);
772 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
775 static ULONG WINAPI
776 IBasicVideo2_fnAddRef(IBasicVideo2* iface)
778 CVideoRendererImpl_THIS(iface,basvid);
780 TRACE("(%p)->()\n",This);
782 return IUnknown_AddRef(This->unk.punkControl);
785 static ULONG WINAPI
786 IBasicVideo2_fnRelease(IBasicVideo2* iface)
788 CVideoRendererImpl_THIS(iface,basvid);
790 TRACE("(%p)->()\n",This);
792 return IUnknown_Release(This->unk.punkControl);
795 static HRESULT WINAPI
796 IBasicVideo2_fnGetTypeInfoCount(IBasicVideo2* iface,UINT* pcTypeInfo)
798 CVideoRendererImpl_THIS(iface,basvid);
800 FIXME("(%p)->()\n",This);
802 return E_NOTIMPL;
805 static HRESULT WINAPI
806 IBasicVideo2_fnGetTypeInfo(IBasicVideo2* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
808 CVideoRendererImpl_THIS(iface,basvid);
810 FIXME("(%p)->()\n",This);
812 return E_NOTIMPL;
815 static HRESULT WINAPI
816 IBasicVideo2_fnGetIDsOfNames(IBasicVideo2* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
818 CVideoRendererImpl_THIS(iface,basvid);
820 FIXME("(%p)->()\n",This);
822 return E_NOTIMPL;
825 static HRESULT WINAPI
826 IBasicVideo2_fnInvoke(IBasicVideo2* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
828 CVideoRendererImpl_THIS(iface,basvid);
830 FIXME("(%p)->()\n",This);
832 return E_NOTIMPL;
836 static HRESULT WINAPI
837 IBasicVideo2_fnget_AvgTimePerFrame(IBasicVideo2* iface,REFTIME* prefTime)
839 CVideoRendererImpl_THIS(iface,basvid);
841 FIXME("(%p)->()\n",This);
843 return E_NOTIMPL;
846 static HRESULT WINAPI
847 IBasicVideo2_fnget_BitRate(IBasicVideo2* iface,long* plRate)
849 CVideoRendererImpl_THIS(iface,basvid);
851 FIXME("(%p)->()\n",This);
853 return E_NOTIMPL;
856 static HRESULT WINAPI
857 IBasicVideo2_fnget_BitErrorRate(IBasicVideo2* iface,long* plRate)
859 CVideoRendererImpl_THIS(iface,basvid);
861 FIXME("(%p)->()\n",This);
863 return E_NOTIMPL;
866 static HRESULT WINAPI
867 IBasicVideo2_fnget_VideoWidth(IBasicVideo2* iface,long* plWidth)
869 CVideoRendererImpl_THIS(iface,basvid);
871 FIXME("(%p)->()\n",This);
873 return E_NOTIMPL;
876 static HRESULT WINAPI
877 IBasicVideo2_fnget_VideoHeight(IBasicVideo2* iface,long* plHeight)
879 CVideoRendererImpl_THIS(iface,basvid);
881 FIXME("(%p)->()\n",This);
883 return E_NOTIMPL;
886 static HRESULT WINAPI
887 IBasicVideo2_fnput_SourceLeft(IBasicVideo2* iface,long lLeft)
889 CVideoRendererImpl_THIS(iface,basvid);
891 FIXME("(%p)->()\n",This);
893 return E_NOTIMPL;
896 static HRESULT WINAPI
897 IBasicVideo2_fnget_SourceLeft(IBasicVideo2* iface,long* plLeft)
899 CVideoRendererImpl_THIS(iface,basvid);
901 FIXME("(%p)->()\n",This);
903 return E_NOTIMPL;
906 static HRESULT WINAPI
907 IBasicVideo2_fnput_SourceWidth(IBasicVideo2* iface,long lWidth)
909 CVideoRendererImpl_THIS(iface,basvid);
911 FIXME("(%p)->()\n",This);
913 return E_NOTIMPL;
916 static HRESULT WINAPI
917 IBasicVideo2_fnget_SourceWidth(IBasicVideo2* iface,long* plWidth)
919 CVideoRendererImpl_THIS(iface,basvid);
921 FIXME("(%p)->()\n",This);
923 return E_NOTIMPL;
926 static HRESULT WINAPI
927 IBasicVideo2_fnput_SourceTop(IBasicVideo2* iface,long lTop)
929 CVideoRendererImpl_THIS(iface,basvid);
931 FIXME("(%p)->()\n",This);
933 return E_NOTIMPL;
936 static HRESULT WINAPI
937 IBasicVideo2_fnget_SourceTop(IBasicVideo2* iface,long* plTop)
939 CVideoRendererImpl_THIS(iface,basvid);
941 FIXME("(%p)->()\n",This);
943 return E_NOTIMPL;
946 static HRESULT WINAPI
947 IBasicVideo2_fnput_SourceHeight(IBasicVideo2* iface,long lHeight)
949 CVideoRendererImpl_THIS(iface,basvid);
951 FIXME("(%p)->()\n",This);
953 return E_NOTIMPL;
956 static HRESULT WINAPI
957 IBasicVideo2_fnget_SourceHeight(IBasicVideo2* iface,long* plHeight)
959 CVideoRendererImpl_THIS(iface,basvid);
961 FIXME("(%p)->()\n",This);
963 return E_NOTIMPL;
966 static HRESULT WINAPI
967 IBasicVideo2_fnput_DestinationLeft(IBasicVideo2* iface,long lLeft)
969 CVideoRendererImpl_THIS(iface,basvid);
971 FIXME("(%p)->()\n",This);
973 return E_NOTIMPL;
976 static HRESULT WINAPI
977 IBasicVideo2_fnget_DestinationLeft(IBasicVideo2* iface,long* plLeft)
979 CVideoRendererImpl_THIS(iface,basvid);
981 FIXME("(%p)->()\n",This);
983 return E_NOTIMPL;
986 static HRESULT WINAPI
987 IBasicVideo2_fnput_DestinationWidth(IBasicVideo2* iface,long lWidth)
989 CVideoRendererImpl_THIS(iface,basvid);
991 FIXME("(%p)->()\n",This);
993 return E_NOTIMPL;
996 static HRESULT WINAPI
997 IBasicVideo2_fnget_DestinationWidth(IBasicVideo2* iface,long* plWidth)
999 CVideoRendererImpl_THIS(iface,basvid);
1001 FIXME("(%p)->()\n",This);
1003 return E_NOTIMPL;
1006 static HRESULT WINAPI
1007 IBasicVideo2_fnput_DestinationTop(IBasicVideo2* iface,long lTop)
1009 CVideoRendererImpl_THIS(iface,basvid);
1011 FIXME("(%p)->()\n",This);
1013 return E_NOTIMPL;
1016 static HRESULT WINAPI
1017 IBasicVideo2_fnget_DestinationTop(IBasicVideo2* iface,long* plTop)
1019 CVideoRendererImpl_THIS(iface,basvid);
1021 FIXME("(%p)->()\n",This);
1023 return E_NOTIMPL;
1026 static HRESULT WINAPI
1027 IBasicVideo2_fnput_DestinationHeight(IBasicVideo2* iface,long lHeight)
1029 CVideoRendererImpl_THIS(iface,basvid);
1031 FIXME("(%p)->()\n",This);
1033 return E_NOTIMPL;
1036 static HRESULT WINAPI
1037 IBasicVideo2_fnget_DestinationHeight(IBasicVideo2* iface,long* plHeight)
1039 CVideoRendererImpl_THIS(iface,basvid);
1041 FIXME("(%p)->()\n",This);
1043 return E_NOTIMPL;
1046 static HRESULT WINAPI
1047 IBasicVideo2_fnSetSourcePosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight)
1049 CVideoRendererImpl_THIS(iface,basvid);
1051 FIXME("(%p)->()\n",This);
1053 return E_NOTIMPL;
1056 static HRESULT WINAPI
1057 IBasicVideo2_fnGetSourcePosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1059 CVideoRendererImpl_THIS(iface,basvid);
1061 FIXME("(%p)->()\n",This);
1063 return E_NOTIMPL;
1066 static HRESULT WINAPI
1067 IBasicVideo2_fnSetDefaultSourcePosition(IBasicVideo2* iface)
1069 CVideoRendererImpl_THIS(iface,basvid);
1071 FIXME("(%p)->()\n",This);
1073 return E_NOTIMPL;
1076 static HRESULT WINAPI
1077 IBasicVideo2_fnSetDestinationPosition(IBasicVideo2* iface,long lLeft,long lTop,long lWidth,long lHeight)
1079 CVideoRendererImpl_THIS(iface,basvid);
1081 FIXME("(%p)->()\n",This);
1083 return E_NOTIMPL;
1086 static HRESULT WINAPI
1087 IBasicVideo2_fnGetDestinationPosition(IBasicVideo2* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1089 CVideoRendererImpl_THIS(iface,basvid);
1091 FIXME("(%p)->()\n",This);
1093 return E_NOTIMPL;
1096 static HRESULT WINAPI
1097 IBasicVideo2_fnSetDefaultDestinationPosition(IBasicVideo2* iface)
1099 CVideoRendererImpl_THIS(iface,basvid);
1101 FIXME("(%p)->()\n",This);
1103 return E_NOTIMPL;
1106 static HRESULT WINAPI
1107 IBasicVideo2_fnGetVideoSize(IBasicVideo2* iface,long* plWidth,long* plHeight)
1109 CVideoRendererImpl_THIS(iface,basvid);
1111 FIXME("(%p)->()\n",This);
1113 return E_NOTIMPL;
1116 static HRESULT WINAPI
1117 IBasicVideo2_fnGetVideoPaletteEntries(IBasicVideo2* iface,long lStart,long lCount,long* plRet,long* plPaletteEntry)
1119 CVideoRendererImpl_THIS(iface,basvid);
1121 FIXME("(%p)->()\n",This);
1123 return E_NOTIMPL;
1126 static HRESULT WINAPI
1127 IBasicVideo2_fnGetCurrentImage(IBasicVideo2* iface,long* plBufferSize,long* plDIBBuffer)
1129 CVideoRendererImpl_THIS(iface,basvid);
1131 FIXME("(%p)->()\n",This);
1133 return E_NOTIMPL;
1136 static HRESULT WINAPI
1137 IBasicVideo2_fnIsUsingDefaultSource(IBasicVideo2* iface)
1139 CVideoRendererImpl_THIS(iface,basvid);
1141 FIXME("(%p)->()\n",This);
1143 return E_NOTIMPL;
1146 static HRESULT WINAPI
1147 IBasicVideo2_fnIsUsingDefaultDestination(IBasicVideo2* iface)
1149 CVideoRendererImpl_THIS(iface,basvid);
1151 FIXME("(%p)->()\n",This);
1153 return E_NOTIMPL;
1156 static HRESULT WINAPI
1157 IBasicVideo2_fnGetPreferredAspectRatio(IBasicVideo2* iface,long* plRateX,long* plRateY)
1159 CVideoRendererImpl_THIS(iface,basvid);
1161 FIXME("(%p)->()\n",This);
1163 return E_NOTIMPL;
1169 static ICOM_VTABLE(IBasicVideo2) ibasicvideo =
1171 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1172 /* IUnknown fields */
1173 IBasicVideo2_fnQueryInterface,
1174 IBasicVideo2_fnAddRef,
1175 IBasicVideo2_fnRelease,
1176 /* IDispatch fields */
1177 IBasicVideo2_fnGetTypeInfoCount,
1178 IBasicVideo2_fnGetTypeInfo,
1179 IBasicVideo2_fnGetIDsOfNames,
1180 IBasicVideo2_fnInvoke,
1181 /* IBasicVideo fields */
1182 IBasicVideo2_fnget_AvgTimePerFrame,
1183 IBasicVideo2_fnget_BitRate,
1184 IBasicVideo2_fnget_BitErrorRate,
1185 IBasicVideo2_fnget_VideoWidth,
1186 IBasicVideo2_fnget_VideoHeight,
1187 IBasicVideo2_fnput_SourceLeft,
1188 IBasicVideo2_fnget_SourceLeft,
1189 IBasicVideo2_fnput_SourceWidth,
1190 IBasicVideo2_fnget_SourceWidth,
1191 IBasicVideo2_fnput_SourceTop,
1192 IBasicVideo2_fnget_SourceTop,
1193 IBasicVideo2_fnput_SourceHeight,
1194 IBasicVideo2_fnget_SourceHeight,
1195 IBasicVideo2_fnput_DestinationLeft,
1196 IBasicVideo2_fnget_DestinationLeft,
1197 IBasicVideo2_fnput_DestinationWidth,
1198 IBasicVideo2_fnget_DestinationWidth,
1199 IBasicVideo2_fnput_DestinationTop,
1200 IBasicVideo2_fnget_DestinationTop,
1201 IBasicVideo2_fnput_DestinationHeight,
1202 IBasicVideo2_fnget_DestinationHeight,
1203 IBasicVideo2_fnSetSourcePosition,
1204 IBasicVideo2_fnGetSourcePosition,
1205 IBasicVideo2_fnSetDefaultSourcePosition,
1206 IBasicVideo2_fnSetDestinationPosition,
1207 IBasicVideo2_fnGetDestinationPosition,
1208 IBasicVideo2_fnSetDefaultDestinationPosition,
1209 IBasicVideo2_fnGetVideoSize,
1210 IBasicVideo2_fnGetVideoPaletteEntries,
1211 IBasicVideo2_fnGetCurrentImage,
1212 IBasicVideo2_fnIsUsingDefaultSource,
1213 IBasicVideo2_fnIsUsingDefaultDestination,
1214 /* IBasicVideo2 fields */
1215 IBasicVideo2_fnGetPreferredAspectRatio,
1219 HRESULT CVideoRendererImpl_InitIBasicVideo2( CVideoRendererImpl* This )
1221 TRACE("(%p)\n",This);
1222 ICOM_VTBL(&This->basvid) = &ibasicvideo;
1224 return NOERROR;
1227 void CVideoRendererImpl_UninitIBasicVideo2( CVideoRendererImpl* This )
1229 TRACE("(%p)\n",This);
1232 /***************************************************************************
1234 * CVideoRendererImpl::IVideoWindow
1239 static HRESULT WINAPI
1240 IVideoWindow_fnQueryInterface(IVideoWindow* iface,REFIID riid,void** ppobj)
1242 CVideoRendererImpl_THIS(iface,vidwin);
1244 TRACE("(%p)->()\n",This);
1246 return IUnknown_QueryInterface(This->unk.punkControl,riid,ppobj);
1249 static ULONG WINAPI
1250 IVideoWindow_fnAddRef(IVideoWindow* iface)
1252 CVideoRendererImpl_THIS(iface,vidwin);
1254 TRACE("(%p)->()\n",This);
1256 return IUnknown_AddRef(This->unk.punkControl);
1259 static ULONG WINAPI
1260 IVideoWindow_fnRelease(IVideoWindow* iface)
1262 CVideoRendererImpl_THIS(iface,vidwin);
1264 TRACE("(%p)->()\n",This);
1266 return IUnknown_Release(This->unk.punkControl);
1269 static HRESULT WINAPI
1270 IVideoWindow_fnGetTypeInfoCount(IVideoWindow* iface,UINT* pcTypeInfo)
1272 CVideoRendererImpl_THIS(iface,vidwin);
1274 FIXME("(%p)->()\n",This);
1276 return E_NOTIMPL;
1279 static HRESULT WINAPI
1280 IVideoWindow_fnGetTypeInfo(IVideoWindow* iface,UINT iTypeInfo, LCID lcid, ITypeInfo** ppobj)
1282 CVideoRendererImpl_THIS(iface,vidwin);
1284 FIXME("(%p)->()\n",This);
1286 return E_NOTIMPL;
1289 static HRESULT WINAPI
1290 IVideoWindow_fnGetIDsOfNames(IVideoWindow* iface,REFIID riid, LPOLESTR* ppwszName, UINT cNames, LCID lcid, DISPID* pDispId)
1292 CVideoRendererImpl_THIS(iface,vidwin);
1294 FIXME("(%p)->()\n",This);
1296 return E_NOTIMPL;
1299 static HRESULT WINAPI
1300 IVideoWindow_fnInvoke(IVideoWindow* iface,DISPID DispId, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS* pDispParams, VARIANT* pVarRes, EXCEPINFO* pExcepInfo, UINT* puArgErr)
1302 CVideoRendererImpl_THIS(iface,vidwin);
1304 FIXME("(%p)->()\n",This);
1306 return E_NOTIMPL;
1311 static HRESULT WINAPI
1312 IVideoWindow_fnput_Caption(IVideoWindow* iface,BSTR strCaption)
1314 CVideoRendererImpl_THIS(iface,vidwin);
1316 FIXME("(%p)->()\n",This);
1318 return E_NOTIMPL;
1321 static HRESULT WINAPI
1322 IVideoWindow_fnget_Caption(IVideoWindow* iface,BSTR* pstrCaption)
1324 CVideoRendererImpl_THIS(iface,vidwin);
1326 FIXME("(%p)->()\n",This);
1328 return E_NOTIMPL;
1331 static HRESULT WINAPI
1332 IVideoWindow_fnput_WindowStyle(IVideoWindow* iface,long lStyle)
1334 CVideoRendererImpl_THIS(iface,vidwin);
1336 FIXME("(%p)->()\n",This);
1338 return E_NOTIMPL;
1341 static HRESULT WINAPI
1342 IVideoWindow_fnget_WindowStyle(IVideoWindow* iface,long* plStyle)
1344 CVideoRendererImpl_THIS(iface,vidwin);
1346 FIXME("(%p)->()\n",This);
1348 return E_NOTIMPL;
1351 static HRESULT WINAPI
1352 IVideoWindow_fnput_WindowStyleEx(IVideoWindow* iface,long lExStyle)
1354 CVideoRendererImpl_THIS(iface,vidwin);
1356 FIXME("(%p)->()\n",This);
1358 return E_NOTIMPL;
1361 static HRESULT WINAPI
1362 IVideoWindow_fnget_WindowStyleEx(IVideoWindow* iface,long* plExStyle)
1364 CVideoRendererImpl_THIS(iface,vidwin);
1366 FIXME("(%p)->()\n",This);
1368 return E_NOTIMPL;
1371 static HRESULT WINAPI
1372 IVideoWindow_fnput_AutoShow(IVideoWindow* iface,long lAutoShow)
1374 CVideoRendererImpl_THIS(iface,vidwin);
1376 FIXME("(%p)->()\n",This);
1378 return E_NOTIMPL;
1381 static HRESULT WINAPI
1382 IVideoWindow_fnget_AutoShow(IVideoWindow* iface,long* plAutoShow)
1384 CVideoRendererImpl_THIS(iface,vidwin);
1386 FIXME("(%p)->()\n",This);
1388 return E_NOTIMPL;
1391 static HRESULT WINAPI
1392 IVideoWindow_fnput_WindowState(IVideoWindow* iface,long lState)
1394 CVideoRendererImpl_THIS(iface,vidwin);
1396 FIXME("(%p)->()\n",This);
1398 return E_NOTIMPL;
1401 static HRESULT WINAPI
1402 IVideoWindow_fnget_WindowState(IVideoWindow* iface,long* plState)
1404 CVideoRendererImpl_THIS(iface,vidwin);
1406 FIXME("(%p)->()\n",This);
1408 return E_NOTIMPL;
1411 static HRESULT WINAPI
1412 IVideoWindow_fnput_BackgroundPalette(IVideoWindow* iface,long lBackPal)
1414 CVideoRendererImpl_THIS(iface,vidwin);
1416 FIXME("(%p)->()\n",This);
1418 return E_NOTIMPL;
1421 static HRESULT WINAPI
1422 IVideoWindow_fnget_BackgroundPalette(IVideoWindow* iface,long* plBackPal)
1424 CVideoRendererImpl_THIS(iface,vidwin);
1426 FIXME("(%p)->()\n",This);
1428 return E_NOTIMPL;
1431 static HRESULT WINAPI
1432 IVideoWindow_fnput_Visible(IVideoWindow* iface,long lVisible)
1434 CVideoRendererImpl_THIS(iface,vidwin);
1436 FIXME("(%p)->()\n",This);
1438 return E_NOTIMPL;
1441 static HRESULT WINAPI
1442 IVideoWindow_fnget_Visible(IVideoWindow* iface,long* plVisible)
1444 CVideoRendererImpl_THIS(iface,vidwin);
1446 FIXME("(%p)->()\n",This);
1448 return E_NOTIMPL;
1451 static HRESULT WINAPI
1452 IVideoWindow_fnput_Left(IVideoWindow* iface,long lLeft)
1454 CVideoRendererImpl_THIS(iface,vidwin);
1456 FIXME("(%p)->()\n",This);
1458 return E_NOTIMPL;
1461 static HRESULT WINAPI
1462 IVideoWindow_fnget_Left(IVideoWindow* iface,long* plLeft)
1464 CVideoRendererImpl_THIS(iface,vidwin);
1466 FIXME("(%p)->()\n",This);
1468 return E_NOTIMPL;
1471 static HRESULT WINAPI
1472 IVideoWindow_fnput_Width(IVideoWindow* iface,long lWidth)
1474 CVideoRendererImpl_THIS(iface,vidwin);
1476 FIXME("(%p)->()\n",This);
1478 return E_NOTIMPL;
1481 static HRESULT WINAPI
1482 IVideoWindow_fnget_Width(IVideoWindow* iface,long* plWidth)
1484 CVideoRendererImpl_THIS(iface,vidwin);
1486 FIXME("(%p)->()\n",This);
1488 return E_NOTIMPL;
1491 static HRESULT WINAPI
1492 IVideoWindow_fnput_Top(IVideoWindow* iface,long lTop)
1494 CVideoRendererImpl_THIS(iface,vidwin);
1496 FIXME("(%p)->()\n",This);
1498 return E_NOTIMPL;
1501 static HRESULT WINAPI
1502 IVideoWindow_fnget_Top(IVideoWindow* iface,long* plTop)
1504 CVideoRendererImpl_THIS(iface,vidwin);
1506 FIXME("(%p)->()\n",This);
1508 return E_NOTIMPL;
1511 static HRESULT WINAPI
1512 IVideoWindow_fnput_Height(IVideoWindow* iface,long lHeight)
1514 CVideoRendererImpl_THIS(iface,vidwin);
1516 FIXME("(%p)->()\n",This);
1518 return E_NOTIMPL;
1521 static HRESULT WINAPI
1522 IVideoWindow_fnget_Height(IVideoWindow* iface,long* plHeight)
1524 CVideoRendererImpl_THIS(iface,vidwin);
1526 FIXME("(%p)->()\n",This);
1528 return E_NOTIMPL;
1531 static HRESULT WINAPI
1532 IVideoWindow_fnput_Owner(IVideoWindow* iface,OAHWND hwnd)
1534 CVideoRendererImpl_THIS(iface,vidwin);
1536 FIXME("(%p)->()\n",This);
1538 return E_NOTIMPL;
1541 static HRESULT WINAPI
1542 IVideoWindow_fnget_Owner(IVideoWindow* iface,OAHWND* phwnd)
1544 CVideoRendererImpl_THIS(iface,vidwin);
1546 FIXME("(%p)->()\n",This);
1548 return E_NOTIMPL;
1551 static HRESULT WINAPI
1552 IVideoWindow_fnput_MessageDrain(IVideoWindow* iface,OAHWND hwnd)
1554 CVideoRendererImpl_THIS(iface,vidwin);
1556 FIXME("(%p)->()\n",This);
1558 return E_NOTIMPL;
1561 static HRESULT WINAPI
1562 IVideoWindow_fnget_MessageDrain(IVideoWindow* iface,OAHWND* phwnd)
1564 CVideoRendererImpl_THIS(iface,vidwin);
1566 FIXME("(%p)->()\n",This);
1568 return E_NOTIMPL;
1571 static HRESULT WINAPI
1572 IVideoWindow_fnget_BorderColor(IVideoWindow* iface,long* plColor)
1574 CVideoRendererImpl_THIS(iface,vidwin);
1576 FIXME("(%p)->()\n",This);
1578 return E_NOTIMPL;
1581 static HRESULT WINAPI
1582 IVideoWindow_fnput_BorderColor(IVideoWindow* iface,long lColor)
1584 CVideoRendererImpl_THIS(iface,vidwin);
1586 FIXME("(%p)->()\n",This);
1588 return E_NOTIMPL;
1591 static HRESULT WINAPI
1592 IVideoWindow_fnget_FullScreenMode(IVideoWindow* iface,long* plMode)
1594 CVideoRendererImpl_THIS(iface,vidwin);
1596 FIXME("(%p)->()\n",This);
1598 return E_NOTIMPL;
1601 static HRESULT WINAPI
1602 IVideoWindow_fnput_FullScreenMode(IVideoWindow* iface,long lMode)
1604 CVideoRendererImpl_THIS(iface,vidwin);
1606 FIXME("(%p)->()\n",This);
1608 return E_NOTIMPL;
1611 static HRESULT WINAPI
1612 IVideoWindow_fnSetWindowForeground(IVideoWindow* iface,long lFocus)
1614 CVideoRendererImpl_THIS(iface,vidwin);
1616 FIXME("(%p)->()\n",This);
1618 return E_NOTIMPL;
1621 static HRESULT WINAPI
1622 IVideoWindow_fnNotifyOwnerMessage(IVideoWindow* iface,OAHWND hwnd,long message,LONG_PTR wParam,LONG_PTR lParam)
1624 CVideoRendererImpl_THIS(iface,vidwin);
1626 FIXME("(%p)->()\n",This);
1628 return E_NOTIMPL;
1631 static HRESULT WINAPI
1632 IVideoWindow_fnSetWindowPosition(IVideoWindow* iface,long lLeft,long lTop,long lWidth,long lHeight)
1634 CVideoRendererImpl_THIS(iface,vidwin);
1636 FIXME("(%p)->()\n",This);
1638 return E_NOTIMPL;
1641 static HRESULT WINAPI
1642 IVideoWindow_fnGetWindowPosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1644 CVideoRendererImpl_THIS(iface,vidwin);
1646 FIXME("(%p)->()\n",This);
1648 return E_NOTIMPL;
1651 static HRESULT WINAPI
1652 IVideoWindow_fnGetMinIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight)
1654 CVideoRendererImpl_THIS(iface,vidwin);
1656 FIXME("(%p)->()\n",This);
1658 return E_NOTIMPL;
1661 static HRESULT WINAPI
1662 IVideoWindow_fnGetMaxIdealImageSize(IVideoWindow* iface,long* plWidth,long* plHeight)
1664 CVideoRendererImpl_THIS(iface,vidwin);
1666 FIXME("(%p)->()\n",This);
1668 return E_NOTIMPL;
1671 static HRESULT WINAPI
1672 IVideoWindow_fnGetRestorePosition(IVideoWindow* iface,long* plLeft,long* plTop,long* plWidth,long* plHeight)
1674 CVideoRendererImpl_THIS(iface,vidwin);
1676 FIXME("(%p)->()\n",This);
1678 return E_NOTIMPL;
1681 static HRESULT WINAPI
1682 IVideoWindow_fnHideCursor(IVideoWindow* iface,long lHide)
1684 CVideoRendererImpl_THIS(iface,vidwin);
1686 FIXME("(%p)->()\n",This);
1688 return E_NOTIMPL;
1691 static HRESULT WINAPI
1692 IVideoWindow_fnIsCursorHidden(IVideoWindow* iface,long* plHide)
1694 CVideoRendererImpl_THIS(iface,vidwin);
1696 FIXME("(%p)->()\n",This);
1698 return E_NOTIMPL;
1704 static ICOM_VTABLE(IVideoWindow) ivideowindow =
1706 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
1707 /* IUnknown fields */
1708 IVideoWindow_fnQueryInterface,
1709 IVideoWindow_fnAddRef,
1710 IVideoWindow_fnRelease,
1711 /* IDispatch fields */
1712 IVideoWindow_fnGetTypeInfoCount,
1713 IVideoWindow_fnGetTypeInfo,
1714 IVideoWindow_fnGetIDsOfNames,
1715 IVideoWindow_fnInvoke,
1716 /* IVideoWindow fields */
1717 IVideoWindow_fnput_Caption,
1718 IVideoWindow_fnget_Caption,
1719 IVideoWindow_fnput_WindowStyle,
1720 IVideoWindow_fnget_WindowStyle,
1721 IVideoWindow_fnput_WindowStyleEx,
1722 IVideoWindow_fnget_WindowStyleEx,
1723 IVideoWindow_fnput_AutoShow,
1724 IVideoWindow_fnget_AutoShow,
1725 IVideoWindow_fnput_WindowState,
1726 IVideoWindow_fnget_WindowState,
1727 IVideoWindow_fnput_BackgroundPalette,
1728 IVideoWindow_fnget_BackgroundPalette,
1729 IVideoWindow_fnput_Visible,
1730 IVideoWindow_fnget_Visible,
1731 IVideoWindow_fnput_Left,
1732 IVideoWindow_fnget_Left,
1733 IVideoWindow_fnput_Width,
1734 IVideoWindow_fnget_Width,
1735 IVideoWindow_fnput_Top,
1736 IVideoWindow_fnget_Top,
1737 IVideoWindow_fnput_Height,
1738 IVideoWindow_fnget_Height,
1739 IVideoWindow_fnput_Owner,
1740 IVideoWindow_fnget_Owner,
1741 IVideoWindow_fnput_MessageDrain,
1742 IVideoWindow_fnget_MessageDrain,
1743 IVideoWindow_fnget_BorderColor,
1744 IVideoWindow_fnput_BorderColor,
1745 IVideoWindow_fnget_FullScreenMode,
1746 IVideoWindow_fnput_FullScreenMode,
1747 IVideoWindow_fnSetWindowForeground,
1748 IVideoWindow_fnNotifyOwnerMessage,
1749 IVideoWindow_fnSetWindowPosition,
1750 IVideoWindow_fnGetWindowPosition,
1751 IVideoWindow_fnGetMinIdealImageSize,
1752 IVideoWindow_fnGetMaxIdealImageSize,
1753 IVideoWindow_fnGetRestorePosition,
1754 IVideoWindow_fnHideCursor,
1755 IVideoWindow_fnIsCursorHidden,
1760 HRESULT CVideoRendererImpl_InitIVideoWindow( CVideoRendererImpl* This )
1762 TRACE("(%p)\n",This);
1763 ICOM_VTBL(&This->vidwin) = &ivideowindow;
1765 return NOERROR;
1768 void CVideoRendererImpl_UninitIVideoWindow( CVideoRendererImpl* This )
1770 TRACE("(%p)\n",This);