ReactOS  0.4.14-dev-41-g31d7680
vmr9.c File Reference
#include "config.h"
#include "quartz_private.h"
#include "uuids.h"
#include "vfwmsgs.h"
#include "amvideo.h"
#include "windef.h"
#include "winbase.h"
#include "dshow.h"
#include "evcode.h"
#include "strmif.h"
#include "ddraw.h"
#include "dvdmedia.h"
#include "d3d9.h"
#include "vmr9.h"
#include "pin.h"
#include "wine/unicode.h"
#include "wine/debug.h"
Include dependency graph for vmr9.c:

Go to the source code of this file.

Classes

struct  quartz_vmr
 
struct  VMR9DefaultAllocatorPresenterImpl
 
struct  get_available_monitors_args
 
struct  VERTEX
 

Macros

#define USED_FVF   (D3DFVF_XYZRHW | D3DFVF_TEX1)
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (quartz)
 
static struct quartz_vmrimpl_from_inner_IUnknown (IUnknown *iface)
 
static struct quartz_vmrimpl_from_BaseWindow (BaseWindow *wnd)
 
static struct quartz_vmrimpl_from_IVideoWindow (IVideoWindow *iface)
 
static struct quartz_vmrimpl_from_BaseControlVideo (BaseControlVideo *cvid)
 
static struct quartz_vmrimpl_from_IBasicVideo (IBasicVideo *iface)
 
static struct quartz_vmrimpl_from_IAMCertifiedOutputProtection (IAMCertifiedOutputProtection *iface)
 
static struct quartz_vmrimpl_from_IAMFilterMiscFlags (IAMFilterMiscFlags *iface)
 
static struct quartz_vmrimpl_from_IVMRFilterConfig (IVMRFilterConfig *iface)
 
static struct quartz_vmrimpl_from_IVMRFilterConfig9 (IVMRFilterConfig9 *iface)
 
static struct quartz_vmrimpl_from_IVMRMonitorConfig (IVMRMonitorConfig *iface)
 
static struct quartz_vmrimpl_from_IVMRMonitorConfig9 (IVMRMonitorConfig9 *iface)
 
static struct quartz_vmrimpl_from_IVMRSurfaceAllocatorNotify (IVMRSurfaceAllocatorNotify *iface)
 
static struct quartz_vmrimpl_from_IVMRSurfaceAllocatorNotify9 (IVMRSurfaceAllocatorNotify9 *iface)
 
static struct quartz_vmrimpl_from_IVMRWindowlessControl (IVMRWindowlessControl *iface)
 
static struct quartz_vmrimpl_from_IVMRWindowlessControl9 (IVMRWindowlessControl9 *iface)
 
static VMR9DefaultAllocatorPresenterImplimpl_from_IVMRImagePresenter9 (IVMRImagePresenter9 *iface)
 
static VMR9DefaultAllocatorPresenterImplimpl_from_IVMRSurfaceAllocatorEx9 (IVMRSurfaceAllocatorEx9 *iface)
 
static HRESULT VMR9DefaultAllocatorPresenterImpl_create (struct quartz_vmr *parent, LPVOID *ppv)
 
static DWORD VMR9_SendSampleData (struct quartz_vmr *This, VMR9PresentationInfo *info, LPBYTE data, DWORD size)
 
static HRESULT WINAPI VMR9_DoRenderSample (BaseRenderer *iface, IMediaSample *pSample)
 
static HRESULT WINAPI VMR9_CheckMediaType (BaseRenderer *iface, const AM_MEDIA_TYPE *pmt)
 
static HRESULT VMR9_maybe_init (struct quartz_vmr *This, BOOL force)
 
static VOID WINAPI VMR9_OnStartStreaming (BaseRenderer *iface)
 
static VOID WINAPI VMR9_OnStopStreaming (BaseRenderer *iface)
 
static HRESULT WINAPI VMR9_ShouldDrawSampleNow (BaseRenderer *This, IMediaSample *pSample, REFERENCE_TIME *pStartTime, REFERENCE_TIME *pEndTime)
 
static HRESULT WINAPI VMR9_CompleteConnect (BaseRenderer *This, IPin *pReceivePin)
 
static HRESULT WINAPI VMR9_BreakConnect (BaseRenderer *This)
 
static LPWSTR WINAPI VMR9_GetClassWindowStyles (BaseWindow *This, DWORD *pClassStyles, DWORD *pWindowStyles, DWORD *pWindowStylesEx)
 
static RECT WINAPI VMR9_GetDefaultRect (BaseWindow *This)
 
static BOOL WINAPI VMR9_OnSize (BaseWindow *This, LONG Width, LONG Height)
 
static HRESULT WINAPI VMR9_GetSourceRect (BaseControlVideo *This, RECT *pSourceRect)
 
static HRESULT WINAPI VMR9_GetStaticImage (BaseControlVideo *This, LONG *pBufferSize, LONG *pDIBImage)
 
static HRESULT WINAPI VMR9_GetTargetRect (BaseControlVideo *This, RECT *pTargetRect)
 
static VIDEOINFOHEADER *WINAPI VMR9_GetVideoFormat (BaseControlVideo *This)
 
static HRESULT WINAPI VMR9_IsDefaultSourceRect (BaseControlVideo *This)
 
static HRESULT WINAPI VMR9_IsDefaultTargetRect (BaseControlVideo *This)
 
static HRESULT WINAPI VMR9_SetDefaultSourceRect (BaseControlVideo *This)
 
static HRESULT WINAPI VMR9_SetDefaultTargetRect (BaseControlVideo *This)
 
static HRESULT WINAPI VMR9_SetSourceRect (BaseControlVideo *This, RECT *pSourceRect)
 
static HRESULT WINAPI VMR9_SetTargetRect (BaseControlVideo *This, RECT *pTargetRect)
 
static HRESULT WINAPI VMR9Inner_QueryInterface (IUnknown *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9Inner_AddRef (IUnknown *iface)
 
static ULONG WINAPI VMR9Inner_Release (IUnknown *iface)
 
static HRESULT WINAPI VMR9_QueryInterface (IBaseFilter *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9_AddRef (IBaseFilter *iface)
 
static ULONG WINAPI VMR9_Release (IBaseFilter *iface)
 
static HRESULT WINAPI Videowindow_QueryInterface (IVideoWindow *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI Videowindow_AddRef (IVideoWindow *iface)
 
static ULONG WINAPI Videowindow_Release (IVideoWindow *iface)
 
static HRESULT WINAPI Basicvideo_QueryInterface (IBasicVideo *iface, REFIID riid, LPVOID *ppvObj)
 
static ULONG WINAPI Basicvideo_AddRef (IBasicVideo *iface)
 
static ULONG WINAPI Basicvideo_Release (IBasicVideo *iface)
 
static HRESULT WINAPI AMCertifiedOutputProtection_QueryInterface (IAMCertifiedOutputProtection *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AMCertifiedOutputProtection_AddRef (IAMCertifiedOutputProtection *iface)
 
static ULONG WINAPI AMCertifiedOutputProtection_Release (IAMCertifiedOutputProtection *iface)
 
static HRESULT WINAPI AMCertifiedOutputProtection_KeyExchange (IAMCertifiedOutputProtection *iface, GUID *pRandom, BYTE **VarLenCertGH, DWORD *pdwLengthCertGH)
 
static HRESULT WINAPI AMCertifiedOutputProtection_SessionSequenceStart (IAMCertifiedOutputProtection *iface, AMCOPPSignature *pSig)
 
static HRESULT WINAPI AMCertifiedOutputProtection_ProtectionCommand (IAMCertifiedOutputProtection *iface, const AMCOPPCommand *cmd)
 
static HRESULT WINAPI AMCertifiedOutputProtection_ProtectionStatus (IAMCertifiedOutputProtection *iface, const AMCOPPStatusInput *pStatusInput, AMCOPPStatusOutput *pStatusOutput)
 
static HRESULT WINAPI AMFilterMiscFlags_QueryInterface (IAMFilterMiscFlags *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI AMFilterMiscFlags_AddRef (IAMFilterMiscFlags *iface)
 
static ULONG WINAPI AMFilterMiscFlags_Release (IAMFilterMiscFlags *iface)
 
static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags (IAMFilterMiscFlags *iface)
 
static HRESULT WINAPI VMR7FilterConfig_QueryInterface (IVMRFilterConfig *iface, REFIID riid, void **ppv)
 
static ULONG WINAPI VMR7FilterConfig_AddRef (IVMRFilterConfig *iface)
 
static ULONG WINAPI VMR7FilterConfig_Release (IVMRFilterConfig *iface)
 
static HRESULT WINAPI VMR7FilterConfig_SetImageCompositor (IVMRFilterConfig *iface, IVMRImageCompositor *compositor)
 
static HRESULT WINAPI VMR7FilterConfig_SetNumberOfStreams (IVMRFilterConfig *iface, DWORD max)
 
static HRESULT WINAPI VMR7FilterConfig_GetNumberOfStreams (IVMRFilterConfig *iface, DWORD *max)
 
static HRESULT WINAPI VMR7FilterConfig_SetRenderingPrefs (IVMRFilterConfig *iface, DWORD renderflags)
 
static HRESULT WINAPI VMR7FilterConfig_GetRenderingPrefs (IVMRFilterConfig *iface, DWORD *renderflags)
 
static HRESULT WINAPI VMR7FilterConfig_SetRenderingMode (IVMRFilterConfig *iface, DWORD mode)
 
static HRESULT WINAPI VMR7FilterConfig_GetRenderingMode (IVMRFilterConfig *iface, DWORD *mode)
 
static BOOL CALLBACK get_available_monitors_proc (HMONITOR hmon, HDC hdc, LPRECT lprc, LPARAM lparam)
 
static HRESULT WINAPI VMR7MonitorConfig_QueryInterface (IVMRMonitorConfig *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR7MonitorConfig_AddRef (IVMRMonitorConfig *iface)
 
static ULONG WINAPI VMR7MonitorConfig_Release (IVMRMonitorConfig *iface)
 
static HRESULT WINAPI VMR7MonitorConfig_SetMonitor (IVMRMonitorConfig *iface, const VMRGUID *pGUID)
 
static HRESULT WINAPI VMR7MonitorConfig_GetMonitor (IVMRMonitorConfig *iface, VMRGUID *pGUID)
 
static HRESULT WINAPI VMR7MonitorConfig_SetDefaultMonitor (IVMRMonitorConfig *iface, const VMRGUID *pGUID)
 
static HRESULT WINAPI VMR7MonitorConfig_GetDefaultMonitor (IVMRMonitorConfig *iface, VMRGUID *pGUID)
 
static HRESULT WINAPI VMR7MonitorConfig_GetAvailableMonitors (IVMRMonitorConfig *iface, VMRMONITORINFO *info, DWORD arraysize, DWORD *numdev)
 
static HRESULT WINAPI VMR9MonitorConfig_QueryInterface (IVMRMonitorConfig9 *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9MonitorConfig_AddRef (IVMRMonitorConfig9 *iface)
 
static ULONG WINAPI VMR9MonitorConfig_Release (IVMRMonitorConfig9 *iface)
 
static HRESULT WINAPI VMR9MonitorConfig_SetMonitor (IVMRMonitorConfig9 *iface, UINT uDev)
 
static HRESULT WINAPI VMR9MonitorConfig_GetMonitor (IVMRMonitorConfig9 *iface, UINT *uDev)
 
static HRESULT WINAPI VMR9MonitorConfig_SetDefaultMonitor (IVMRMonitorConfig9 *iface, UINT uDev)
 
static HRESULT WINAPI VMR9MonitorConfig_GetDefaultMonitor (IVMRMonitorConfig9 *iface, UINT *uDev)
 
static HRESULT WINAPI VMR9MonitorConfig_GetAvailableMonitors (IVMRMonitorConfig9 *iface, VMR9MonitorInfo *info, DWORD arraysize, DWORD *numdev)
 
static HRESULT WINAPI VMR9FilterConfig_QueryInterface (IVMRFilterConfig9 *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9FilterConfig_AddRef (IVMRFilterConfig9 *iface)
 
static ULONG WINAPI VMR9FilterConfig_Release (IVMRFilterConfig9 *iface)
 
static HRESULT WINAPI VMR9FilterConfig_SetImageCompositor (IVMRFilterConfig9 *iface, IVMRImageCompositor9 *compositor)
 
static HRESULT WINAPI VMR9FilterConfig_SetNumberOfStreams (IVMRFilterConfig9 *iface, DWORD max)
 
static HRESULT WINAPI VMR9FilterConfig_GetNumberOfStreams (IVMRFilterConfig9 *iface, DWORD *max)
 
static HRESULT WINAPI VMR9FilterConfig_SetRenderingPrefs (IVMRFilterConfig9 *iface, DWORD renderflags)
 
static HRESULT WINAPI VMR9FilterConfig_GetRenderingPrefs (IVMRFilterConfig9 *iface, DWORD *renderflags)
 
static HRESULT WINAPI VMR9FilterConfig_SetRenderingMode (IVMRFilterConfig9 *iface, DWORD mode)
 
static HRESULT WINAPI VMR9FilterConfig_GetRenderingMode (IVMRFilterConfig9 *iface, DWORD *mode)
 
static HRESULT WINAPI VMR7WindowlessControl_QueryInterface (IVMRWindowlessControl *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR7WindowlessControl_AddRef (IVMRWindowlessControl *iface)
 
static ULONG WINAPI VMR7WindowlessControl_Release (IVMRWindowlessControl *iface)
 
static HRESULT WINAPI VMR7WindowlessControl_GetNativeVideoSize (IVMRWindowlessControl *iface, LONG *width, LONG *height, LONG *arwidth, LONG *arheight)
 
static HRESULT WINAPI VMR7WindowlessControl_GetMinIdealVideoSize (IVMRWindowlessControl *iface, LONG *width, LONG *height)
 
static HRESULT WINAPI VMR7WindowlessControl_GetMaxIdealVideoSize (IVMRWindowlessControl *iface, LONG *width, LONG *height)
 
static HRESULT WINAPI VMR7WindowlessControl_SetVideoPosition (IVMRWindowlessControl *iface, const RECT *source, const RECT *dest)
 
static HRESULT WINAPI VMR7WindowlessControl_GetVideoPosition (IVMRWindowlessControl *iface, RECT *source, RECT *dest)
 
static HRESULT WINAPI VMR7WindowlessControl_GetAspectRatioMode (IVMRWindowlessControl *iface, DWORD *mode)
 
static HRESULT WINAPI VMR7WindowlessControl_SetAspectRatioMode (IVMRWindowlessControl *iface, DWORD mode)
 
static HRESULT WINAPI VMR7WindowlessControl_SetVideoClippingWindow (IVMRWindowlessControl *iface, HWND hwnd)
 
static HRESULT WINAPI VMR7WindowlessControl_RepaintVideo (IVMRWindowlessControl *iface, HWND hwnd, HDC hdc)
 
static HRESULT WINAPI VMR7WindowlessControl_DisplayModeChanged (IVMRWindowlessControl *iface)
 
static HRESULT WINAPI VMR7WindowlessControl_GetCurrentImage (IVMRWindowlessControl *iface, BYTE **dib)
 
static HRESULT WINAPI VMR7WindowlessControl_SetBorderColor (IVMRWindowlessControl *iface, COLORREF color)
 
static HRESULT WINAPI VMR7WindowlessControl_GetBorderColor (IVMRWindowlessControl *iface, COLORREF *color)
 
static HRESULT WINAPI VMR7WindowlessControl_SetColorKey (IVMRWindowlessControl *iface, COLORREF color)
 
static HRESULT WINAPI VMR7WindowlessControl_GetColorKey (IVMRWindowlessControl *iface, COLORREF *color)
 
static HRESULT WINAPI VMR9WindowlessControl_QueryInterface (IVMRWindowlessControl9 *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9WindowlessControl_AddRef (IVMRWindowlessControl9 *iface)
 
static ULONG WINAPI VMR9WindowlessControl_Release (IVMRWindowlessControl9 *iface)
 
static HRESULT WINAPI VMR9WindowlessControl_GetNativeVideoSize (IVMRWindowlessControl9 *iface, LONG *width, LONG *height, LONG *arwidth, LONG *arheight)
 
static HRESULT WINAPI VMR9WindowlessControl_GetMinIdealVideoSize (IVMRWindowlessControl9 *iface, LONG *width, LONG *height)
 
static HRESULT WINAPI VMR9WindowlessControl_GetMaxIdealVideoSize (IVMRWindowlessControl9 *iface, LONG *width, LONG *height)
 
static HRESULT WINAPI VMR9WindowlessControl_SetVideoPosition (IVMRWindowlessControl9 *iface, const RECT *source, const RECT *dest)
 
static HRESULT WINAPI VMR9WindowlessControl_GetVideoPosition (IVMRWindowlessControl9 *iface, RECT *source, RECT *dest)
 
static HRESULT WINAPI VMR9WindowlessControl_GetAspectRatioMode (IVMRWindowlessControl9 *iface, DWORD *mode)
 
static HRESULT WINAPI VMR9WindowlessControl_SetAspectRatioMode (IVMRWindowlessControl9 *iface, DWORD mode)
 
static HRESULT WINAPI VMR9WindowlessControl_SetVideoClippingWindow (IVMRWindowlessControl9 *iface, HWND hwnd)
 
static HRESULT WINAPI VMR9WindowlessControl_RepaintVideo (IVMRWindowlessControl9 *iface, HWND hwnd, HDC hdc)
 
static HRESULT WINAPI VMR9WindowlessControl_DisplayModeChanged (IVMRWindowlessControl9 *iface)
 
static HRESULT WINAPI VMR9WindowlessControl_GetCurrentImage (IVMRWindowlessControl9 *iface, BYTE **dib)
 
static HRESULT WINAPI VMR9WindowlessControl_SetBorderColor (IVMRWindowlessControl9 *iface, COLORREF color)
 
static HRESULT WINAPI VMR9WindowlessControl_GetBorderColor (IVMRWindowlessControl9 *iface, COLORREF *color)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_QueryInterface (IVMRSurfaceAllocatorNotify *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR7SurfaceAllocatorNotify_AddRef (IVMRSurfaceAllocatorNotify *iface)
 
static ULONG WINAPI VMR7SurfaceAllocatorNotify_Release (IVMRSurfaceAllocatorNotify *iface)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_AdviseSurfaceAllocator (IVMRSurfaceAllocatorNotify *iface, DWORD_PTR id, IVMRSurfaceAllocator *alloc)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_SetDDrawDevice (IVMRSurfaceAllocatorNotify *iface, IDirectDraw7 *device, HMONITOR monitor)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_ChangeDDrawDevice (IVMRSurfaceAllocatorNotify *iface, IDirectDraw7 *device, HMONITOR monitor)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_RestoreDDrawSurfaces (IVMRSurfaceAllocatorNotify *iface)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_NotifyEvent (IVMRSurfaceAllocatorNotify *iface, LONG code, LONG_PTR param1, LONG_PTR param2)
 
static HRESULT WINAPI VMR7SurfaceAllocatorNotify_SetBorderColor (IVMRSurfaceAllocatorNotify *iface, COLORREF clrBorder)
 
static HRESULT WINAPI VMR9SurfaceAllocatorNotify_QueryInterface (IVMRSurfaceAllocatorNotify9 *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9SurfaceAllocatorNotify_AddRef (IVMRSurfaceAllocatorNotify9 *iface)
 
static ULONG WINAPI VMR9SurfaceAllocatorNotify_Release (IVMRSurfaceAllocatorNotify9 *iface)
 
static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator (IVMRSurfaceAllocatorNotify9 *iface, DWORD_PTR id, IVMRSurfaceAllocator9 *alloc)
 
static HRESULT WINAPI VMR9SurfaceAllocatorNotify_SetD3DDevice (IVMRSurfaceAllocatorNotify9 *iface, IDirect3DDevice9 *device, HMONITOR monitor)
 
static HRESULT WINAPI VMR9SurfaceAllocatorNotify_ChangeD3DDevice (IVMRSurfaceAllocatorNotify9 *iface, IDirect3DDevice9 *device, HMONITOR monitor)
 
static HRESULT WINAPI VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper (IVMRSurfaceAllocatorNotify9 *iface, VMR9AllocationInfo *allocinfo, DWORD *numbuffers, IDirect3DSurface9 **surface)
 
static HRESULT WINAPI VMR9SurfaceAllocatorNotify_NotifyEvent (IVMRSurfaceAllocatorNotify9 *iface, LONG code, LONG_PTR param1, LONG_PTR param2)
 
static HRESULT vmr_create (IUnknown *outer_unk, LPVOID *ppv, const CLSID *clsid)
 
HRESULT VMR7Impl_create (IUnknown *outer_unk, LPVOID *ppv)
 
HRESULT VMR9Impl_create (IUnknown *outer_unk, LPVOID *ppv)
 
static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface (IVMRImagePresenter9 *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9_ImagePresenter_AddRef (IVMRImagePresenter9 *iface)
 
static ULONG WINAPI VMR9_ImagePresenter_Release (IVMRImagePresenter9 *iface)
 
static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting (IVMRImagePresenter9 *iface, DWORD_PTR id)
 
static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting (IVMRImagePresenter9 *iface, DWORD_PTR id)
 
static HRESULT VMR9_ImagePresenter_PresentTexture (VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface)
 
static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface (VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface)
 
static HRESULT WINAPI VMR9_ImagePresenter_PresentImage (IVMRImagePresenter9 *iface, DWORD_PTR id, VMR9PresentationInfo *info)
 
static HRESULT WINAPI VMR9_SurfaceAllocator_QueryInterface (IVMRSurfaceAllocatorEx9 *iface, REFIID riid, LPVOID *ppv)
 
static ULONG WINAPI VMR9_SurfaceAllocator_AddRef (IVMRSurfaceAllocatorEx9 *iface)
 
static ULONG WINAPI VMR9_SurfaceAllocator_Release (IVMRSurfaceAllocatorEx9 *iface)
 
static HRESULT VMR9_SurfaceAllocator_SetAllocationSettings (VMR9DefaultAllocatorPresenterImpl *This, VMR9AllocationInfo *allocinfo)
 
static DWORD WINAPI MessageLoop (LPVOID lpParameter)
 
static UINT d3d9_adapter_from_hwnd (IDirect3D9 *d3d9, HWND hwnd, HMONITOR *mon_out)
 
static BOOL CreateRenderingWindow (VMR9DefaultAllocatorPresenterImpl *This, VMR9AllocationInfo *info, DWORD *numbuffers)
 
static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice (IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id, VMR9AllocationInfo *allocinfo, DWORD *numbuffers)
 
static HRESULT WINAPI VMR9_SurfaceAllocator_TerminateDevice (IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id)
 
static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset (VMR9DefaultAllocatorPresenterImpl *This)
 
static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface (IVMRSurfaceAllocatorEx9 *iface, DWORD_PTR id, DWORD surfaceindex, DWORD flags, IDirect3DSurface9 **surface)
 
static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify (IVMRSurfaceAllocatorEx9 *iface, IVMRSurfaceAllocatorNotify9 *allocnotify)
 
static IDirect3D9 * init_d3d9 (HMODULE d3d9_handle)
 

Variables

static const BaseRendererFuncTable BaseFuncTable
 
static const BaseWindowFuncTable renderer_BaseWindowFuncTable
 
static const BaseControlVideoFuncTable renderer_BaseControlVideoFuncTable
 
static const IUnknownVtbl IInner_VTable
 
static const IBaseFilterVtbl VMR_Vtbl
 
static const IVideoWindowVtbl IVideoWindow_VTable
 
static const IBasicVideoVtbl IBasicVideo_VTable
 
static const IAMCertifiedOutputProtectionVtbl IAMCertifiedOutputProtection_Vtbl
 
static const IAMFilterMiscFlagsVtbl IAMFilterMiscFlags_Vtbl
 
static const IVMRFilterConfigVtbl VMR7_FilterConfig_Vtbl
 
static const IVMRMonitorConfigVtbl VMR7_MonitorConfig_Vtbl
 
static const IVMRMonitorConfig9Vtbl VMR9_MonitorConfig_Vtbl
 
static const IVMRFilterConfig9Vtbl VMR9_FilterConfig_Vtbl
 
static const IVMRWindowlessControlVtbl VMR7_WindowlessControl_Vtbl
 
static const IVMRWindowlessControl9Vtbl VMR9_WindowlessControl_Vtbl
 
static const IVMRSurfaceAllocatorNotifyVtbl VMR7_SurfaceAllocatorNotify_Vtbl
 
static const IVMRSurfaceAllocatorNotify9Vtbl VMR9_SurfaceAllocatorNotify_Vtbl
 
static const IVMRImagePresenter9Vtbl VMR9_ImagePresenter
 
static const IVMRSurfaceAllocatorEx9Vtbl VMR9_SurfaceAllocator
 

Macro Definition Documentation

◆ USED_FVF

#define USED_FVF   (D3DFVF_XYZRHW | D3DFVF_TEX1)

Definition at line 2545 of file vmr9.c.

Function Documentation

◆ AMCertifiedOutputProtection_AddRef()

static ULONG WINAPI AMCertifiedOutputProtection_AddRef ( IAMCertifiedOutputProtection iface)
static

Definition at line 1100 of file vmr9.c.

1101 {
1103  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
1104 }
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893

◆ AMCertifiedOutputProtection_KeyExchange()

static HRESULT WINAPI AMCertifiedOutputProtection_KeyExchange ( IAMCertifiedOutputProtection iface,
GUID pRandom,
BYTE **  VarLenCertGH,
DWORD pdwLengthCertGH 
)
static

Definition at line 1112 of file vmr9.c.

1115 {
1117 
1118  FIXME("(%p/%p)->(%p, %p, %p) stub\n", iface, This, pRandom, VarLenCertGH, pdwLengthCertGH);
1119  return VFW_E_NO_COPP_HW;
1120 }
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122
#define FIXME(fmt,...)
Definition: debug.h:110
#define VFW_E_NO_COPP_HW
Definition: vfwmsgs.h:160

◆ AMCertifiedOutputProtection_ProtectionCommand()

static HRESULT WINAPI AMCertifiedOutputProtection_ProtectionCommand ( IAMCertifiedOutputProtection iface,
const AMCOPPCommand cmd 
)
static

Definition at line 1131 of file vmr9.c.

1133 {
1135 
1136  FIXME("(%p/%p)->(%p) stub\n", iface, This, cmd);
1137  return VFW_E_NO_COPP_HW;
1138 }
Definition: ftp_var.h:139
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122
#define FIXME(fmt,...)
Definition: debug.h:110
#define VFW_E_NO_COPP_HW
Definition: vfwmsgs.h:160

◆ AMCertifiedOutputProtection_ProtectionStatus()

static HRESULT WINAPI AMCertifiedOutputProtection_ProtectionStatus ( IAMCertifiedOutputProtection iface,
const AMCOPPStatusInput pStatusInput,
AMCOPPStatusOutput pStatusOutput 
)
static

Definition at line 1140 of file vmr9.c.

1143 {
1145 
1146  FIXME("(%p/%p)->(%p, %p) stub\n", iface, This, pStatusInput, pStatusOutput);
1147  return VFW_E_NO_COPP_HW;
1148 }
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122
#define FIXME(fmt,...)
Definition: debug.h:110
#define VFW_E_NO_COPP_HW
Definition: vfwmsgs.h:160

◆ AMCertifiedOutputProtection_QueryInterface()

static HRESULT WINAPI AMCertifiedOutputProtection_QueryInterface ( IAMCertifiedOutputProtection iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1093 of file vmr9.c.

1095 {
1097  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
1098 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863

◆ AMCertifiedOutputProtection_Release()

static ULONG WINAPI AMCertifiedOutputProtection_Release ( IAMCertifiedOutputProtection iface)
static

Definition at line 1106 of file vmr9.c.

1107 {
1109  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
1110 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122

◆ AMCertifiedOutputProtection_SessionSequenceStart()

static HRESULT WINAPI AMCertifiedOutputProtection_SessionSequenceStart ( IAMCertifiedOutputProtection iface,
AMCOPPSignature pSig 
)
static

Definition at line 1122 of file vmr9.c.

1124 {
1126 
1127  FIXME("(%p/%p)->(%p) stub\n", iface, This, pSig);
1128  return VFW_E_NO_COPP_HW;
1129 }
static struct quartz_vmr * impl_from_IAMCertifiedOutputProtection(IAMCertifiedOutputProtection *iface)
Definition: vmr9.c:122
#define FIXME(fmt,...)
Definition: debug.h:110
#define VFW_E_NO_COPP_HW
Definition: vfwmsgs.h:160

◆ AMFilterMiscFlags_AddRef()

static ULONG WINAPI AMFilterMiscFlags_AddRef ( IAMFilterMiscFlags iface)
static

Definition at line 1166 of file vmr9.c.

1166  {
1167  struct quartz_vmr *This = impl_from_IAMFilterMiscFlags(iface);
1168  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
1169 }
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893
static struct quartz_vmr * impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
Definition: vmr9.c:127

◆ AMFilterMiscFlags_GetMiscFlags()

static ULONG WINAPI AMFilterMiscFlags_GetMiscFlags ( IAMFilterMiscFlags iface)
static

Definition at line 1176 of file vmr9.c.

◆ AMFilterMiscFlags_QueryInterface()

static HRESULT WINAPI AMFilterMiscFlags_QueryInterface ( IAMFilterMiscFlags iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1161 of file vmr9.c.

1161  {
1162  struct quartz_vmr *This = impl_from_IAMFilterMiscFlags(iface);
1163  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
1164 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863
static struct quartz_vmr * impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
Definition: vmr9.c:127

◆ AMFilterMiscFlags_Release()

static ULONG WINAPI AMFilterMiscFlags_Release ( IAMFilterMiscFlags iface)
static

Definition at line 1171 of file vmr9.c.

1171  {
1172  struct quartz_vmr *This = impl_from_IAMFilterMiscFlags(iface);
1173  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
1174 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
static struct quartz_vmr * impl_from_IAMFilterMiscFlags(IAMFilterMiscFlags *iface)
Definition: vmr9.c:127

◆ Basicvideo_AddRef()

static ULONG WINAPI Basicvideo_AddRef ( IBasicVideo *  iface)
static

Definition at line 1032 of file vmr9.c.

1033 {
1034  struct quartz_vmr *This = impl_from_IBasicVideo(iface);
1035 
1036  TRACE("(%p/%p)->()\n", This, iface);
1037 
1038  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
1039 }
static struct quartz_vmr * impl_from_IBasicVideo(IBasicVideo *iface)
Definition: vmr9.c:117
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893

◆ Basicvideo_QueryInterface()

static HRESULT WINAPI Basicvideo_QueryInterface ( IBasicVideo *  iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 1023 of file vmr9.c.

1024 {
1025  struct quartz_vmr *This = impl_from_IBasicVideo(iface);
1026 
1027  TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
1028 
1029  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj);
1030 }
REFIID riid
Definition: precomp.h:44
static struct quartz_vmr * impl_from_IBasicVideo(IBasicVideo *iface)
Definition: vmr9.c:117
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863

◆ Basicvideo_Release()

static ULONG WINAPI Basicvideo_Release ( IBasicVideo *  iface)
static

Definition at line 1041 of file vmr9.c.

1042 {
1043  struct quartz_vmr *This = impl_from_IBasicVideo(iface);
1044 
1045  TRACE("(%p/%p)->()\n", This, iface);
1046 
1047  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
1048 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
static struct quartz_vmr * impl_from_IBasicVideo(IBasicVideo *iface)
Definition: vmr9.c:117
#define TRACE(s)
Definition: solgame.cpp:4

◆ CreateRenderingWindow()

static BOOL CreateRenderingWindow ( VMR9DefaultAllocatorPresenterImpl This,
VMR9AllocationInfo info,
DWORD numbuffers 
)
static

Definition at line 2790 of file vmr9.c.

2791 {
2792  D3DPRESENT_PARAMETERS d3dpp;
2793  DWORD d3d9_adapter;
2794  HRESULT hr;
2795 
2796  TRACE("(%p)->()\n", This);
2797 
2798  This->hWndThread = CreateThread(NULL, 0, MessageLoop, This, 0, &This->tid);
2799  if (!This->hWndThread)
2800  return FALSE;
2801 
2803 
2804  if (!This->pVMR9->baseControlWindow.baseWindow.hWnd) return FALSE;
2805 
2806  /* Obtain a monitor and d3d9 device */
2807  d3d9_adapter = d3d9_adapter_from_hwnd(This->d3d9_ptr, This->pVMR9->baseControlWindow.baseWindow.hWnd, &This->hMon);
2808 
2809  /* Now try to create the d3d9 device */
2810  ZeroMemory(&d3dpp, sizeof(d3dpp));
2811  d3dpp.Windowed = TRUE;
2812  d3dpp.hDeviceWindow = This->pVMR9->baseControlWindow.baseWindow.hWnd;
2814  d3dpp.BackBufferHeight = This->pVMR9->target_rect.bottom - This->pVMR9->target_rect.top;
2815  d3dpp.BackBufferWidth = This->pVMR9->target_rect.right - This->pVMR9->target_rect.left;
2816 
2817  hr = IDirect3D9_CreateDevice(This->d3d9_ptr, d3d9_adapter, D3DDEVTYPE_HAL, NULL, D3DCREATE_MIXED_VERTEXPROCESSING, &d3dpp, &This->d3d9_dev);
2818  if (FAILED(hr))
2819  {
2820  ERR("Could not create device: %08x\n", hr);
2821  BaseWindowImpl_DoneWithWindow(&This->pVMR9->baseControlWindow.baseWindow);
2822  return FALSE;
2823  }
2824  IVMRSurfaceAllocatorNotify9_SetD3DDevice(This->SurfaceAllocatorNotify, This->d3d9_dev, This->hMon);
2825 
2826  This->d3d9_surfaces = CoTaskMemAlloc(*numbuffers * sizeof(IDirect3DSurface9 *));
2827  ZeroMemory(This->d3d9_surfaces, *numbuffers * sizeof(IDirect3DSurface9 *));
2828 
2830  if (FAILED(hr))
2831  ERR("Setting allocation settings failed: %08x\n", hr);
2832 
2833  if (SUCCEEDED(hr))
2834  {
2835  hr = IVMRSurfaceAllocatorNotify9_AllocateSurfaceHelper(This->SurfaceAllocatorNotify, info, numbuffers, This->d3d9_surfaces);
2836  if (FAILED(hr))
2837  ERR("Allocating surfaces failed: %08x\n", hr);
2838  }
2839 
2840  if (FAILED(hr))
2841  {
2842  IVMRSurfaceAllocatorEx9_TerminateDevice(This->pVMR9->allocator, This->pVMR9->cookie);
2843  BaseWindowImpl_DoneWithWindow(&This->pVMR9->baseControlWindow.baseWindow);
2844  return FALSE;
2845  }
2846 
2847  This->num_surfaces = *numbuffers;
2848 
2849  return TRUE;
2850 }
#define IDirect3D9_CreateDevice(p, a, b, c, d, e, f)
Definition: d3d9.h:235
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
#define ZeroMemory
Definition: winbase.h:1635
static DWORD WINAPI MessageLoop(LPVOID lpParameter)
Definition: vmr9.c:2741
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
Definition: window.c:143
static HRESULT VMR9_SurfaceAllocator_SetAllocationSettings(VMR9DefaultAllocatorPresenterImpl *This, VMR9AllocationInfo *allocinfo)
Definition: vmr9.c:2688
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:136
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
static UINT d3d9_adapter_from_hwnd(IDirect3D9 *d3d9, HWND hwnd, HMONITOR *mon_out)
Definition: vmr9.c:2767
#define ERR(fmt,...)
Definition: debug.h:109
#define D3DCREATE_MIXED_VERTEXPROCESSING
Definition: d3d8.h:46
#define INFINITE
Definition: serial.h:102
LPVOID WINAPI CoTaskMemAlloc(SIZE_T size)
Definition: ifs.c:406
#define SUCCEEDED(hr)
Definition: intsafe.h:57
D3DSWAPEFFECT SwapEffect
Definition: d3d8types.h:1128

Referenced by VMR9_SurfaceAllocator_InitializeDevice().

◆ d3d9_adapter_from_hwnd()

static UINT d3d9_adapter_from_hwnd ( IDirect3D9 *  d3d9,
HWND  hwnd,
HMONITOR mon_out 
)
static

Definition at line 2767 of file vmr9.c.

2768 {
2769  UINT d3d9_adapter;
2770  HMONITOR mon;
2771 
2772  mon = MonitorFromWindow(hwnd, MONITOR_DEFAULTTONULL);
2773  if (!mon)
2774  d3d9_adapter = 0;
2775  else
2776  {
2777  for (d3d9_adapter = 0; d3d9_adapter < IDirect3D9_GetAdapterCount(d3d9); ++d3d9_adapter)
2778  {
2779  if (mon == IDirect3D9_GetAdapterMonitor(d3d9, d3d9_adapter))
2780  break;
2781  }
2782  if (d3d9_adapter >= IDirect3D9_GetAdapterCount(d3d9))
2783  d3d9_adapter = 0;
2784  }
2785  if (mon_out)
2786  *mon_out = mon;
2787  return d3d9_adapter;
2788 }
#define IDirect3D9_GetAdapterMonitor(p, a)
Definition: d3d9.h:234
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define IDirect3D9_GetAdapterCount(p)
Definition: d3d9.h:223
HMONITOR WINAPI MonitorFromWindow(HWND, DWORD)
unsigned int UINT
Definition: ndis.h:50

Referenced by CreateRenderingWindow(), and VMR9_SurfaceAllocator_UpdateDeviceReset().

◆ get_available_monitors_proc()

static BOOL CALLBACK get_available_monitors_proc ( HMONITOR  hmon,
HDC  hdc,
LPRECT  lprc,
LPARAM  lparam 
)
static

Definition at line 1292 of file vmr9.c.

1293 {
1296 
1297  if (args->info7 || args->info9)
1298  {
1299 
1300  if (!args->arraysize)
1301  return FALSE;
1302 
1303  mi.cbSize = sizeof(mi);
1304  if (!GetMonitorInfoW(hmon, (MONITORINFO*)&mi))
1305  return TRUE;
1306 
1307  /* fill VMRMONITORINFO struct */
1308  if (args->info7)
1309  {
1310  VMRMONITORINFO *info = args->info7++;
1311  memset(info, 0, sizeof(*info));
1312 
1313  if (args->numdev > 0)
1314  {
1315  info->guid.pGUID = &info->guid.GUID;
1316  info->guid.GUID.Data4[7] = args->numdev;
1317  }
1318  else
1319  info->guid.pGUID = NULL;
1320 
1321  info->rcMonitor = mi.rcMonitor;
1322  info->hMon = hmon;
1323  info->dwFlags = mi.dwFlags;
1324 
1325  lstrcpynW(info->szDevice, mi.szDevice, sizeof(info->szDevice)/sizeof(WCHAR));
1326 
1327  /* FIXME: how to get these values? */
1328  info->szDescription[0] = 0;
1329  }
1330 
1331  /* fill VMR9MonitorInfo struct */
1332  if (args->info9)
1333  {
1334  VMR9MonitorInfo *info = args->info9++;
1335  memset(info, 0, sizeof(*info));
1336 
1337  info->uDevID = 0; /* FIXME */
1338  info->rcMonitor = mi.rcMonitor;
1339  info->hMon = hmon;
1340  info->dwFlags = mi.dwFlags;
1341 
1342  lstrcpynW(info->szDevice, mi.szDevice, sizeof(info->szDevice)/sizeof(WCHAR));
1343 
1344  /* FIXME: how to get these values? */
1345  info->szDescription[0] = 0;
1346  info->dwVendorId = 0;
1347  info->dwDeviceId = 0;
1348  info->dwSubSysId = 0;
1349  info->dwRevision = 0;
1350  }
1351 
1352  args->arraysize--;
1353  }
1354 
1355  args->numdev++;
1356  return TRUE;
1357 }
#define TRUE
Definition: types.h:120
static MONITORINFO mi
Definition: win.c:7331
RECT rcMonitor
Definition: winuser.h:3759
Definition: match.c:390
#define lstrcpynW
Definition: compat.h:397
static UINT WPARAM LPARAM lparam
Definition: combo.c:716
smooth NULL
Definition: ftsmooth.c:416
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI GetMonitorInfoW(_In_ HMONITOR, _Inout_ LPMONITORINFO)
DWORD cbSize
Definition: winuser.h:3758
DWORD dwFlags
Definition: winuser.h:3761
#define memset(x, y, z)
Definition: compat.h:39

Referenced by VMR7MonitorConfig_GetAvailableMonitors(), and VMR9MonitorConfig_GetAvailableMonitors().

◆ impl_from_BaseControlVideo()

static struct quartz_vmr* impl_from_BaseControlVideo ( BaseControlVideo *  cvid)
inlinestatic

Definition at line 112 of file vmr9.c.

113 {
114  return CONTAINING_RECORD(cvid, struct quartz_vmr, baseControlVideo);
115 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9_GetSourceRect(), VMR9_GetStaticImage(), VMR9_GetTargetRect(), VMR9_GetVideoFormat(), VMR9_IsDefaultSourceRect(), VMR9_IsDefaultTargetRect(), VMR9_SetDefaultSourceRect(), VMR9_SetDefaultTargetRect(), VMR9_SetSourceRect(), and VMR9_SetTargetRect().

◆ impl_from_BaseWindow()

static struct quartz_vmr* impl_from_BaseWindow ( BaseWindow wnd)
inlinestatic

Definition at line 102 of file vmr9.c.

103 {
104  return CONTAINING_RECORD(wnd, struct quartz_vmr, baseControlWindow.baseWindow);
105 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9_GetDefaultRect(), and VMR9_OnSize().

◆ impl_from_IAMCertifiedOutputProtection()

static struct quartz_vmr* impl_from_IAMCertifiedOutputProtection ( IAMCertifiedOutputProtection iface)
inlinestatic

Definition at line 122 of file vmr9.c.

123 {
124  return CONTAINING_RECORD(iface, struct quartz_vmr, IAMCertifiedOutputProtection_iface);
125 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AMCertifiedOutputProtection_AddRef(), AMCertifiedOutputProtection_KeyExchange(), AMCertifiedOutputProtection_ProtectionCommand(), AMCertifiedOutputProtection_ProtectionStatus(), AMCertifiedOutputProtection_QueryInterface(), AMCertifiedOutputProtection_Release(), and AMCertifiedOutputProtection_SessionSequenceStart().

◆ impl_from_IAMFilterMiscFlags()

static struct quartz_vmr* impl_from_IAMFilterMiscFlags ( IAMFilterMiscFlags iface)
inlinestatic

Definition at line 127 of file vmr9.c.

128 {
129  return CONTAINING_RECORD(iface, struct quartz_vmr, IAMFilterMiscFlags_iface);
130 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by AMFilterMiscFlags_AddRef(), AMFilterMiscFlags_QueryInterface(), and AMFilterMiscFlags_Release().

◆ impl_from_IBasicVideo()

static struct quartz_vmr* impl_from_IBasicVideo ( IBasicVideo *  iface)
inlinestatic

Definition at line 117 of file vmr9.c.

118 {
119  return CONTAINING_RECORD(iface, struct quartz_vmr, baseControlVideo.IBasicVideo_iface);
120 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by Basicvideo_AddRef(), Basicvideo_QueryInterface(), and Basicvideo_Release().

◆ impl_from_inner_IUnknown()

static struct quartz_vmr* impl_from_inner_IUnknown ( IUnknown iface)
inlinestatic

Definition at line 97 of file vmr9.c.

98 {
99  return CONTAINING_RECORD(iface, struct quartz_vmr, IUnknown_inner);
100 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9Inner_AddRef(), VMR9Inner_QueryInterface(), and VMR9Inner_Release().

◆ impl_from_IVideoWindow()

static struct quartz_vmr* impl_from_IVideoWindow ( IVideoWindow *  iface)
inlinestatic

Definition at line 107 of file vmr9.c.

108 {
109  return CONTAINING_RECORD(iface, struct quartz_vmr, baseControlWindow.IVideoWindow_iface);
110 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by Videowindow_AddRef(), Videowindow_QueryInterface(), and Videowindow_Release().

◆ impl_from_IVMRFilterConfig()

static struct quartz_vmr* impl_from_IVMRFilterConfig ( IVMRFilterConfig iface)
inlinestatic

Definition at line 132 of file vmr9.c.

133 {
134  return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRFilterConfig_iface);
135 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR7FilterConfig_AddRef(), VMR7FilterConfig_GetNumberOfStreams(), VMR7FilterConfig_GetRenderingMode(), VMR7FilterConfig_GetRenderingPrefs(), VMR7FilterConfig_QueryInterface(), VMR7FilterConfig_Release(), VMR7FilterConfig_SetImageCompositor(), VMR7FilterConfig_SetNumberOfStreams(), VMR7FilterConfig_SetRenderingMode(), and VMR7FilterConfig_SetRenderingPrefs().

◆ impl_from_IVMRFilterConfig9()

static struct quartz_vmr* impl_from_IVMRFilterConfig9 ( IVMRFilterConfig9 iface)
inlinestatic

Definition at line 137 of file vmr9.c.

138 {
139  return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRFilterConfig9_iface);
140 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9FilterConfig_AddRef(), VMR9FilterConfig_GetNumberOfStreams(), VMR9FilterConfig_GetRenderingMode(), VMR9FilterConfig_GetRenderingPrefs(), VMR9FilterConfig_QueryInterface(), VMR9FilterConfig_Release(), VMR9FilterConfig_SetImageCompositor(), VMR9FilterConfig_SetNumberOfStreams(), VMR9FilterConfig_SetRenderingMode(), and VMR9FilterConfig_SetRenderingPrefs().

◆ impl_from_IVMRImagePresenter9()

static VMR9DefaultAllocatorPresenterImpl* impl_from_IVMRImagePresenter9 ( IVMRImagePresenter9 iface)
inlinestatic

Definition at line 197 of file vmr9.c.

198 {
199  return CONTAINING_RECORD(iface, VMR9DefaultAllocatorPresenterImpl, IVMRImagePresenter9_iface);
200 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9_ImagePresenter_AddRef(), VMR9_ImagePresenter_PresentImage(), VMR9_ImagePresenter_QueryInterface(), VMR9_ImagePresenter_Release(), VMR9_ImagePresenter_StartPresenting(), and VMR9_ImagePresenter_StopPresenting().

◆ impl_from_IVMRMonitorConfig()

static struct quartz_vmr* impl_from_IVMRMonitorConfig ( IVMRMonitorConfig iface)
inlinestatic

Definition at line 142 of file vmr9.c.

143 {
144  return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRMonitorConfig_iface);
145 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR7MonitorConfig_AddRef(), VMR7MonitorConfig_GetAvailableMonitors(), VMR7MonitorConfig_GetDefaultMonitor(), VMR7MonitorConfig_GetMonitor(), VMR7MonitorConfig_QueryInterface(), VMR7MonitorConfig_Release(), VMR7MonitorConfig_SetDefaultMonitor(), and VMR7MonitorConfig_SetMonitor().

◆ impl_from_IVMRMonitorConfig9()

static struct quartz_vmr* impl_from_IVMRMonitorConfig9 ( IVMRMonitorConfig9 iface)
inlinestatic

Definition at line 147 of file vmr9.c.

148 {
149  return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRMonitorConfig9_iface);
150 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9MonitorConfig_AddRef(), VMR9MonitorConfig_GetAvailableMonitors(), VMR9MonitorConfig_GetDefaultMonitor(), VMR9MonitorConfig_GetMonitor(), VMR9MonitorConfig_QueryInterface(), VMR9MonitorConfig_Release(), VMR9MonitorConfig_SetDefaultMonitor(), and VMR9MonitorConfig_SetMonitor().

◆ impl_from_IVMRSurfaceAllocatorEx9()

static VMR9DefaultAllocatorPresenterImpl* impl_from_IVMRSurfaceAllocatorEx9 ( IVMRSurfaceAllocatorEx9 iface)
inlinestatic

Definition at line 202 of file vmr9.c.

203 {
204  return CONTAINING_RECORD(iface, VMR9DefaultAllocatorPresenterImpl, IVMRSurfaceAllocatorEx9_iface);
205 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9_SurfaceAllocator_AddRef(), VMR9_SurfaceAllocator_AdviseNotify(), VMR9_SurfaceAllocator_GetSurface(), VMR9_SurfaceAllocator_InitializeDevice(), VMR9_SurfaceAllocator_QueryInterface(), VMR9_SurfaceAllocator_Release(), and VMR9_SurfaceAllocator_TerminateDevice().

◆ impl_from_IVMRSurfaceAllocatorNotify()

static struct quartz_vmr* impl_from_IVMRSurfaceAllocatorNotify ( IVMRSurfaceAllocatorNotify iface)
inlinestatic

Definition at line 152 of file vmr9.c.

153 {
154  return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRSurfaceAllocatorNotify_iface);
155 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR7SurfaceAllocatorNotify_AddRef(), VMR7SurfaceAllocatorNotify_AdviseSurfaceAllocator(), VMR7SurfaceAllocatorNotify_ChangeDDrawDevice(), VMR7SurfaceAllocatorNotify_NotifyEvent(), VMR7SurfaceAllocatorNotify_QueryInterface(), VMR7SurfaceAllocatorNotify_Release(), VMR7SurfaceAllocatorNotify_RestoreDDrawSurfaces(), VMR7SurfaceAllocatorNotify_SetBorderColor(), and VMR7SurfaceAllocatorNotify_SetDDrawDevice().

◆ impl_from_IVMRSurfaceAllocatorNotify9()

static struct quartz_vmr* impl_from_IVMRSurfaceAllocatorNotify9 ( IVMRSurfaceAllocatorNotify9 iface)
inlinestatic

Definition at line 157 of file vmr9.c.

158 {
159  return CONTAINING_RECORD(iface, struct quartz_vmr, IVMRSurfaceAllocatorNotify9_iface);
160 }
PFLT_MESSAGE_WAITER_QUEUE CONTAINING_RECORD(Csq, DEVICE_EXTENSION, IrpQueue)) -> WaiterQ.mLock) _IRQL_raises_(DISPATCH_LEVEL) VOID NTAPI FltpAcquireMessageWaiterLock(_In_ PIO_CSQ Csq, _Out_ PKIRQL Irql)
Definition: Messaging.c:560

Referenced by VMR9SurfaceAllocatorNotify_AddRef(), VMR9SurfaceAllocatorNotify_AdviseSurfaceAllocator(), VMR9SurfaceAllocatorNotify_AllocateSurfaceHelper(), VMR9SurfaceAllocatorNotify_ChangeD3DDevice(), VMR9SurfaceAllocatorNotify_NotifyEvent(), VMR9SurfaceAllocatorNotify_QueryInterface(), VMR9SurfaceAllocatorNotify_Release(), and VMR9SurfaceAllocatorNotify_SetD3DDevice().

◆ impl_from_IVMRWindowlessControl()

◆ impl_from_IVMRWindowlessControl9()

◆ init_d3d9()

static IDirect3D9* init_d3d9 ( HMODULE  d3d9_handle)
static

Definition at line 3048 of file vmr9.c.

3049 {
3050  IDirect3D9 * (__stdcall * d3d9_create)(UINT SDKVersion);
3051 
3052  d3d9_create = (void *)GetProcAddress(d3d9_handle, "Direct3DCreate9");
3053  if (!d3d9_create) return NULL;
3054 
3055  return d3d9_create(D3D_SDK_VERSION);
3056 }
smooth NULL
Definition: ftsmooth.c:416
#define D3D_SDK_VERSION
Definition: d3d8.h:56
#define __stdcall
Definition: typedefs.h:25
unsigned int UINT
Definition: ndis.h:50
#define GetProcAddress(x, y)
Definition: compat.h:410

Referenced by VMR9DefaultAllocatorPresenterImpl_create().

◆ MessageLoop()

static DWORD WINAPI MessageLoop ( LPVOID  lpParameter)
static

Definition at line 2741 of file vmr9.c.

2742 {
2743  MSG msg;
2744  BOOL fGotMessage;
2746 
2747  TRACE("Starting message loop\n");
2748 
2749  if (FAILED(BaseWindowImpl_PrepareWindow(&This->pVMR9->baseControlWindow.baseWindow)))
2750  {
2751  FIXME("Failed to prepare window\n");
2752  return FALSE;
2753  }
2754 
2755  SetEvent(This->ack);
2756  while ((fGotMessage = GetMessageW(&msg, NULL, 0, 0)) != 0 && fGotMessage != -1)
2757  {
2760  }
2761 
2762  TRACE("End of message loop\n");
2763 
2764  return 0;
2765 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
BOOL WINAPI DECLSPEC_HOTPATCH SetEvent(IN HANDLE hEvent)
Definition: synch.c:733
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI BaseWindowImpl_PrepareWindow(BaseWindow *This)
Definition: window.c:100
LPVOID lpParameter
Definition: kernel32.h:241
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
#define msg(x)
Definition: auth_time.c:54

Referenced by CreateRenderingWindow().

◆ Videowindow_AddRef()

static ULONG WINAPI Videowindow_AddRef ( IVideoWindow *  iface)
static

Definition at line 954 of file vmr9.c.

955 {
956  struct quartz_vmr *This = impl_from_IVideoWindow(iface);
957 
958  TRACE("(%p/%p)->()\n", This, iface);
959 
960  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
961 }
#define TRACE(s)
Definition: solgame.cpp:4
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893
static struct quartz_vmr * impl_from_IVideoWindow(IVideoWindow *iface)
Definition: vmr9.c:107

◆ Videowindow_QueryInterface()

static HRESULT WINAPI Videowindow_QueryInterface ( IVideoWindow *  iface,
REFIID  riid,
LPVOID ppvObj 
)
static

Definition at line 945 of file vmr9.c.

946 {
947  struct quartz_vmr *This = impl_from_IVideoWindow(iface);
948 
949  TRACE("(%p/%p)->(%s, %p)\n", This, iface, debugstr_guid(riid), ppvObj);
950 
951  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppvObj);
952 }
REFIID riid
Definition: precomp.h:44
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863
static struct quartz_vmr * impl_from_IVideoWindow(IVideoWindow *iface)
Definition: vmr9.c:107

◆ Videowindow_Release()

static ULONG WINAPI Videowindow_Release ( IVideoWindow *  iface)
static

Definition at line 963 of file vmr9.c.

964 {
965  struct quartz_vmr *This = impl_from_IVideoWindow(iface);
966 
967  TRACE("(%p/%p)->()\n", This, iface);
968 
969  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
970 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
#define TRACE(s)
Definition: solgame.cpp:4
static struct quartz_vmr * impl_from_IVideoWindow(IVideoWindow *iface)
Definition: vmr9.c:107

◆ VMR7FilterConfig_AddRef()

static ULONG WINAPI VMR7FilterConfig_AddRef ( IVMRFilterConfig iface)
static

Definition at line 1194 of file vmr9.c.

1195 {
1196  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1197  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
1198 }
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_GetNumberOfStreams()

static HRESULT WINAPI VMR7FilterConfig_GetNumberOfStreams ( IVMRFilterConfig iface,
DWORD max 
)
static

Definition at line 1223 of file vmr9.c.

1224 {
1225  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1226 
1227  FIXME("(%p/%p)->(%p) stub\n", iface, This, max);
1228  return E_NOTIMPL;
1229 }
#define max(a, b)
Definition: svc.c:63
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_GetRenderingMode()

static HRESULT WINAPI VMR7FilterConfig_GetRenderingMode ( IVMRFilterConfig iface,
DWORD mode 
)
static

Definition at line 1255 of file vmr9.c.

1256 {
1257  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1258 
1259  TRACE("(%p/%p)->(%p)\n", iface, This, mode);
1260  if (!mode) return E_POINTER;
1261 
1262  if (This->mode)
1263  *mode = This->mode;
1264  else
1266 
1267  return S_OK;
1268 }
#define TRACE(s)
Definition: solgame.cpp:4
GLenum mode
Definition: glext.h:6217
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7FilterConfig_GetRenderingPrefs()

static HRESULT WINAPI VMR7FilterConfig_GetRenderingPrefs ( IVMRFilterConfig iface,
DWORD renderflags 
)
static

Definition at line 1239 of file vmr9.c.

1240 {
1241  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1242 
1243  FIXME("(%p/%p)->(%p) stub\n", iface, This, renderflags);
1244  return E_NOTIMPL;
1245 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_QueryInterface()

static HRESULT WINAPI VMR7FilterConfig_QueryInterface ( IVMRFilterConfig iface,
REFIID  riid,
void **  ppv 
)
static

Definition at line 1187 of file vmr9.c.

1189 {
1190  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1191  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
1192 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_Release()

static ULONG WINAPI VMR7FilterConfig_Release ( IVMRFilterConfig iface)
static

Definition at line 1200 of file vmr9.c.

1201 {
1202  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1203  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
1204 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_SetImageCompositor()

static HRESULT WINAPI VMR7FilterConfig_SetImageCompositor ( IVMRFilterConfig iface,
IVMRImageCompositor compositor 
)
static

Definition at line 1206 of file vmr9.c.

1208 {
1209  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1210 
1211  FIXME("(%p/%p)->(%p) stub\n", iface, This, compositor);
1212  return E_NOTIMPL;
1213 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_SetNumberOfStreams()

static HRESULT WINAPI VMR7FilterConfig_SetNumberOfStreams ( IVMRFilterConfig iface,
DWORD  max 
)
static

Definition at line 1215 of file vmr9.c.

1216 {
1217  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1218 
1219  FIXME("(%p/%p)->(%u) stub\n", iface, This, max);
1220  return E_NOTIMPL;
1221 }
#define max(a, b)
Definition: svc.c:63
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_SetRenderingMode()

static HRESULT WINAPI VMR7FilterConfig_SetRenderingMode ( IVMRFilterConfig iface,
DWORD  mode 
)
static

Definition at line 1247 of file vmr9.c.

1248 {
1249  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1250 
1251  FIXME("(%p/%p)->(%u) stub\n", iface, This, mode);
1252  return E_NOTIMPL;
1253 }
#define FIXME(fmt,...)
Definition: debug.h:110
GLenum mode
Definition: glext.h:6217
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7FilterConfig_SetRenderingPrefs()

static HRESULT WINAPI VMR7FilterConfig_SetRenderingPrefs ( IVMRFilterConfig iface,
DWORD  renderflags 
)
static

Definition at line 1231 of file vmr9.c.

1232 {
1233  struct quartz_vmr *This = impl_from_IVMRFilterConfig(iface);
1234 
1235  FIXME("(%p/%p)->(%u) stub\n", iface, This, renderflags);
1236  return E_NOTIMPL;
1237 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRFilterConfig(IVMRFilterConfig *iface)
Definition: vmr9.c:132

◆ VMR7Impl_create()

HRESULT VMR7Impl_create ( IUnknown outer_unk,
LPVOID ppv 
)

Definition at line 2446 of file vmr9.c.

2447 {
2448  return vmr_create(outer_unk, ppv, &CLSID_VideoMixingRenderer);
2449 }
static HRESULT vmr_create(IUnknown *outer_unk, LPVOID *ppv, const CLSID *clsid)
Definition: vmr9.c:2369
REFIID LPVOID * ppv
Definition: atlbase.h:39
IUnknown * outer_unk
Definition: vmr9.c:75

◆ VMR7MonitorConfig_AddRef()

static ULONG WINAPI VMR7MonitorConfig_AddRef ( IVMRMonitorConfig iface)
static

Definition at line 1366 of file vmr9.c.

1367 {
1368  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1369  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
1370 }
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893

◆ VMR7MonitorConfig_GetAvailableMonitors()

static HRESULT WINAPI VMR7MonitorConfig_GetAvailableMonitors ( IVMRMonitorConfig iface,
VMRMONITORINFO info,
DWORD  arraysize,
DWORD numdev 
)
static

Definition at line 1429 of file vmr9.c.

1432 {
1433  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1435 
1436  FIXME("(%p/%p)->(%p, %u, %p) semi-stub\n", iface, This, info, arraysize, numdev);
1437 
1438  if (!numdev)
1439  return E_POINTER;
1440 
1441  if (info && arraysize == 0)
1442  return E_INVALIDARG;
1443 
1444  args.info7 = info;
1445  args.info9 = NULL;
1446  args.arraysize = arraysize;
1447  args.numdev = 0;
1449 
1450  *numdev = args.numdev;
1451  return S_OK;
1452 }
BOOL WINAPI EnumDisplayMonitors(_In_opt_ HDC, _In_opt_ LPCRECT, _In_ MONITORENUMPROC, _In_ LPARAM)
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
Definition: match.c:390
struct _test_info info[]
Definition: SetCursorPos.c:19
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
static BOOL CALLBACK get_available_monitors_proc(HMONITOR hmon, HDC hdc, LPRECT lprc, LPARAM lparam)
Definition: vmr9.c:1292
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7MonitorConfig_GetDefaultMonitor()

static HRESULT WINAPI VMR7MonitorConfig_GetDefaultMonitor ( IVMRMonitorConfig iface,
VMRGUID pGUID 
)
static

Definition at line 1416 of file vmr9.c.

1417 {
1418  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1419 
1420  FIXME("(%p/%p)->(%p) stub\n", iface, This, pGUID);
1421 
1422  if (!pGUID)
1423  return E_POINTER;
1424 
1425  pGUID->pGUID = NULL; /* default DirectDraw device */
1426  return S_OK;
1427 }
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
struct _GUID * pGUID
Definition: vmrender.idl:171
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7MonitorConfig_GetMonitor()

static HRESULT WINAPI VMR7MonitorConfig_GetMonitor ( IVMRMonitorConfig iface,
VMRGUID pGUID 
)
static

Definition at line 1390 of file vmr9.c.

1391 {
1392  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1393 
1394  FIXME("(%p/%p)->(%p) stub\n", iface, This, pGUID);
1395 
1396  if (!pGUID)
1397  return E_POINTER;
1398 
1399  pGUID->pGUID = NULL; /* default DirectDraw device */
1400  return S_OK;
1401 }
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
struct _GUID * pGUID
Definition: vmrender.idl:171
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7MonitorConfig_QueryInterface()

static HRESULT WINAPI VMR7MonitorConfig_QueryInterface ( IVMRMonitorConfig iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 1359 of file vmr9.c.

1361 {
1362  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1363  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
1364 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863

◆ VMR7MonitorConfig_Release()

static ULONG WINAPI VMR7MonitorConfig_Release ( IVMRMonitorConfig iface)
static

Definition at line 1372 of file vmr9.c.

1373 {
1374  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1375  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
1376 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142

◆ VMR7MonitorConfig_SetDefaultMonitor()

static HRESULT WINAPI VMR7MonitorConfig_SetDefaultMonitor ( IVMRMonitorConfig iface,
const VMRGUID pGUID 
)
static

Definition at line 1403 of file vmr9.c.

1405 {
1406  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1407 
1408  FIXME("(%p/%p)->(%p) stub\n", iface, This, pGUID);
1409 
1410  if (!pGUID)
1411  return E_POINTER;
1412 
1413  return S_OK;
1414 }
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7MonitorConfig_SetMonitor()

static HRESULT WINAPI VMR7MonitorConfig_SetMonitor ( IVMRMonitorConfig iface,
const VMRGUID pGUID 
)
static

Definition at line 1378 of file vmr9.c.

1379 {
1380  struct quartz_vmr *This = impl_from_IVMRMonitorConfig(iface);
1381 
1382  FIXME("(%p/%p)->(%p) stub\n", iface, This, pGUID);
1383 
1384  if (!pGUID)
1385  return E_POINTER;
1386 
1387  return S_OK;
1388 }
static struct quartz_vmr * impl_from_IVMRMonitorConfig(IVMRMonitorConfig *iface)
Definition: vmr9.c:142
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7SurfaceAllocatorNotify_AddRef()

static ULONG WINAPI VMR7SurfaceAllocatorNotify_AddRef ( IVMRSurfaceAllocatorNotify iface)
static

Definition at line 2130 of file vmr9.c.

2131 {
2133  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
2134 }
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_AdviseSurfaceAllocator()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_AdviseSurfaceAllocator ( IVMRSurfaceAllocatorNotify iface,
DWORD_PTR  id,
IVMRSurfaceAllocator alloc 
)
static

Definition at line 2142 of file vmr9.c.

2145 {
2147 
2148  FIXME("(%p/%p)->(...) stub\n", iface, This);
2149  return E_NOTIMPL;
2150 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_ChangeDDrawDevice()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_ChangeDDrawDevice ( IVMRSurfaceAllocatorNotify iface,
IDirectDraw7 device,
HMONITOR  monitor 
)
static

Definition at line 2161 of file vmr9.c.

2163 {
2165 
2166  FIXME("(%p/%p)->(...) stub\n", iface, This);
2167  return E_NOTIMPL;
2168 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_NotifyEvent()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_NotifyEvent ( IVMRSurfaceAllocatorNotify iface,
LONG  code,
LONG_PTR  param1,
LONG_PTR  param2 
)
static

Definition at line 2178 of file vmr9.c.

2180 {
2182 
2183  FIXME("(%p/%p)->(...) stub\n", iface, This);
2184  return E_NOTIMPL;
2185 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_QueryInterface()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_QueryInterface ( IVMRSurfaceAllocatorNotify iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 2123 of file vmr9.c.

2125 {
2127  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
2128 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_Release()

static ULONG WINAPI VMR7SurfaceAllocatorNotify_Release ( IVMRSurfaceAllocatorNotify iface)
static

Definition at line 2136 of file vmr9.c.

2137 {
2139  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
2140 }
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_RestoreDDrawSurfaces()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_RestoreDDrawSurfaces ( IVMRSurfaceAllocatorNotify iface)
static

Definition at line 2170 of file vmr9.c.

2171 {
2173 
2174  FIXME("(%p/%p)->(...) stub\n", iface, This);
2175  return E_NOTIMPL;
2176 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_SetBorderColor()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_SetBorderColor ( IVMRSurfaceAllocatorNotify iface,
COLORREF  clrBorder 
)
static

Definition at line 2187 of file vmr9.c.

2189 {
2191 
2192  FIXME("(%p/%p)->(...) stub\n", iface, This);
2193  return E_NOTIMPL;
2194 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7SurfaceAllocatorNotify_SetDDrawDevice()

static HRESULT WINAPI VMR7SurfaceAllocatorNotify_SetDDrawDevice ( IVMRSurfaceAllocatorNotify iface,
IDirectDraw7 device,
HMONITOR  monitor 
)
static

Definition at line 2152 of file vmr9.c.

2154 {
2156 
2157  FIXME("(%p/%p)->(...) stub\n", iface, This);
2158  return E_NOTIMPL;
2159 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99
static struct quartz_vmr * impl_from_IVMRSurfaceAllocatorNotify(IVMRSurfaceAllocatorNotify *iface)
Definition: vmr9.c:152

◆ VMR7WindowlessControl_AddRef()

static ULONG WINAPI VMR7WindowlessControl_AddRef ( IVMRWindowlessControl iface)
static

Definition at line 1715 of file vmr9.c.

1716 {
1718  return VMR9_AddRef(&This->renderer.filter.IBaseFilter_iface);
1719 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
static ULONG WINAPI VMR9_AddRef(IBaseFilter *iface)
Definition: vmr9.c:893

◆ VMR7WindowlessControl_DisplayModeChanged()

static HRESULT WINAPI VMR7WindowlessControl_DisplayModeChanged ( IVMRWindowlessControl iface)
static

Definition at line 1845 of file vmr9.c.

1846 {
1848 
1849  FIXME("(%p/%p)->(...) stub\n", iface, This);
1850  return E_NOTIMPL;
1851 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetAspectRatioMode()

static HRESULT WINAPI VMR7WindowlessControl_GetAspectRatioMode ( IVMRWindowlessControl iface,
DWORD mode 
)
static

Definition at line 1809 of file vmr9.c.

1811 {
1813 
1814  FIXME("(%p/%p)->(...) stub\n", iface, This);
1815  return E_NOTIMPL;
1816 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetBorderColor()

static HRESULT WINAPI VMR7WindowlessControl_GetBorderColor ( IVMRWindowlessControl iface,
COLORREF color 
)
static

Definition at line 1871 of file vmr9.c.

1873 {
1875 
1876  FIXME("(%p/%p)->(...) stub\n", iface, This);
1877  return E_NOTIMPL;
1878 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetColorKey()

static HRESULT WINAPI VMR7WindowlessControl_GetColorKey ( IVMRWindowlessControl iface,
COLORREF color 
)
static

Definition at line 1888 of file vmr9.c.

1889 {
1891 
1892  FIXME("(%p/%p)->(...) stub\n", iface, This);
1893  return E_NOTIMPL;
1894 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetCurrentImage()

static HRESULT WINAPI VMR7WindowlessControl_GetCurrentImage ( IVMRWindowlessControl iface,
BYTE **  dib 
)
static

Definition at line 1853 of file vmr9.c.

1855 {
1857 
1858  FIXME("(%p/%p)->(...) stub\n", iface, This);
1859  return E_NOTIMPL;
1860 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetMaxIdealVideoSize()

static HRESULT WINAPI VMR7WindowlessControl_GetMaxIdealVideoSize ( IVMRWindowlessControl iface,
LONG width,
LONG height 
)
static

Definition at line 1757 of file vmr9.c.

1759 {
1761 
1762  FIXME("(%p/%p)->(...) stub\n", iface, This);
1763  return E_NOTIMPL;
1764 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetMinIdealVideoSize()

static HRESULT WINAPI VMR7WindowlessControl_GetMinIdealVideoSize ( IVMRWindowlessControl iface,
LONG width,
LONG height 
)
static

Definition at line 1748 of file vmr9.c.

1750 {
1752 
1753  FIXME("(%p/%p)->(...) stub\n", iface, This);
1754  return E_NOTIMPL;
1755 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_GetNativeVideoSize()

static HRESULT WINAPI VMR7WindowlessControl_GetNativeVideoSize ( IVMRWindowlessControl iface,
LONG width,
LONG height,
LONG arwidth,
LONG arheight 
)
static

Definition at line 1727 of file vmr9.c.

1730 {
1732  TRACE("(%p/%p)->(%p, %p, %p, %p)\n", iface, This, width, height, arwidth, arheight);
1733 
1734  if (!width || !height || !arwidth || !arheight)
1735  {
1736  ERR("Got no pointer\n");
1737  return E_POINTER;
1738  }
1739 
1740  *width = This->bmiheader.biWidth;
1741  *height = This->bmiheader.biHeight;
1742  *arwidth = This->bmiheader.biWidth;
1743  *arheight = This->bmiheader.biHeight;
1744 
1745  return S_OK;
1746 }
GLint GLint GLsizei width
Definition: gl.h:1546
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define TRACE(s)
Definition: solgame.cpp:4
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ VMR7WindowlessControl_GetVideoPosition()

static HRESULT WINAPI VMR7WindowlessControl_GetVideoPosition ( IVMRWindowlessControl iface,
RECT source,
RECT dest 
)
static

Definition at line 1794 of file vmr9.c.

1796 {
1798 
1799  if (source)
1800  *source = This->source_rect;
1801 
1802  if (dest)
1803  *dest = This->target_rect;
1804 
1805  FIXME("(%p/%p)->(%p/%p) stub\n", iface, This, source, dest);
1806  return S_OK;
1807 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
static char * dest
Definition: rtl.c:135

◆ VMR7WindowlessControl_QueryInterface()

static HRESULT WINAPI VMR7WindowlessControl_QueryInterface ( IVMRWindowlessControl iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 1708 of file vmr9.c.

1710 {
1712  return VMR9_QueryInterface(&This->renderer.filter.IBaseFilter_iface, riid, ppv);
1713 }
REFIID riid
Definition: precomp.h:44
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI VMR9_QueryInterface(IBaseFilter *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:863

◆ VMR7WindowlessControl_Release()

static ULONG WINAPI VMR7WindowlessControl_Release ( IVMRWindowlessControl iface)
static

Definition at line 1721 of file vmr9.c.

1722 {
1724  return VMR9_Release(&This->renderer.filter.IBaseFilter_iface);
1725 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
static ULONG WINAPI VMR9_Release(IBaseFilter *iface)
Definition: vmr9.c:908

◆ VMR7WindowlessControl_RepaintVideo()

static HRESULT WINAPI VMR7WindowlessControl_RepaintVideo ( IVMRWindowlessControl iface,
HWND  hwnd,
HDC  hdc 
)
static

Definition at line 1836 of file vmr9.c.

1838 {
1840 
1841  FIXME("(%p/%p)->(...) stub\n", iface, This);
1842  return E_NOTIMPL;
1843 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_SetAspectRatioMode()

static HRESULT WINAPI VMR7WindowlessControl_SetAspectRatioMode ( IVMRWindowlessControl iface,
DWORD  mode 
)
static

Definition at line 1818 of file vmr9.c.

1820 {
1822 
1823  FIXME("(%p/%p)->(...) stub\n", iface, This);
1824  return E_NOTIMPL;
1825 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_SetBorderColor()

static HRESULT WINAPI VMR7WindowlessControl_SetBorderColor ( IVMRWindowlessControl iface,
COLORREF  color 
)
static

Definition at line 1862 of file vmr9.c.

1864 {
1866 
1867  FIXME("(%p/%p)->(...) stub\n", iface, This);
1868  return E_NOTIMPL;
1869 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_SetColorKey()

static HRESULT WINAPI VMR7WindowlessControl_SetColorKey ( IVMRWindowlessControl iface,
COLORREF  color 
)
static

Definition at line 1880 of file vmr9.c.

1881 {
1883 
1884  FIXME("(%p/%p)->(...) stub\n", iface, This);
1885  return E_NOTIMPL;
1886 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_SetVideoClippingWindow()

static HRESULT WINAPI VMR7WindowlessControl_SetVideoClippingWindow ( IVMRWindowlessControl iface,
HWND  hwnd 
)
static

Definition at line 1827 of file vmr9.c.

1829 {
1831 
1832  FIXME("(%p/%p)->(...) stub\n", iface, This);
1833  return E_NOTIMPL;
1834 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ VMR7WindowlessControl_SetVideoPosition()

static HRESULT WINAPI VMR7WindowlessControl_SetVideoPosition ( IVMRWindowlessControl iface,
const RECT source,
const RECT dest 
)
static

Definition at line 1766 of file vmr9.c.

1768 {
1770 
1771  TRACE("(%p/%p)->(%p, %p)\n", iface, This, source, dest);
1772 
1773  EnterCriticalSection(&This->renderer.filter.csFilter);
1774 
1775  if (source)
1776  This->source_rect = *source;
1777  if (dest)
1778  {
1779  This->target_rect = *dest;
1780  if (This->baseControlWindow.baseWindow.hWnd)
1781  {
1782  FIXME("Output rectangle: %s\n", wine_dbgstr_rect(dest));
1783  SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL,
1784  dest->left, dest->top, dest->right - dest->left, dest->bottom-dest->top,
1786  }
1787  }
1788 
1789  LeaveCriticalSection(&This->renderer.filter.csFilter);
1790 
1791  return S_OK;
1792 }
static struct quartz_vmr * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)
Definition: vmr9.c:162
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define SWP_NOCOPYBITS
Definition: winuser.h:1228
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define SWP_NOACTIVATE
Definition: winuser.h:1227
const char * wine_dbgstr_rect(const RECT *rect)
#define S_OK
Definition: intsafe.h:59
GLsizei GLsizei GLchar * source
Definition: glext.h:6048
#define SWP_NOREDRAW
Definition: winuser.h:1231
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
static char * dest
Definition: rtl.c:135
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

◆ VMR9_AddRef()

static ULONG WINAPI VMR9_AddRef ( IBaseFilter iface)
static

Definition at line 893 of file vmr9.c.

894 {
895  struct quartz_vmr *This = (struct quartz_vmr*)iface;
896  LONG ret;
897 
898  if (This->outer_unk && This->bUnkOuterValid)
899  ret = IUnknown_AddRef(This->outer_unk);
900  else
901  ret = IUnknown_AddRef(&This->IUnknown_inner);
902 
903  TRACE("(%p)->AddRef from %d\n", iface, ret - 1);
904 
905  return ret;
906 }
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
int ret

Referenced by AMCertifiedOutputProtection_AddRef(), AMFilterMiscFlags_AddRef(), Basicvideo_AddRef(), Videowindow_AddRef(), VMR7FilterConfig_AddRef(), VMR7MonitorConfig_AddRef(), VMR7SurfaceAllocatorNotify_AddRef(), VMR7WindowlessControl_AddRef(), VMR9FilterConfig_AddRef(), VMR9MonitorConfig_AddRef(), VMR9SurfaceAllocatorNotify_AddRef(), and VMR9WindowlessControl_AddRef().

◆ VMR9_BreakConnect()

static HRESULT WINAPI VMR9_BreakConnect ( BaseRenderer This)
static

Definition at line 496 of file vmr9.c.

497 {
498  struct quartz_vmr *pVMR9 = (struct quartz_vmr*)This;
499  HRESULT hr = S_OK;
500 
501  if (!pVMR9->mode)
502  return S_FALSE;
503  if (This->pInputPin->pin.pConnectedTo && pVMR9->allocator && pVMR9->presenter)
504  {
505  if (pVMR9->renderer.filter.state != State_Stopped)
506  {
507  ERR("Disconnecting while not stopped! UNTESTED!!\n");
508  }
509  if (pVMR9->renderer.filter.state == State_Running)
510  hr = IVMRImagePresenter9_StopPresenting(pVMR9->presenter, pVMR9->cookie);
511  IVMRSurfaceAllocatorEx9_TerminateDevice(pVMR9->allocator, pVMR9->cookie);
512  pVMR9->num_surfaces = 0;
513  }
514  return hr;
515 }
DWORD num_surfaces
Definition: vmr9.c:84
DWORD_PTR cookie
Definition: vmr9.c:86
HRESULT hr
Definition: shlfolder.c:183
IVMRImagePresenter9 * presenter
Definition: vmr9.c:65
FILTER_STATE state
Definition: strmbase.h:167
IVMRSurfaceAllocatorEx9 * allocator
Definition: vmr9.c:64
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:77
VMR9Mode mode
Definition: vmr9.c:73
BaseFilter filter
Definition: strmbase.h:580
BaseRenderer renderer
Definition: vmr9.c:48
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59

◆ VMR9_CheckMediaType()

static HRESULT WINAPI VMR9_CheckMediaType ( BaseRenderer iface,
const AM_MEDIA_TYPE pmt 
)
static

Definition at line 352 of file vmr9.c.

353 {
354  struct quartz_vmr *This = (struct quartz_vmr*)iface;
355 
356  if (!IsEqualIID(&pmt->majortype, &MEDIATYPE_Video) || !pmt->pbFormat)
357  return S_FALSE;
358 
359  /* Ignore subtype, test for bicompression instead */
360  if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo))
361  {
362  VIDEOINFOHEADER *format = (VIDEOINFOHEADER *)pmt->pbFormat;
363 
364  This->bmiheader = format->bmiHeader;
365  TRACE("Resolution: %dx%d\n", format->bmiHeader.biWidth, format->bmiHeader.biHeight);
366  This->VideoWidth = format->bmiHeader.biWidth;
367  This->VideoHeight = format->bmiHeader.biHeight;
368  SetRect(&This->source_rect, 0, 0, This->VideoWidth, This->VideoHeight);
369  }
370  else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2))
371  {
372  VIDEOINFOHEADER2 *format = (VIDEOINFOHEADER2 *)pmt->pbFormat;
373 
374  This->bmiheader = format->bmiHeader;
375 
376  TRACE("Resolution: %dx%d\n", format->bmiHeader.biWidth, format->bmiHeader.biHeight);
377  This->VideoWidth = format->bmiHeader.biWidth;
378  This->VideoHeight = format->bmiHeader.biHeight;
379  SetRect(&This->source_rect, 0, 0, This->VideoWidth, This->VideoHeight);
380  }
381  else
382  {
383  ERR("Format type %s not supported\n", debugstr_guid(&pmt->formattype));
384  return S_FALSE;
385  }
386  if (This->bmiheader.biCompression != BI_RGB)
387  return S_FALSE;
388  return S_OK;
389 }
GLint GLint GLsizei GLsizei GLsizei GLint GLenum format
Definition: gl.h:1546
#define S_FALSE
Definition: winerror.h:2357
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define S_OK
Definition: intsafe.h:59
#define BI_RGB
Definition: precomp.h:34
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

◆ VMR9_CompleteConnect()

static HRESULT WINAPI VMR9_CompleteConnect ( BaseRenderer This,
IPin pReceivePin 
)
static

Definition at line 482 of file vmr9.c.

483 {
484  struct quartz_vmr *pVMR9 = (struct quartz_vmr*)This;
485  HRESULT hr;
486 
487  TRACE("(%p)\n", This);
488 
489  if (pVMR9->mode ||
490  SUCCEEDED(hr = IVMRFilterConfig9_SetRenderingMode(&pVMR9->IVMRFilterConfig9_iface, VMR9Mode_Windowed)))
491  hr = VMR9_maybe_init(pVMR9, FALSE);
492 
493  return hr;
494 }
IVMRFilterConfig9 IVMRFilterConfig9_iface
Definition: vmr9.c:56
HRESULT hr
Definition: shlfolder.c:183
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
VMR9Mode mode
Definition: vmr9.c:73
static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
Definition: vmr9.c:391
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ VMR9_DoRenderSample()

static HRESULT WINAPI VMR9_DoRenderSample ( BaseRenderer iface,
IMediaSample pSample 
)
static

Definition at line 287 of file vmr9.c.

288 {
289  struct quartz_vmr *This = (struct quartz_vmr*)iface;
290  LPBYTE pbSrcStream = NULL;
291  long cbSrcStream = 0;
292  REFERENCE_TIME tStart, tStop;
294  HRESULT hr;
295 
296  TRACE("%p %p\n", iface, pSample);
297 
298  /* It is possible that there is no device at this point */
299 
300  if (!This->allocator || !This->presenter)
301  {
302  ERR("NO PRESENTER!!\n");
303  return S_FALSE;
304  }
305 
306  hr = IMediaSample_GetTime(pSample, &tStart, &tStop);
307  if (FAILED(hr))
309  else
311 
312  if (IMediaSample_IsDiscontinuity(pSample) == S_OK)
313  info.dwFlags |= VMR9Sample_Discontinuity;
314 
315  if (IMediaSample_IsPreroll(pSample) == S_OK)
316  info.dwFlags |= VMR9Sample_Preroll;
317 
318  if (IMediaSample_IsSyncPoint(pSample) == S_OK)
319  info.dwFlags |= VMR9Sample_SyncPoint;
320 
321  /* If we render ourselves, and this is a preroll sample, discard it */
322  if (This->baseControlWindow.baseWindow.hWnd && (info.dwFlags & VMR9Sample_Preroll))
323  {
324  return S_OK;
325  }
326 
327  hr = IMediaSample_GetPointer(pSample, &pbSrcStream);
328  if (FAILED(hr))
329  {
330  ERR("Cannot get pointer to sample data (%x)\n", hr);
331  return hr;
332  }
333 
334  cbSrcStream = IMediaSample_GetActualDataLength(pSample);
335 
336  info.rtStart = tStart;
337  info.rtEnd = tStop;
338  info.szAspectRatio.cx = This->bmiheader.biWidth;
339  info.szAspectRatio.cy = This->bmiheader.biHeight;
340 
341  hr = IVMRSurfaceAllocatorEx9_GetSurface(This->allocator, This->cookie, (++This->cur_surface)%This->num_surfaces, 0, &info.lpSurf);
342 
343  if (FAILED(hr))
344  return hr;
345 
346  VMR9_SendSampleData(This, &info, pbSrcStream, cbSrcStream);
348 
349  return hr;
350 }
#define IDirect3DSurface9_Release(p)
Definition: d3d9.h:622
HRESULT hr
Definition: shlfolder.c:183
struct _test_info info[]
Definition: SetCursorPos.c:19
unsigned char * LPBYTE
Definition: typedefs.h:52
#define S_FALSE
Definition: winerror.h:2357
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
LONGLONG REFERENCE_TIME
Definition: dmusicks.h:9
LONG HRESULT
Definition: typedefs.h:77
static DWORD VMR9_SendSampleData(struct quartz_vmr *This, VMR9PresentationInfo *info, LPBYTE data, DWORD size)
Definition: vmr9.c:209
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59

◆ VMR9_GetClassWindowStyles()

static LPWSTR WINAPI VMR9_GetClassWindowStyles ( BaseWindow This,
DWORD pClassStyles,
DWORD pWindowStyles,
DWORD pWindowStylesEx 
)
static

Definition at line 539 of file vmr9.c.

540 {
541  static WCHAR classnameW[] = { 'I','V','M','R','9',' ','C','l','a','s','s', 0 };
542 
543  *pClassStyles = 0;
544  *pWindowStyles = WS_SIZEBOX;
545  *pWindowStylesEx = 0;
546 
547  return classnameW;
548 }
#define WS_SIZEBOX
Definition: pedump.c:642
__wchar_t WCHAR
Definition: xmlstorage.h:180

◆ VMR9_GetDefaultRect()

static RECT WINAPI VMR9_GetDefaultRect ( BaseWindow This)
static

Definition at line 550 of file vmr9.c.

551 {
552  struct quartz_vmr* pVMR9 = impl_from_BaseWindow(This);
553  static RECT defRect;
554 
555  SetRect(&defRect, 0, 0, pVMR9->VideoWidth, pVMR9->VideoHeight);
556 
557  return defRect;
558 }
LONG VideoWidth
Definition: vmr9.c:93
static struct quartz_vmr * impl_from_BaseWindow(BaseWindow *wnd)
Definition: vmr9.c:102
LONG VideoHeight
Definition: vmr9.c:94
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)

◆ VMR9_GetSourceRect()

static HRESULT WINAPI VMR9_GetSourceRect ( BaseControlVideo *  This,
RECT pSourceRect 
)
static

Definition at line 582 of file vmr9.c.

583 {
584  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
585  CopyRect(pSourceRect,&pVMR9->source_rect);
586  return S_OK;
587 }
#define S_OK
Definition: intsafe.h:59
RECT source_rect
Definition: vmr9.c:91
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)

◆ VMR9_GetStaticImage()

static HRESULT WINAPI VMR9_GetStaticImage ( BaseControlVideo *  This,
LONG pBufferSize,
LONG pDIBImage 
)
static

Definition at line 589 of file vmr9.c.

590 {
591  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
592  BITMAPINFOHEADER *bmiHeader;
593  LONG needed_size;
594  AM_MEDIA_TYPE *amt = &pVMR9->renderer.pInputPin->pin.mtCurrent;
595  char *ptr;
596 
597  FIXME("(%p/%p)->(%p, %p): partial stub\n", pVMR9, This, pBufferSize, pDIBImage);
598 
600 
601  if (!pVMR9->renderer.pMediaSample)
602  {
604  return (pVMR9->renderer.filter.state == State_Paused ? E_UNEXPECTED : VFW_E_NOT_PAUSED);
605  }
606 
607  if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo))
608  {
609  bmiHeader = &((VIDEOINFOHEADER *)amt->pbFormat)->bmiHeader;
610  }
611  else if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo2))
612  {
613  bmiHeader = &((VIDEOINFOHEADER2 *)amt->pbFormat)->bmiHeader;
614  }
615  else
616  {
617  FIXME("Unknown type %s\n", debugstr_guid(&amt->subtype));
619  return VFW_E_RUNTIME_ERROR;
620  }
621 
622  needed_size = bmiHeader->biSize;
623  needed_size += IMediaSample_GetActualDataLength(pVMR9->renderer.pMediaSample);
624 
625  if (!pDIBImage)
626  {
627  *pBufferSize = needed_size;
629  return S_OK;
630  }
631 
632  if (needed_size < *pBufferSize)
633  {
634  ERR("Buffer too small %u/%u\n", needed_size, *pBufferSize);
636  return E_FAIL;
637  }
638  *pBufferSize = needed_size;
639 
640  memcpy(pDIBImage, bmiHeader, bmiHeader->biSize);
641  IMediaSample_GetPointer(pVMR9->renderer.pMediaSample, (BYTE **)&ptr);
642  memcpy((char *)pDIBImage + bmiHeader->biSize, ptr, IMediaSample_GetActualDataLength(pVMR9->renderer.pMediaSample));
643 
645  return S_OK;
646 }
IMediaSample * pMediaSample
Definition: strmbase.h:588
_Must_inspect_result_ _In_ ULONG _Out_writes_bytes_ pBufferSize PVOID _Inout_ PULONG pBufferSize
Definition: fsrtlfuncs.h:1164
BasePin pin
Definition: strmbase.h:90
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
#define E_FAIL
Definition: ddrawi.h:102
FILTER_STATE state
Definition: strmbase.h:167
#define VFW_E_NOT_PAUSED
Definition: vfwmsgs.h:76
long LONG
Definition: pedump.c:60
#define FIXME(fmt,...)
Definition: debug.h:110
static PVOID ptr
Definition: dispmode.c:27
#define debugstr_guid
Definition: kernel32.h:35
#define VFW_E_RUNTIME_ERROR
Definition: vfwmsgs.h:50
BaseInputPin * pInputPin
Definition: strmbase.h:582
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
CRITICAL_SECTION csFilter
Definition: strmbase.h:165
unsigned char BYTE
Definition: mem.h:68
BaseFilter filter
Definition: strmbase.h:580
BaseRenderer renderer
Definition: vmr9.c:48
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
#define E_UNEXPECTED
Definition: winerror.h:2456
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
AM_MEDIA_TYPE mtCurrent
Definition: strmbase.h:40

◆ VMR9_GetTargetRect()

static HRESULT WINAPI VMR9_GetTargetRect ( BaseControlVideo *  This,
RECT pTargetRect 
)
static

Definition at line 648 of file vmr9.c.

649 {
650  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
651  CopyRect(pTargetRect,&pVMR9->target_rect);
652  return S_OK;
653 }
RECT target_rect
Definition: vmr9.c:92
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)

◆ VMR9_GetVideoFormat()

static VIDEOINFOHEADER* WINAPI VMR9_GetVideoFormat ( BaseControlVideo *  This)
static

Definition at line 655 of file vmr9.c.

656 {
657  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
658  AM_MEDIA_TYPE *pmt;
659 
660  TRACE("(%p/%p)\n", pVMR9, This);
661 
662  pmt = &pVMR9->renderer.pInputPin->pin.mtCurrent;
663  if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo)) {
664  return (VIDEOINFOHEADER*)pmt->pbFormat;
665  } else if (IsEqualIID(&pmt->formattype, &FORMAT_VideoInfo2)) {
666  static VIDEOINFOHEADER vih;
667  VIDEOINFOHEADER2 *vih2 = (VIDEOINFOHEADER2*)pmt->pbFormat;
668  memcpy(&vih,vih2,sizeof(VIDEOINFOHEADER));
669  memcpy(&vih.bmiHeader, &vih2->bmiHeader, sizeof(BITMAPINFOHEADER));
670  return &vih;
671  } else {
672  ERR("Unknown format type %s\n", qzdebugstr_guid(&pmt->formattype));
673  return NULL;
674  }
675 }
const char * qzdebugstr_guid(const GUID *id)
Definition: main.c:279
BasePin pin
Definition: strmbase.h:90
smooth NULL
Definition: ftsmooth.c:416
BITMAPINFOHEADER bmiHeader
Definition: amvideo.idl:189
#define TRACE(s)
Definition: solgame.cpp:4
BaseInputPin * pInputPin
Definition: strmbase.h:582
BITMAPINFOHEADER bmiHeader
Definition: dvdmedia.h:41
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
BaseRenderer renderer
Definition: vmr9.c:48
#define ERR(fmt,...)
Definition: debug.h:109
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
AM_MEDIA_TYPE mtCurrent
Definition: strmbase.h:40

◆ VMR9_ImagePresenter_AddRef()

static ULONG WINAPI VMR9_ImagePresenter_AddRef ( IVMRImagePresenter9 iface)
static

Definition at line 2482 of file vmr9.c.

2483 {
2485  ULONG refCount = InterlockedIncrement(&This->refCount);
2486 
2487  TRACE("(%p)->() AddRef from %d\n", iface, refCount - 1);
2488 
2489  return refCount;
2490 }
#define TRACE(s)
Definition: solgame.cpp:4
#define InterlockedIncrement
Definition: armddk.h:53
unsigned int ULONG
Definition: retypes.h:1
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
Definition: vmr9.c:197

Referenced by VMR9_SurfaceAllocator_AddRef().

◆ VMR9_ImagePresenter_PresentImage()

static HRESULT WINAPI VMR9_ImagePresenter_PresentImage ( IVMRImagePresenter9 iface,
DWORD_PTR  id,
VMR9PresentationInfo info 
)
static

Definition at line 2616 of file vmr9.c.

2617 {
2619  HRESULT hr;
2620  RECT output;
2621  BOOL render = FALSE;
2622 
2623  TRACE("(%p/%p/%p)->(...) stub\n", iface, This, This->pVMR9);
2624  GetWindowRect(This->pVMR9->baseControlWindow.baseWindow.hWnd, &output);
2625  TRACE("Output rectangle: %s\n", wine_dbgstr_rect(&output));
2626 
2627  /* This might happen if we don't have active focus (eg on a different virtual desktop) */
2628  if (!This->d3d9_dev)
2629  return S_OK;
2630 
2631  /* Display image here */
2632  hr = IDirect3DDevice9_Clear(This->d3d9_dev, 0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0, 0, 0), 1.0f, 0);
2633  if (FAILED(hr))
2634  FIXME("hr: %08x\n", hr);
2635  hr = IDirect3DDevice9_BeginScene(This->d3d9_dev);
2636  if (SUCCEEDED(hr))
2637  {
2638  if (This->d3d9_vertex)
2640  else
2642  render = SUCCEEDED(hr);
2643  }
2644  else
2645  FIXME("BeginScene: %08x\n", hr);
2646  hr = IDirect3DDevice9_EndScene(This->d3d9_dev);
2647  if (render && SUCCEEDED(hr))
2648  {
2649  hr = IDirect3DDevice9_Present(This->d3d9_dev, NULL, NULL, This->pVMR9->baseControlWindow.baseWindow.hWnd, NULL);
2650  if (FAILED(hr))
2651  FIXME("Presenting image: %08x\n", hr);
2652  }
2653 
2654  return S_OK;
2655 }
static UCHAR ULONG UCHAR ULONG UCHAR * output
Definition: bcrypt.c:29
#define IDirect3DDevice9_Clear(p, a, b, c, d, e, f)
Definition: d3d9.h:1550
HRESULT hr
Definition: shlfolder.c:183
static HRESULT VMR9_ImagePresenter_PresentTexture(VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface)
Definition: vmr9.c:2548
static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface(VMR9DefaultAllocatorPresenterImpl *This, IDirect3DSurface9 *surface)
Definition: vmr9.c:2591
unsigned int BOOL
Definition: ntddk_ex.h:94
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define IDirect3DDevice9_EndScene(p)
Definition: d3d9.h:1549
GLfloat f
Definition: glext.h:7540
#define TRACE(s)
Definition: solgame.cpp:4
LONG HRESULT
Definition: typedefs.h:77
static void render(void)
Definition: ssstars.c:272
const char * wine_dbgstr_rect(const RECT *rect)
#define D3DCOLOR_XRGB(r, g, b)
Definition: d3d8types.h:44
#define S_OK
Definition: intsafe.h:59
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
Definition: vmr9.c:197
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define IDirect3DDevice9_Present(p, a, b, c, d)
Definition: d3d9.h:1524
#define IDirect3DDevice9_BeginScene(p)
Definition: d3d9.h:1548
#define SUCCEEDED(hr)
Definition: intsafe.h:57
#define D3DCLEAR_TARGET
Definition: d3d8types.h:30

◆ VMR9_ImagePresenter_PresentOffscreenSurface()

static HRESULT VMR9_ImagePresenter_PresentOffscreenSurface ( VMR9DefaultAllocatorPresenterImpl This,
IDirect3DSurface9 *  surface 
)
static

Definition at line 2591 of file vmr9.c.

2592 {
2593  HRESULT hr;
2594  IDirect3DSurface9 *target = NULL;
2595  RECT target_rect;
2596 
2598  if (FAILED(hr))
2599  {
2600  ERR("IDirect3DDevice9_GetBackBuffer -- %08x\n", hr);
2601  return hr;
2602  }
2603 
2604  /* Move rect to origin and flip it */
2605  SetRect(&target_rect, 0, This->pVMR9->target_rect.bottom - This->pVMR9->target_rect.top,
2606  This->pVMR9->target_rect.right - This->pVMR9->target_rect.left, 0);
2607 
2608  hr = IDirect3DDevice9_StretchRect(This->d3d9_dev, surface, &This->pVMR9->source_rect, target, &target_rect, D3DTEXF_LINEAR);
2609  if (FAILED(hr))
2610  ERR("IDirect3DDevice9_StretchRect -- %08x\n", hr);
2612 
2613  return hr;
2614 }
#define IDirect3DSurface9_Release(p)
Definition: d3d9.h:622
#define IDirect3DDevice9_GetBackBuffer(p, a, b, c, d)
Definition: d3d9.h:1525
HRESULT hr
Definition: shlfolder.c:183
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
RECT target_rect
Definition: vmr9.c:92
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
GLenum target
Definition: glext.h:7315
#define IDirect3DDevice9_StretchRect(p, a, b, c, d, e)
Definition: d3d9.h:1541

Referenced by VMR9_ImagePresenter_PresentImage().

◆ VMR9_ImagePresenter_PresentTexture()

static HRESULT VMR9_ImagePresenter_PresentTexture ( VMR9DefaultAllocatorPresenterImpl This,
IDirect3DSurface9 *  surface 
)
static

Definition at line 2548 of file vmr9.c.

2549 {
2550  IDirect3DTexture9 *texture = NULL;
2551  HRESULT hr;
2552 
2553  hr = IDirect3DDevice9_SetFVF(This->d3d9_dev, USED_FVF);
2554  if (FAILED(hr))
2555  {
2556  FIXME("SetFVF: %08x\n", hr);
2557  return hr;
2558  }
2559 
2560  hr = IDirect3DDevice9_SetStreamSource(This->d3d9_dev, 0, This->d3d9_vertex, 0, sizeof(struct VERTEX));
2561  if (FAILED(hr))
2562  {
2563  FIXME("SetStreamSource: %08x\n", hr);
2564  return hr;
2565  }
2566 
2567  hr = IDirect3DSurface9_GetContainer(surface, &IID_IDirect3DTexture9, (void **) &texture);
2568  if (FAILED(hr))
2569  {
2570  FIXME("IDirect3DSurface9_GetContainer failed\n");
2571  return hr;
2572  }
2573  hr = IDirect3DDevice9_SetTexture(This->d3d9_dev, 0, (IDirect3DBaseTexture9 *)texture);
2575  if (FAILED(hr))
2576  {
2577  FIXME("SetTexture: %08x\n", hr);
2578  return hr;
2579  }
2580 
2582  if (FAILED(hr))
2583  {
2584  FIXME("DrawPrimitive: %08x\n", hr);
2585  return hr;
2586  }
2587 
2588  return S_OK;
2589 }
HRESULT hr
Definition: shlfolder.c:183
#define IDirect3DTexture9_Release(p)
Definition: d3d9.h:1014
#define IDirect3DDevice9_DrawPrimitive(p, a, b, c)
Definition: d3d9.h:1588
#define IDirect3DDevice9_SetFVF(p, a)
Definition: d3d9.h:1596
#define FIXME(fmt,...)
Definition: debug.h:110
#define IDirect3DDevice9_SetStreamSource(p, a, b, c, d)
Definition: d3d9.h:1607
smooth NULL
Definition: ftsmooth.c:416
GLenum GLuint texture
Definition: glext.h:6295
LONG HRESULT
Definition: typedefs.h:77
#define IDirect3DSurface9_GetContainer(p, a, b)
Definition: d3d9.h:633
#define USED_FVF
Definition: vmr9.c:2545
#define S_OK
Definition: intsafe.h:59
#define IDirect3DDevice9_SetTexture(p, a, b)
Definition: d3d9.h:1572
Definition: vmr9.c:2546

Referenced by VMR9_ImagePresenter_PresentImage().

◆ VMR9_ImagePresenter_QueryInterface()

static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface ( IVMRImagePresenter9 iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 2457 of file vmr9.c.

2458 {
2460  TRACE("(%p/%p)->(%s, %p)\n", This, iface, qzdebugstr_guid(riid), ppv);
2461 
2462  *ppv = NULL;
2463 
2464  if (IsEqualIID(riid, &IID_IUnknown))
2465  *ppv = (LPVOID)&(This->IVMRImagePresenter9_iface);
2466  else if (IsEqualIID(riid, &IID_IVMRImagePresenter9))
2467  *ppv = &This->IVMRImagePresenter9_iface;
2468  else if (IsEqualIID(riid, &IID_IVMRSurfaceAllocatorEx9))
2469  *ppv = &This->IVMRSurfaceAllocatorEx9_iface;
2470 
2471  if (*ppv)
2472  {
2473  IUnknown_AddRef((IUnknown *)(*ppv));
2474  return S_OK;
2475  }
2476 
2477  FIXME("No interface for %s\n", debugstr_guid(riid));
2478 
2479  return E_NOINTERFACE;
2480 }
#define E_NOINTERFACE
Definition: winerror.h:2364
REFIID riid
Definition: precomp.h:44
const char * qzdebugstr_guid(const GUID *id)
Definition: main.c:279
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define FIXME(fmt,...)
Definition: debug.h:110
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
if(!(yy_init))
Definition: macro.lex.yy.c:714
const GUID IID_IUnknown
#define LPVOID
Definition: nt_native.h:45
#define S_OK
Definition: intsafe.h:59
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
Definition: vmr9.c:197
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by VMR9_SurfaceAllocator_QueryInterface().

◆ VMR9_ImagePresenter_Release()

static ULONG WINAPI VMR9_ImagePresenter_Release ( IVMRImagePresenter9 iface)
static

Definition at line 2492 of file vmr9.c.

2493 {
2495  ULONG refCount = InterlockedDecrement(&This->refCount);
2496 
2497  TRACE("(%p)->() Release from %d\n", iface, refCount + 1);
2498 
2499  if (!refCount)
2500  {
2501  DWORD i;
2502  TRACE("Destroying\n");
2503  CloseHandle(This->ack);
2504  IDirect3D9_Release(This->d3d9_ptr);
2505 
2506  TRACE("Number of surfaces: %u\n", This->num_surfaces);
2507  for (i = 0; i < This->num_surfaces; ++i)
2508  {
2509  IDirect3DSurface9 *surface = This->d3d9_surfaces[i];
2510  TRACE("Releasing surface %p\n", surface);
2511  if (surface)
2512  IDirect3DSurface9_Release(surface);
2513  }
2514 
2515  CoTaskMemFree(This->d3d9_surfaces);
2516  This->d3d9_surfaces = NULL;
2517  This->num_surfaces = 0;
2518  if (This->d3d9_vertex)
2519  {
2520  IDirect3DVertexBuffer9_Release(This->d3d9_vertex);
2521  This->d3d9_vertex = NULL;
2522  }
2524  return 0;
2525  }
2526  return refCount;
2527 }
#define IDirect3DSurface9_Release(p)
Definition: d3d9.h:622
#define CloseHandle
Definition: compat.h:398
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:422
#define IDirect3D9_Release(p)
Definition: d3d9.h:220
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define InterlockedDecrement
Definition: armddk.h:52
#define IDirect3DVertexBuffer9_Release(p)
Definition: d3d9.h:696
unsigned int ULONG
Definition: retypes.h:1
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
Definition: vmr9.c:197

Referenced by VMR9_SurfaceAllocator_Release().

◆ VMR9_ImagePresenter_StartPresenting()

static HRESULT WINAPI VMR9_ImagePresenter_StartPresenting ( IVMRImagePresenter9 iface,
DWORD_PTR  id 
)
static

Definition at line 2529 of file vmr9.c.

2530 {
2532 
2533  TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9);
2534  return S_OK;
2535 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
Definition: vmr9.c:197

◆ VMR9_ImagePresenter_StopPresenting()

static HRESULT WINAPI VMR9_ImagePresenter_StopPresenting ( IVMRImagePresenter9 iface,
DWORD_PTR  id 
)
static

Definition at line 2537 of file vmr9.c.

2538 {
2540 
2541  TRACE("(%p/%p/%p)->(...) stub\n", iface, This,This->pVMR9);
2542  return S_OK;
2543 }
#define TRACE(s)
Definition: solgame.cpp:4
#define S_OK
Definition: intsafe.h:59
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRImagePresenter9(IVMRImagePresenter9 *iface)
Definition: vmr9.c:197

◆ VMR9_IsDefaultSourceRect()

static HRESULT WINAPI VMR9_IsDefaultSourceRect ( BaseControlVideo *  This)
static

Definition at line 677 of file vmr9.c.

678 {
679  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
680  FIXME("(%p/%p)->(): stub !!!\n", pVMR9, This);
681 
682  return S_OK;
683 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112

◆ VMR9_IsDefaultTargetRect()

static HRESULT WINAPI VMR9_IsDefaultTargetRect ( BaseControlVideo *  This)
static

Definition at line 685 of file vmr9.c.

686 {
687  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
688  FIXME("(%p/%p)->(): stub !!!\n", pVMR9, This);
689 
690  return S_OK;
691 }
#define FIXME(fmt,...)
Definition: debug.h:110
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112

◆ VMR9_maybe_init()

static HRESULT VMR9_maybe_init ( struct quartz_vmr This,
BOOL  force 
)
static

Definition at line 391 of file vmr9.c.

392 {
394  DWORD buffers;
395  HRESULT hr;
396 
397  TRACE("my mode: %u, my window: %p, my last window: %p\n", This->mode, This->baseControlWindow.baseWindow.hWnd, This->hWndClippingWindow);
398  if (This->baseControlWindow.baseWindow.hWnd || !This->renderer.pInputPin->pin.pConnectedTo)
399  return S_OK;
400 
401  if (This->mode == VMR9Mode_Windowless && !This->hWndClippingWindow)
402  return (force ? VFW_E_RUNTIME_ERROR : S_OK);
403 
404  TRACE("Initializing\n");
406  info.dwHeight = This->source_rect.bottom;
407  info.dwWidth = This->source_rect.right;
408  info.Pool = D3DPOOL_DEFAULT;
409  info.MinBuffers = 2;
410  FIXME("Reduce ratio to least common denominator\n");
411  info.szAspectRatio.cx = info.dwWidth;
412  info.szAspectRatio.cy = info.dwHeight;
413  info.szNativeSize.cx = This->bmiheader.biWidth;
414  info.szNativeSize.cy = This->bmiheader.biHeight;
415  buffers = 2;
416 
417  switch (This->bmiheader.biBitCount)
418  {
419  case 8: info.Format = D3DFMT_R3G3B2; break;
420  case 15: info.Format = D3DFMT_X1R5G5B5; break;
421  case 16: info.Format = D3DFMT_R5G6B5; break;
422  case 24: info.Format = D3DFMT_R8G8B8; break;
423  case 32: info.Format = D3DFMT_X8R8G8B8; break;
424  default:
425  FIXME("Unknown bpp %u\n", This->bmiheader.biBitCount);
426  hr = E_INVALIDARG;
427  }
428 
429  This->cur_surface = 0;
430  if (This->num_surfaces)
431  {
432  ERR("num_surfaces or d3d9_surfaces not 0\n");
433  return E_FAIL;
434  }
435 
436  hr = IVMRSurfaceAllocatorEx9_InitializeDevice(This->allocator, This->cookie, &info, &buffers);
437  if (SUCCEEDED(hr))
438  {
439  SetRect(&This->source_rect, 0, 0, This->bmiheader.biWidth, This->bmiheader.biHeight);
440 
441  This->num_surfaces = buffers;
442  }
443  return hr;
444 }
HRESULT hr
Definition: shlfolder.c:183
const GLuint * buffers
Definition: glext.h:5916
#define E_FAIL
Definition: ddrawi.h:102
struct _test_info info[]
Definition: SetCursorPos.c:19
#define FIXME(fmt,...)
Definition: debug.h:110
#define E_INVALIDARG
Definition: ddrawi.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define VFW_E_RUNTIME_ERROR
Definition: vfwmsgs.h:50
LONG HRESULT
Definition: typedefs.h:77
unsigned long DWORD
Definition: ntddk_ex.h:95
#define ERR(fmt,...)
Definition: debug.h:109
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define S_OK
Definition: intsafe.h:59
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by VMR9_CompleteConnect(), VMR9_OnStartStreaming(), and VMR9WindowlessControl_SetVideoClippingWindow().

◆ VMR9_OnSize()

static BOOL WINAPI VMR9_OnSize ( BaseWindow This,
LONG  Width,
LONG  Height 
)
static

Definition at line 560 of file vmr9.c.

561 {
562  struct quartz_vmr* pVMR9 = impl_from_BaseWindow(This);
563 
564  TRACE("WM_SIZE %d %d\n", Width, Height);
565  GetClientRect(This->hWnd, &pVMR9->target_rect);
566  TRACE("WM_SIZING: DestRect=(%d,%d),(%d,%d)\n",
567  pVMR9->target_rect.left,
568  pVMR9->target_rect.top,
569  pVMR9->target_rect.right - pVMR9->target_rect.left,
570  pVMR9->target_rect.bottom - pVMR9->target_rect.top);
571  return BaseWindowImpl_OnSize(This, Width, Height);
572 }
BOOL WINAPI BaseWindowImpl_OnSize(BaseWindow *This, LONG Height, LONG Width)
Definition: window.c:73
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
LONG right
Definition: windef.h:293
static struct quartz_vmr * impl_from_BaseWindow(BaseWindow *wnd)
Definition: vmr9.c:102
#define TRACE(s)
Definition: solgame.cpp:4
RECT target_rect
Definition: vmr9.c:92
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
LONG bottom
Definition: windef.h:294

◆ VMR9_OnStartStreaming()

static VOID WINAPI VMR9_OnStartStreaming ( BaseRenderer iface)
static

Definition at line 446 of file vmr9.c.

447 {
448  struct quartz_vmr *This = (struct quartz_vmr*)iface;
449 
450  TRACE("(%p)\n", This);
451 
453  IVMRImagePresenter9_StartPresenting(This->presenter, This->cookie);
454  SetWindowPos(This->baseControlWindow.baseWindow.hWnd, NULL,
455  This->source_rect.left,
456  This->source_rect.top,
457  This->source_rect.right - This->source_rect.left,
458  This->source_rect.bottom - This->source_rect.top,
460  ShowWindow(This->baseControlWindow.baseWindow.hWnd, SW_SHOW);
461  GetClientRect(This->baseControlWindow.baseWindow.hWnd, &This->target_rect);
462 }
#define TRUE
Definition: types.h:120
#define SWP_NOZORDER
Definition: winuser.h:1232
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
smooth NULL
Definition: ftsmooth.c:416
#define SW_SHOW
Definition: winuser.h:769
#define TRACE(s)
Definition: solgame.cpp:4
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define SWP_DEFERERASE
Definition: winuser.h:1237
#define SWP_NOMOVE
Definition: winuser.h:1229
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
static HRESULT VMR9_maybe_init(struct quartz_vmr *This, BOOL force)
Definition: vmr9.c:391

◆ VMR9_OnStopStreaming()

static VOID WINAPI VMR9_OnStopStreaming ( BaseRenderer iface)
static

Definition at line 464 of file vmr9.c.

465 {
466  struct quartz_vmr *This = (struct quartz_vmr*)iface;
467 
468  TRACE("(%p)\n", This);
469 
470  if (This->renderer.filter.state == State_Running)
471  IVMRImagePresenter9_StopPresenting(This->presenter, This->cookie);
472 }
#define TRACE(s)
Definition: solgame.cpp:4

◆ VMR9_QueryInterface()

static HRESULT WINAPI VMR9_QueryInterface ( IBaseFilter iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 863 of file vmr9.c.

864 {
865  struct quartz_vmr *This = (struct quartz_vmr*)iface;
866 
867  if (This->bAggregatable)
868  This->bUnkOuterValid = TRUE;
869 
870  if (This->outer_unk)
871  {
872  if (This->bAggregatable)
873  return IUnknown_QueryInterface(This->outer_unk, riid, ppv);
874 
876  {
877  HRESULT hr;
878 
879  IUnknown_AddRef(&This->IUnknown_inner);
880  hr = IUnknown_QueryInterface(&This->IUnknown_inner, riid, ppv);
881  IUnknown_Release(&This->IUnknown_inner);
882  This->bAggregatable = TRUE;
883  return hr;
884  }
885 
886  *ppv = NULL;
887  return E_NOINTERFACE;
888  }
889 
890  return IUnknown_QueryInterface(&This->IUnknown_inner, riid, ppv);
891 }
#define TRUE
Definition: types.h:120
#define E_NOINTERFACE
Definition: winerror.h:2364
HRESULT hr
Definition: shlfolder.c:183
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
const GUID IID_IUnknown
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by AMCertifiedOutputProtection_QueryInterface(), AMFilterMiscFlags_QueryInterface(), Basicvideo_QueryInterface(), Videowindow_QueryInterface(), VMR7FilterConfig_QueryInterface(), VMR7MonitorConfig_QueryInterface(), VMR7SurfaceAllocatorNotify_QueryInterface(), VMR7WindowlessControl_QueryInterface(), VMR9FilterConfig_QueryInterface(), VMR9MonitorConfig_QueryInterface(), VMR9SurfaceAllocatorNotify_QueryInterface(), and VMR9WindowlessControl_QueryInterface().

◆ VMR9_Release()

static ULONG WINAPI VMR9_Release ( IBaseFilter iface)
static

Definition at line 908 of file vmr9.c.

909 {
910  struct quartz_vmr *This = (struct quartz_vmr*)iface;
911  LONG ret;
912 
913  if (This->outer_unk && This->bUnkOuterValid)
914  ret = IUnknown_Release(This->outer_unk);
915  else
916  ret = IUnknown_Release(&This->IUnknown_inner);
917 
918  TRACE("(%p)->Release from %d\n", iface, ret + 1);
919 
920  if (ret)
921  return ret;
922  return 0;
923 }
long LONG
Definition: pedump.c:60
#define TRACE(s)
Definition: solgame.cpp:4
int ret

Referenced by AMCertifiedOutputProtection_Release(), AMFilterMiscFlags_Release(), Basicvideo_Release(), Videowindow_Release(), VMR7FilterConfig_Release(), VMR7MonitorConfig_Release(), VMR7SurfaceAllocatorNotify_Release(), VMR7WindowlessControl_Release(), VMR9FilterConfig_Release(), VMR9MonitorConfig_Release(), VMR9SurfaceAllocatorNotify_Release(), and VMR9WindowlessControl_Release().

◆ VMR9_SendSampleData()

static DWORD VMR9_SendSampleData ( struct quartz_vmr This,
VMR9PresentationInfo info,
LPBYTE  data,
DWORD  size 
)
static

Definition at line 209 of file vmr9.c.

211 {
212  AM_MEDIA_TYPE *amt;
213  HRESULT hr = S_OK;
214  int width;
215  int height;
216  BITMAPINFOHEADER *bmiHeader;
218 
219  TRACE("%p %p %d\n", This, data, size);
220 
221  amt = &This->renderer.pInputPin->pin.mtCurrent;
222 
223  if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo))
224  {
225  bmiHeader = &((VIDEOINFOHEADER *)amt->pbFormat)->bmiHeader;
226  }
227  else if (IsEqualIID(&amt->formattype, &FORMAT_VideoInfo2))
228  {
229  bmiHeader = &((VIDEOINFOHEADER2 *)amt->pbFormat)->bmiHeader;
230  }
231  else
232  {
233  FIXME("Unknown type %s\n", debugstr_guid(&amt->subtype));
234  return VFW_E_RUNTIME_ERROR;
235  }
236 
237  TRACE("biSize = %d\n", bmiHeader->biSize);
238  TRACE("biWidth = %d\n", bmiHeader->biWidth);
239  TRACE("biHeight = %d\n", bmiHeader->biHeight);
240  TRACE("biPlanes = %d\n", bmiHeader->biPlanes);
241  TRACE("biBitCount = %d\n", bmiHeader->biBitCount);
242  TRACE("biCompression = %s\n", debugstr_an((LPSTR)&(bmiHeader->biCompression), 4));
243  TRACE("biSizeImage = %d\n", bmiHeader->biSizeImage);
244 
245  width = bmiHeader->biWidth;
246  height = bmiHeader->biHeight;
247 
248  TRACE("Src Rect: %s\n", wine_dbgstr_rect(&This->source_rect));
249  TRACE("Dst Rect: %s\n", wine_dbgstr_rect(&This->target_rect));
250 
252  if (FAILED(hr))
253  {
254  ERR("IDirect3DSurface9_LockRect failed (%x)\n",hr);
255  return hr;
256  }
257 
258  if (height > 0) {
259  /* Bottom up image needs inverting */
260  lock.pBits = (char *)lock.pBits + (height * lock.Pitch);
261  while (height--)
262  {
263  lock.pBits = (char *)lock.pBits - lock.Pitch;
264  memcpy(lock.pBits, data, width * bmiHeader->biBitCount / 8);
265  data = data + width * bmiHeader->biBitCount / 8;
266  }
267  }
268  else if (lock.Pitch != width * bmiHeader->biBitCount / 8)
269  {
270  WARN("Slow path! %u/%u\n", lock.Pitch, width * bmiHeader->biBitCount/8);
271 
272  while (height--)
273  {
274  memcpy(lock.pBits, data, width * bmiHeader->biBitCount / 8);
275  data = data + width * bmiHeader->biBitCount / 8;
276  lock.pBits = (char *)lock.pBits + lock.Pitch;
277  }
278  }
279  else memcpy(lock.pBits, data, size);
280 
282 
283  hr = IVMRImagePresenter9_PresentImage(This->presenter, This->cookie, info);
284  return hr;
285 }
GLint GLint GLsizei width
Definition: gl.h:1546
rwlock_t lock
Definition: tcpcore.h:1163
HRESULT hr
Definition: shlfolder.c:183
#define WARN(fmt,...)
Definition: debug.h:111
#define D3DLOCK_DISCARD
Definition: d3d8types.h:72
char * LPSTR
Definition: xmlstorage.h:182
#define FIXME(fmt,...)
Definition: debug.h:110
DWORD biCompression
Definition: amvideo.idl:35
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define VFW_E_RUNTIME_ERROR
Definition: vfwmsgs.h:50
LONG HRESULT
Definition: typedefs.h:77
const char * wine_dbgstr_rect(const RECT *rect)
DWORD biSizeImage
Definition: amvideo.idl:36
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
Definition: gl.h:1950
static __inline const char * debugstr_an(const char *s, int n)
Definition: compat.h:47
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define ERR(fmt,...)
Definition: debug.h:109
#define S_OK
Definition: intsafe.h:59
#define IDirect3DSurface9_UnlockRect(p)
Definition: d3d9.h:636
#define IDirect3DSurface9_LockRect(p, a, b, c)
Definition: d3d9.h:635
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by VMR9_DoRenderSample().

◆ VMR9_SetDefaultSourceRect()

static HRESULT WINAPI VMR9_SetDefaultSourceRect ( BaseControlVideo *  This)
static

Definition at line 693 of file vmr9.c.

694 {
695  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
696 
697  SetRect(&pVMR9->source_rect, 0, 0, pVMR9->VideoWidth, pVMR9->VideoHeight);
698 
699  return S_OK;
700 }
LONG VideoWidth
Definition: vmr9.c:93
LONG VideoHeight
Definition: vmr9.c:94
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define S_OK
Definition: intsafe.h:59
RECT source_rect
Definition: vmr9.c:91
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112

◆ VMR9_SetDefaultTargetRect()

static HRESULT WINAPI VMR9_SetDefaultTargetRect ( BaseControlVideo *  This)
static

Definition at line 702 of file vmr9.c.

703 {
704  RECT rect;
705  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
706 
707  if (!GetClientRect(pVMR9->baseControlWindow.baseWindow.hWnd, &rect))
708  return E_FAIL;
709 
710  SetRect(&pVMR9->target_rect, 0, 0, rect.right, rect.bottom);
711 
712  return S_OK;
713 }
#define E_FAIL
Definition: ddrawi.h:102
& rect
Definition: startmenu.cpp:1413
RECT target_rect
Definition: vmr9.c:92
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
BaseControlWindow baseControlWindow
Definition: vmr9.c:49

◆ VMR9_SetSourceRect()

static HRESULT WINAPI VMR9_SetSourceRect ( BaseControlVideo *  This,
RECT pSourceRect 
)
static

Definition at line 715 of file vmr9.c.

716 {
717  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
718  CopyRect(&pVMR9->source_rect,pSourceRect);
719  return S_OK;
720 }
#define S_OK
Definition: intsafe.h:59
RECT source_rect
Definition: vmr9.c:91
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)

◆ VMR9_SetTargetRect()

static HRESULT WINAPI VMR9_SetTargetRect ( BaseControlVideo *  This,
RECT pTargetRect 
)
static

Definition at line 722 of file vmr9.c.

723 {
724  struct quartz_vmr* pVMR9 = impl_from_BaseControlVideo(This);
725  CopyRect(&pVMR9->target_rect,pTargetRect);
726  return S_OK;
727 }
RECT target_rect
Definition: vmr9.c:92
#define S_OK
Definition: intsafe.h:59
static struct quartz_vmr * impl_from_BaseControlVideo(BaseControlVideo *cvid)
Definition: vmr9.c:112
BOOL WINAPI CopyRect(_Out_ LPRECT, _In_ LPCRECT)

◆ VMR9_ShouldDrawSampleNow()

static HRESULT WINAPI VMR9_ShouldDrawSampleNow ( BaseRenderer This,
IMediaSample pSample,
REFERENCE_TIME pStartTime,
REFERENCE_TIME pEndTime 
)
static

Definition at line 474 of file vmr9.c.

475 {
476  /* Preroll means the sample isn't shown, this is used for key frames and things like that */
477  if (IMediaSample_IsPreroll(pSample) == S_OK)
478  return E_FAIL;
479  return S_FALSE;
480 }
#define E_FAIL
Definition: ddrawi.h:102
#define S_FALSE
Definition: winerror.h:2357
#define S_OK
Definition: intsafe.h:59

◆ VMR9_SurfaceAllocator_AddRef()

static ULONG WINAPI VMR9_SurfaceAllocator_AddRef ( IVMRSurfaceAllocatorEx9 iface)
static

Definition at line 2674 of file vmr9.c.

2675 {
2677 
2678  return VMR9_ImagePresenter_AddRef(&This->IVMRImagePresenter9_iface);
2679 }
static ULONG WINAPI VMR9_ImagePresenter_AddRef(IVMRImagePresenter9 *iface)
Definition: vmr9.c:2482
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202

◆ VMR9_SurfaceAllocator_AdviseNotify()

static HRESULT WINAPI VMR9_SurfaceAllocator_AdviseNotify ( IVMRSurfaceAllocatorEx9 iface,
IVMRSurfaceAllocatorNotify9 allocnotify 
)
static

Definition at line 3025 of file vmr9.c.

3026 {
3028 
3029  TRACE("(%p/%p)->(...)\n", iface, This);
3030 
3031  /* No AddRef taken here or the base VMR9 filter would never be destroyed */
3032  This->SurfaceAllocatorNotify = allocnotify;
3033  return S_OK;
3034 }
#define TRACE(s)
Definition: solgame.cpp:4
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202
#define S_OK
Definition: intsafe.h:59

◆ VMR9_SurfaceAllocator_GetSurface()

static HRESULT WINAPI VMR9_SurfaceAllocator_GetSurface ( IVMRSurfaceAllocatorEx9 iface,
DWORD_PTR  id,
DWORD  surfaceindex,
DWORD  flags,
IDirect3DSurface9 **  surface 
)
static

Definition at line 3001 of file vmr9.c.

3002 {
3004 
3005  /* Update everything first, this is needed because the surface might be destroyed in the reset */
3006  if (!This->d3d9_dev)
3007  {
3008  TRACE("Device has left me!\n");
3009  return E_FAIL;
3010  }
3011 
3013 
3014  if (surfaceindex >= This->num_surfaces)
3015  {
3016  ERR("surfaceindex is greater than num_surfaces\n");
3017  return E_FAIL;
3018  }
3019  *surface = This->d3d9_surfaces[surfaceindex];
3020  IDirect3DSurface9_AddRef(*surface);
3021 
3022  return S_OK;
3023 }
#define E_FAIL
Definition: ddrawi.h:102
#define TRACE(s)
Definition: solgame.cpp:4
#define IDirect3DSurface9_AddRef(p)
Definition: d3d9.h:621
#define ERR(fmt,...)
Definition: debug.h:109
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202
#define S_OK
Definition: intsafe.h:59
static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset(VMR9DefaultAllocatorPresenterImpl *This)
Definition: vmr9.c:2892

◆ VMR9_SurfaceAllocator_InitializeDevice()

static HRESULT WINAPI VMR9_SurfaceAllocator_InitializeDevice ( IVMRSurfaceAllocatorEx9 iface,
DWORD_PTR  id,
VMR9AllocationInfo allocinfo,
DWORD numbuffers 
)
static

Definition at line 2852 of file vmr9.c.

2853 {
2855 
2856  if (This->pVMR9->mode != VMR9Mode_Windowed && !This->pVMR9->hWndClippingWindow)
2857  {
2858  ERR("No window set\n");
2859  return VFW_E_WRONG_STATE;
2860  }
2861 
2862  This->info = *allocinfo;
2863 
2864  if (!CreateRenderingWindow(This, allocinfo, numbuffers))
2865  {
2866  ERR("Failed to create rendering window, expect no output!\n");
2867  return VFW_E_WRONG_STATE;
2868  }
2869 
2870  return S_OK;
2871 }
#define ERR(fmt,...)
Definition: debug.h:109
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202
#define S_OK
Definition: intsafe.h:59
#define VFW_E_WRONG_STATE
Definition: vfwmsgs.h:78
static BOOL CreateRenderingWindow(VMR9DefaultAllocatorPresenterImpl *This, VMR9AllocationInfo *info, DWORD *numbuffers)
Definition: vmr9.c:2790

◆ VMR9_SurfaceAllocator_QueryInterface()

static HRESULT WINAPI VMR9_SurfaceAllocator_QueryInterface ( IVMRSurfaceAllocatorEx9 iface,
REFIID  riid,
LPVOID ppv 
)
static

Definition at line 2667 of file vmr9.c.

2668 {
2670 
2671  return VMR9_ImagePresenter_QueryInterface(&This->IVMRImagePresenter9_iface, riid, ppv);
2672 }
REFIID riid
Definition: precomp.h:44
REFIID LPVOID * ppv
Definition: atlbase.h:39
static HRESULT WINAPI VMR9_ImagePresenter_QueryInterface(IVMRImagePresenter9 *iface, REFIID riid, LPVOID *ppv)
Definition: vmr9.c:2457
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202

◆ VMR9_SurfaceAllocator_Release()

static ULONG WINAPI VMR9_SurfaceAllocator_Release ( IVMRSurfaceAllocatorEx9 iface)
static

Definition at line 2681 of file vmr9.c.

2682 {
2684 
2685  return VMR9_ImagePresenter_Release(&This->IVMRImagePresenter9_iface);
2686 }
static ULONG WINAPI VMR9_ImagePresenter_Release(IVMRImagePresenter9 *iface)
Definition: vmr9.c:2492
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202

◆ VMR9_SurfaceAllocator_SetAllocationSettings()

static HRESULT VMR9_SurfaceAllocator_SetAllocationSettings ( VMR9DefaultAllocatorPresenterImpl This,
VMR9AllocationInfo allocinfo 
)
static

Definition at line 2688 of file vmr9.c.

2689 {
2690  D3DCAPS9 caps;
2691  UINT width, height;
2692  HRESULT hr;
2693 
2694  if (!(allocinfo->dwFlags & VMR9AllocFlag_TextureSurface))
2695  /* Only needed for texture surfaces */
2696  return S_OK;
2697 
2698  hr = IDirect3DDevice9_GetDeviceCaps(This->d3d9_dev, &caps);
2699  if (FAILED(hr))
2700  return hr;
2701 
2703  {
2704  width = allocinfo->dwWidth;
2705  height = allocinfo->dwHeight;
2706  }
2707  else
2708  {
2709  width = height = 1;
2711  width *= 2;
2712 
2714  height *= 2;
2715  FIXME("NPOW2 support missing, not using proper surfaces!\n");
2716  }
2717 
2719  {
2720  if (height > width)
2721  width = height;
2722  else
2723  height = width;
2724  FIXME("Square texture support required..\n");
2725  }
2726 
2727  hr = IDirect3DDevice9_CreateVertexBuffer(This->d3d9_dev, 4 * sizeof(struct VERTEX), D3DUSAGE_WRITEONLY, USED_FVF, allocinfo->Pool, &This->d3d9_vertex, NULL);
2728  if (FAILED(hr))
2729  {
2730  ERR("Couldn't create vertex buffer: %08x\n", hr);
2731  return hr;
2732  }
2733 
2734  This->reset = TRUE;
2735  allocinfo->dwHeight = height;
2736  allocinfo->dwWidth = width;
2737 
2738  return hr;
2739 }
#define IDirect3DDevice9_CreateVertexBuffer(p, a, b, c, d, e, f)
Definition: d3d9.h:1533
GLint GLint GLsizei width
Definition: gl.h:1546
#define D3DPTEXTURECAPS_POW2
Definition: d3d8caps.h:114
#define TRUE
Definition: types.h:120
DWORD TextureCaps
Definition: d3d9caps.h:279
HRESULT hr
Definition: shlfolder.c:183
#define D3DUSAGE_WRITEONLY
Definition: d3d8types.h:93
#define FIXME(fmt,...)
Definition: debug.h:110
#define D3DPTEXTURECAPS_SQUAREONLY
Definition: d3d8caps.h:116
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR dwHeight[]
Definition: provider.c:60
LONG HRESULT
Definition: typedefs.h:77
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
#define ERR(fmt,...)
Definition: debug.h:109
#define USED_FVF
Definition: vmr9.c:2545
#define S_OK
Definition: intsafe.h:59
Definition: vmr9.c:2546
#define IDirect3DDevice9_GetDeviceCaps(p, a)
Definition: d3d9.h:1514
unsigned int UINT
Definition: ndis.h:50
static const WCHAR dwWidth[]
Definition: provider.c:59

Referenced by CreateRenderingWindow().

◆ VMR9_SurfaceAllocator_TerminateDevice()

static HRESULT WINAPI VMR9_SurfaceAllocator_TerminateDevice ( IVMRSurfaceAllocatorEx9 iface,
DWORD_PTR  id 
)
static

Definition at line 2873 of file vmr9.c.

2874 {
2876 
2877  if (!This->pVMR9->baseControlWindow.baseWindow.hWnd)
2878  {
2879  return S_OK;
2880  }
2881 
2882  SendMessageW(This->pVMR9->baseControlWindow.baseWindow.hWnd, WM_CLOSE, 0, 0);
2883  PostThreadMessageW(This->tid, WM_QUIT, 0, 0);
2884  WaitForSingleObject(This->hWndThread, INFINITE);
2885  This->hWndThread = NULL;
2886  BaseWindowImpl_DoneWithWindow(&This->pVMR9->baseControlWindow.baseWindow);
2887 
2888  return S_OK;
2889 }
#define WM_QUIT
Definition: winuser.h:1605
HRESULT WINAPI BaseWindowImpl_DoneWithWindow(BaseWindow *This)
Definition: window.c:143
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
smooth NULL
Definition: ftsmooth.c:416
#define WM_CLOSE
Definition: winuser.h:1603
static VMR9DefaultAllocatorPresenterImpl * impl_from_IVMRSurfaceAllocatorEx9(IVMRSurfaceAllocatorEx9 *iface)
Definition: vmr9.c:202
#define S_OK
Definition: intsafe.h:59
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define INFINITE
Definition: serial.h:102
BOOL WINAPI PostThreadMessageW(_In_ DWORD, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

◆ VMR9_SurfaceAllocator_UpdateDeviceReset()

static HRESULT VMR9_SurfaceAllocator_UpdateDeviceReset ( VMR9DefaultAllocatorPresenterImpl This)
static

Definition at line 2892 of file vmr9.c.

2893 {
2894  struct VERTEX t_vert[4];
2895  UINT width, height;
2896  unsigned int i;
2897  void *bits = NULL;
2898  D3DPRESENT_PARAMETERS d3dpp;
2899  HRESULT hr;
2900 
2901  if (!This->pVMR9->baseControlWindow.baseWindow.hWnd)
2902  {
2903  ERR("No window\n");
2904  return E_FAIL;
2905  }
2906 
2907  if (!This->d3d9_surfaces || !This->reset)
2908  return S_OK;
2909 
2910  This->reset = FALSE;
2911  TRACE("RESETTING\n");
2912  if (This->d3d9_vertex)
2913  {
2914  IDirect3DVertexBuffer9_Release(This->d3d9_vertex);
2915  This->d3d9_vertex = NULL;
2916  }
2917 
2918  for (i = 0; i < This->num_surfaces; ++i)
2919  {
2920  IDirect3DSurface9 *surface = This->d3d9_surfaces[i];
2921  TRACE("Releasing surface %p\n", surface);
2922  if (surface)
2923  IDirect3DSurface9_Release(surface);
2924  }
2925  ZeroMemory(This->d3d9_surfaces, sizeof(IDirect3DSurface9 *) * This->num_surfaces);
2926 
2927  /* Now try to create the d3d9 device */
2928  ZeroMemory(&d3dpp, sizeof(d3dpp));
2929  d3dpp.Windowed = TRUE;
2930  d3dpp.hDeviceWindow = This->pVMR9->baseControlWindow.baseWindow.hWnd;
2932 
2933  if (This->d3d9_dev)
2934  IDirect3DDevice9_Release(This->d3d9_dev);
2935  This->d3d9_dev = NULL;