ReactOS 0.4.17-dev-934-g091855f
vmr7_presenter.c File Reference
#include "quartz_private.h"
#include "wine/debug.h"
Include dependency graph for vmr7_presenter.c:

Go to the source code of this file.

Classes

struct  vmr7_presenter
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (quartz)
 
static struct vmr7_presenter * impl_from_IVMRImagePresenter (IVMRImagePresenter *iface)
 
static HRESULT WINAPI image_presenter_QueryInterface (IVMRImagePresenter *iface, REFIID iid, void **out)
 
static ULONG WINAPI image_presenter_AddRef (IVMRImagePresenter *iface)
 
static ULONG WINAPI image_presenter_Release (IVMRImagePresenter *iface)
 
static HRESULT WINAPI image_presenter_StartPresenting (IVMRImagePresenter *iface, DWORD_PTR cookie)
 
static HRESULT WINAPI image_presenter_StopPresenting (IVMRImagePresenter *iface, DWORD_PTR cookie)
 
static HRESULT WINAPI image_presenter_PresentImage (IVMRImagePresenter *iface, DWORD_PTR cookie, VMRPRESENTATIONINFO *info)
 
static struct vmr7_presenter * impl_from_IVMRSurfaceAllocator (IVMRSurfaceAllocator *iface)
 
static HRESULT WINAPI surface_allocator_QueryInterface (IVMRSurfaceAllocator *iface, REFIID iid, void **out)
 
static ULONG WINAPI surface_allocator_AddRef (IVMRSurfaceAllocator *iface)
 
static ULONG WINAPI surface_allocator_Release (IVMRSurfaceAllocator *iface)
 
static HRESULT WINAPI surface_allocator_AllocateSurface (IVMRSurfaceAllocator *iface, DWORD_PTR id, VMRALLOCATIONINFO *info, DWORD *count, IDirectDrawSurface7 **surface)
 
static HRESULT WINAPI surface_allocator_FreeSurface (IVMRSurfaceAllocator *iface, DWORD_PTR id)
 
static HRESULT WINAPI surface_allocator_PrepareSurface (IVMRSurfaceAllocator *iface, DWORD_PTR id, IDirectDrawSurface7 *surface, DWORD flags)
 
static HRESULT WINAPI surface_allocator_AdviseNotify (IVMRSurfaceAllocator *iface, IVMRSurfaceAllocatorNotify *notify)
 
static struct vmr7_presenter * impl_from_IVMRWindowlessControl (IVMRWindowlessControl *iface)
 
static HRESULT WINAPI windowless_control_QueryInterface (IVMRWindowlessControl *iface, REFIID iid, void **out)
 
static ULONG WINAPI windowless_control_AddRef (IVMRWindowlessControl *iface)
 
static ULONG WINAPI windowless_control_Release (IVMRWindowlessControl *iface)
 
static HRESULT WINAPI windowless_control_GetNativeVideoSize (IVMRWindowlessControl *iface, LONG *width, LONG *height, LONG *aspect_width, LONG *aspect_height)
 
static HRESULT WINAPI windowless_control_GetMinIdealVideoSize (IVMRWindowlessControl *iface, LONG *width, LONG *height)
 
static HRESULT WINAPI windowless_control_GetMaxIdealVideoSize (IVMRWindowlessControl *iface, LONG *width, LONG *height)
 
static HRESULT WINAPI windowless_control_SetVideoPosition (IVMRWindowlessControl *iface, const RECT *source, const RECT *dest)
 
static HRESULT WINAPI windowless_control_GetVideoPosition (IVMRWindowlessControl *iface, RECT *source, RECT *dest)
 
static HRESULT WINAPI windowless_control_GetAspectRatioMode (IVMRWindowlessControl *iface, DWORD *mode)
 
static HRESULT WINAPI windowless_control_SetAspectRatioMode (IVMRWindowlessControl *iface, DWORD mode)
 
static HRESULT WINAPI windowless_control_SetVideoClippingWindow (IVMRWindowlessControl *iface, HWND window)
 
static HRESULT WINAPI windowless_control_RepaintVideo (IVMRWindowlessControl *iface, HWND window, HDC dc)
 
static HRESULT WINAPI windowless_control_DisplayModeChanged (IVMRWindowlessControl *iface)
 
static HRESULT WINAPI windowless_control_GetCurrentImage (IVMRWindowlessControl *iface, BYTE **image)
 
static HRESULT WINAPI windowless_control_SetBorderColor (IVMRWindowlessControl *iface, COLORREF color)
 
static HRESULT WINAPI windowless_control_GetBorderColor (IVMRWindowlessControl *iface, COLORREF *color)
 
static HRESULT WINAPI windowless_control_SetColorKey (IVMRWindowlessControl *iface, COLORREF color)
 
static HRESULT WINAPI windowless_control_GetColorKey (IVMRWindowlessControl *iface, COLORREF *color)
 
HRESULT vmr7_presenter_create (IUnknown *outer, IUnknown **out)
 

Variables

static const IVMRImagePresenterVtbl image_presenter_vtbl
 
static const IVMRSurfaceAllocatorVtbl surface_allocator_vtbl
 
static const IVMRWindowlessControlVtbl windowless_control_vtbl
 

Function Documentation

◆ image_presenter_AddRef()

static ULONG WINAPI image_presenter_AddRef ( IVMRImagePresenter *  iface)
static

Definition at line 70 of file vmr7_presenter.c.

71{
74
75 TRACE("%p increasing refcount to %lu.\n", presenter, refcount);
76 return refcount;
77}
#define InterlockedIncrement
Definition: armddk.h:53
#define TRACE(s)
Definition: solgame.cpp:4
LONG refcount
Definition: vmr7.c:3190
uint32_t ULONG
Definition: typedefs.h:59
static struct vmr7_presenter * impl_from_IVMRImagePresenter(IVMRImagePresenter *iface)

◆ image_presenter_PresentImage()

static HRESULT WINAPI image_presenter_PresentImage ( IVMRImagePresenter *  iface,
DWORD_PTR  cookie,
VMRPRESENTATIONINFO *  info 
)
static

Definition at line 108 of file vmr7_presenter.c.

110{
112 POINT point;
113 HRESULT hr;
114 RECT rect;
115
116 TRACE("iface %p, cookie %#Ix, info %p.\n", iface, cookie, info);
117
118 TRACE("flags %#lx, surface %p, start %s, end %s, aspect ratio %ldx%ld,\n",
119 info->dwFlags, info->lpSurf, debugstr_time(info->rtStart),
120 debugstr_time(info->rtEnd), info->szAspectRatio.cx, info->szAspectRatio.cy);
121 TRACE("src %s, dst %s, type-specific flags %#lx, interlace flags %#lx.\n",
122 wine_dbgstr_rect(&info->rcSrc), wine_dbgstr_rect(&info->rcDst),
123 info->dwTypeSpecificFlags, info->dwInterlaceFlags);
124
125 if (info->dwFlags & VMRSample_SrcDstRectsValid)
126 FIXME("Ignoring src/dst rects.\n");
127
128 GetClientRect(presenter->window, &rect);
129 point.x = point.y = 0;
130 ClientToScreen(presenter->window, &point);
132 if (FAILED(hr = IDirectDrawSurface7_Blt(presenter->primary, &rect, info->lpSurf, NULL, DDBLT_WAIT, NULL)))
133 ERR("Failed to blit, hr %#lx.\n", hr);
134
135 return S_OK;
136}
static const char * wine_dbgstr_rect(const RECT *prc)
Definition: atltest.h:160
#define FIXME(fmt,...)
Definition: precomp.h:53
#define ERR(fmt,...)
Definition: precomp.h:57
RECT rect
Definition: combotst.c:67
HRESULT hr
Definition: delayimp.cpp:582
#define NULL
Definition: types.h:112
@ VMRSample_SrcDstRectsValid
Definition: vmrender.idl:46
POINTL point
Definition: edittest.c:50
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
BOOL WINAPI ClientToScreen(_In_ HWND, _Inout_ LPPOINT)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI OffsetRect(_Inout_ LPRECT, _In_ int, _In_ int)
#define DDBLT_WAIT
Definition: ddraw.h:571
static const char * debugstr_time(REFERENCE_TIME time)
Definition: strmbase.h:32
Definition: dcommon.idl:28
LONG y
Definition: windef.h:130
LONG x
Definition: windef.h:129
Definition: cookie.c:34

◆ image_presenter_QueryInterface()

static HRESULT WINAPI image_presenter_QueryInterface ( IVMRImagePresenter *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 47 of file vmr7_presenter.c.

48{
50
51 TRACE("presenter %p, iid %s, out %p.\n", presenter, debugstr_guid(iid), out);
52
53 if (IsEqualGUID(iid, &IID_IUnknown) || IsEqualGUID(iid, &IID_IVMRImagePresenter))
54 *out = iface;
55 else if (IsEqualGUID(iid, &IID_IVMRSurfaceAllocator))
57 else if (IsEqualGUID(iid, &IID_IVMRWindowlessControl))
58 *out = &presenter->IVMRWindowlessControl_iface;
59 else
60 {
61 *out = NULL;
62 WARN("%s not implemented, returning E_NOINTERFACE.\n", debugstr_guid(iid));
63 return E_NOINTERFACE;
64 }
65
66 IUnknown_AddRef((IUnknown *)*out);
67 return S_OK;
68}
#define WARN(fmt,...)
Definition: precomp.h:61
const GUID IID_IUnknown
#define debugstr_guid
Definition: kernel32.h:35
#define IsEqualGUID(rguid1, rguid2)
Definition: guiddef.h:147
IVMRSurfaceAllocator IVMRSurfaceAllocator_iface
Definition: vmr7.c:3188
wchar_t tm const _CrtWcstime_Writes_and_advances_ptr_ count wchar_t ** out
Definition: wcsftime.cpp:383
#define E_NOINTERFACE
Definition: winerror.h:3479

◆ image_presenter_Release()

static ULONG WINAPI image_presenter_Release ( IVMRImagePresenter *  iface)
static

Definition at line 79 of file vmr7_presenter.c.

80{
83
84 TRACE("%p decreasing refcount to %lu.\n", presenter, refcount);
85 if (!refcount)
86 {
87 if (presenter->frontbuffer)
88 IDirectDrawSurface7_Release(presenter->frontbuffer);
89 IDirectDrawSurface7_Release(presenter->primary);
90 IDirectDraw7_Release(presenter->ddraw);
92 }
93 return refcount;
94}
#define InterlockedDecrement
Definition: armddk.h:52
#define free
Definition: debug_ros.c:5
IDirectDraw7 * ddraw
Definition: vmr7.c:3192

◆ image_presenter_StartPresenting()

static HRESULT WINAPI image_presenter_StartPresenting ( IVMRImagePresenter *  iface,
DWORD_PTR  cookie 
)
static

Definition at line 96 of file vmr7_presenter.c.

97{
98 FIXME("iface %p, cookie %#Ix, stub!\n", iface, cookie);
99 return E_NOTIMPL;
100}
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ image_presenter_StopPresenting()

static HRESULT WINAPI image_presenter_StopPresenting ( IVMRImagePresenter *  iface,
DWORD_PTR  cookie 
)
static

Definition at line 102 of file vmr7_presenter.c.

103{
104 FIXME("iface %p, cookie %#Ix, stub!\n", iface, cookie);
105 return E_NOTIMPL;
106}

◆ impl_from_IVMRImagePresenter()

static struct vmr7_presenter * impl_from_IVMRImagePresenter ( IVMRImagePresenter *  iface)
static

Definition at line 42 of file vmr7_presenter.c.

43{
44 return CONTAINING_RECORD(iface, struct vmr7_presenter, IVMRImagePresenter_iface);
45}
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260

Referenced by image_presenter_AddRef(), image_presenter_PresentImage(), image_presenter_QueryInterface(), and image_presenter_Release().

◆ impl_from_IVMRSurfaceAllocator()

static struct vmr7_presenter * impl_from_IVMRSurfaceAllocator ( IVMRSurfaceAllocator *  iface)
static

◆ impl_from_IVMRWindowlessControl()

static struct vmr7_presenter * impl_from_IVMRWindowlessControl ( IVMRWindowlessControl *  iface)
static

◆ surface_allocator_AddRef()

static ULONG WINAPI surface_allocator_AddRef ( IVMRSurfaceAllocator *  iface)
static

Definition at line 160 of file vmr7_presenter.c.

161{
163
164 return IVMRImagePresenter_AddRef(&presenter->IVMRImagePresenter_iface);
165}
IVMRImagePresenter IVMRImagePresenter_iface
Definition: vmr7.c:3189
static struct vmr7_presenter * impl_from_IVMRSurfaceAllocator(IVMRSurfaceAllocator *iface)

◆ surface_allocator_AdviseNotify()

static HRESULT WINAPI surface_allocator_AdviseNotify ( IVMRSurfaceAllocator *  iface,
IVMRSurfaceAllocatorNotify *  notify 
)
static

Definition at line 248 of file vmr7_presenter.c.

250{
251 FIXME("iface %p, notify %p, stub!\n", iface, notify);
252 return S_OK;
253}
int notify
Definition: msacm.c:1366

◆ surface_allocator_AllocateSurface()

static HRESULT WINAPI surface_allocator_AllocateSurface ( IVMRSurfaceAllocator *  iface,
DWORD_PTR  id,
VMRALLOCATIONINFO *  info,
DWORD *  count,
IDirectDrawSurface7 **  surface 
)
static

Definition at line 174 of file vmr7_presenter.c.

176{
178 DDSURFACEDESC2 surface_desc = {.dwSize = sizeof(surface_desc)};
179 HRESULT hr;
180
181 TRACE("presenter %p, id %#Ix, info %p, count %p, surface %p.\n", presenter, id, info, count, surface);
182
184 surface_desc.dwWidth = info->lpHdr->biWidth;
185 surface_desc.dwHeight = info->lpHdr->biHeight;
186 surface_desc.ddpfPixelFormat.dwSize = sizeof(surface_desc.ddpfPixelFormat);
188 surface_desc.dwBackBufferCount = *count;
189
190 if (info->lpHdr->biCompression == BI_RGB)
191 {
192 if (info->lpHdr->biBitCount != 32)
193 {
194 FIXME("Unhandled bit depth %u.\n", info->lpHdr->biBitCount);
195 return E_NOTIMPL;
196 }
197
198 surface_desc.ddpfPixelFormat.dwFlags = DDPF_RGB;
199 surface_desc.ddpfPixelFormat.dwRGBBitCount = 32;
200 surface_desc.ddpfPixelFormat.dwRBitMask = 0x00ff0000;
201 surface_desc.ddpfPixelFormat.dwGBitMask = 0x0000ff00;
202 surface_desc.ddpfPixelFormat.dwBBitMask = 0x000000ff;
203 }
204 else
205 {
206 surface_desc.ddpfPixelFormat.dwFlags = DDPF_FOURCC;
207 surface_desc.ddpfPixelFormat.dwFourCC = info->lpHdr->biCompression;
208 }
209
210 if (FAILED(hr = IDirectDraw7_CreateSurface(presenter->ddraw,
211 &surface_desc, &presenter->frontbuffer, NULL)))
212 {
213 WARN("Failed to create surface, hr %#lx.\n", hr);
214 return hr;
215 }
216 *surface = presenter->frontbuffer;
217 ++*count;
218
219 presenter->native_size = info->szNativeSize;
220 presenter->aspect_ratio = info->szAspectRatio;
221
222 return S_OK;
223}
#define DDPF_FOURCC
Definition: ddsformat.c:58
#define DDPF_RGB
Definition: ddsformat.c:60
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define DDSD_WIDTH
Definition: ddraw.h:212
#define DDSD_PIXELFORMAT
Definition: ddraw.h:218
#define DDSD_HEIGHT
Definition: ddraw.h:211
#define DDSCAPS_OFFSCREENPLAIN
Definition: ddraw.h:257
#define DDSCAPS_FLIP
Definition: ddraw.h:255
#define DDSD_CAPS
Definition: ddraw.h:210
#define DDSD_BACKBUFFERCOUNT
Definition: ddraw.h:214
#define DDSCAPS_COMPLEX
Definition: ddraw.h:254
DWORD dwBBitMask
Definition: ddraw.h:1108
DWORD dwSize
Definition: ddraw.h:1072
DWORD dwFourCC
Definition: ddraw.h:1074
DWORD dwRGBBitCount
Definition: ddraw.h:1077
DWORD dwRBitMask
Definition: ddraw.h:1087
DWORD dwGBitMask
Definition: ddraw.h:1096
DWORD dwFlags
Definition: ddraw.h:1073
DWORD dwCaps
Definition: ddraw.h:734
DWORD dwWidth
Definition: ddraw.h:1157
DWORD dwHeight
Definition: ddraw.h:1156
DDSCAPS2 ddsCaps
Definition: ddraw.h:1190
DDPIXELFORMAT ddpfPixelFormat
Definition: ddraw.h:1187
DWORD dwBackBufferCount
Definition: ddraw.h:1165
DWORD dwFlags
Definition: ddraw.h:1155
DWORD dwSize
Definition: ddraw.h:1154
#define BI_RGB
Definition: uefivid.c:46

◆ surface_allocator_FreeSurface()

static HRESULT WINAPI surface_allocator_FreeSurface ( IVMRSurfaceAllocator *  iface,
DWORD_PTR  id 
)
static

Definition at line 225 of file vmr7_presenter.c.

226{
228 DDSURFACEDESC2 surface_desc = {.dwSize = sizeof(surface_desc)};
229
230 TRACE("presenter %p, id %#Ix.\n", presenter, id);
231
232 if (presenter->frontbuffer)
233 {
234 IDirectDrawSurface7_Release(presenter->frontbuffer);
235 presenter->frontbuffer = NULL;
236 }
237
238 return S_OK;
239}

◆ surface_allocator_PrepareSurface()

static HRESULT WINAPI surface_allocator_PrepareSurface ( IVMRSurfaceAllocator *  iface,
DWORD_PTR  id,
IDirectDrawSurface7 *  surface,
DWORD  flags 
)
static

Definition at line 241 of file vmr7_presenter.c.

243{
244 TRACE("iface %p, id %#Ix, surface %p, flags %#lx.\n", iface, id, surface, flags);
245 return S_OK;
246}
GLbitfield flags
Definition: glext.h:7161

◆ surface_allocator_QueryInterface()

static HRESULT WINAPI surface_allocator_QueryInterface ( IVMRSurfaceAllocator *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 153 of file vmr7_presenter.c.

154{
156
157 return IVMRImagePresenter_QueryInterface(&presenter->IVMRImagePresenter_iface, iid, out);
158}

◆ surface_allocator_Release()

static ULONG WINAPI surface_allocator_Release ( IVMRSurfaceAllocator *  iface)
static

Definition at line 167 of file vmr7_presenter.c.

168{
170
171 return IVMRImagePresenter_Release(&presenter->IVMRImagePresenter_iface);
172}

◆ vmr7_presenter_create()

HRESULT vmr7_presenter_create ( IUnknown *  outer,
IUnknown **  out 
)

Definition at line 444 of file vmr7_presenter.c.

445{
446 struct vmr7_presenter *object;
447 HRESULT hr;
448
449 DDSURFACEDESC2 primary_desc =
450 {
451 .dwSize = sizeof(DDSURFACEDESC2),
453 .ddsCaps.dwCaps = DDSCAPS_PRIMARYSURFACE,
454 };
455
456 TRACE("outer %p, out %p.\n", outer, out);
457
458 if (outer)
459 FIXME("Ignoring outer %p.\n", outer);
460
461 if (!(object = calloc(1, sizeof(*object))))
462 return E_OUTOFMEMORY;
463 object->IVMRImagePresenter_iface.lpVtbl = &image_presenter_vtbl;
464 object->IVMRSurfaceAllocator_iface.lpVtbl = &surface_allocator_vtbl;
465 object->IVMRWindowlessControl_iface.lpVtbl = &windowless_control_vtbl;
466 object->refcount = 1;
467
468 if (FAILED(hr = DirectDrawCreateEx(NULL, (void **)&object->ddraw, &IID_IDirectDraw7, NULL)))
469 {
470 ERR("Failed to create ddraw object, hr %#lx.\n", hr);
471 free(object);
472 return hr;
473 }
474
475 if (FAILED(hr = IDirectDraw7_SetCooperativeLevel(object->ddraw, NULL, DDSCL_NORMAL)))
476 ERR("Failed to set cooperative level, hr %#lx.\n", hr);
477
478 if (FAILED(hr = IDirectDraw7_CreateSurface(object->ddraw, &primary_desc, &object->primary, NULL)))
479 ERR("Failed to create primary surface, hr %#lx.\n", hr);
480
481 TRACE("Created VMR7 default presenter %p.\n", object);
482 *out = (IUnknown *)&object->IVMRSurfaceAllocator_iface;
483 return S_OK;
484}
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI DirectDrawCreateEx(LPGUID lpGUID, LPVOID *lplpDD, REFIID id, LPUNKNOWN pUnkOuter)
Definition: main.c:139
static IUnknown * outer
Definition: compobj.c:82
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
#define calloc
Definition: rosglue.h:14
#define DDSCL_NORMAL
Definition: ddraw.h:537
struct _DDSURFACEDESC2 DDSURFACEDESC2
#define DDSCAPS_PRIMARYSURFACE
Definition: ddraw.h:260
static const IVMRSurfaceAllocatorVtbl surface_allocator_vtbl
static const IVMRWindowlessControlVtbl windowless_control_vtbl
static const IVMRImagePresenterVtbl image_presenter_vtbl

Referenced by filter_config_SetRenderingMode().

◆ windowless_control_AddRef()

static ULONG WINAPI windowless_control_AddRef ( IVMRWindowlessControl *  iface)
static

Definition at line 278 of file vmr7_presenter.c.

279{
281
282 return IVMRImagePresenter_AddRef(&presenter->IVMRImagePresenter_iface);
283}
static struct vmr7_presenter * impl_from_IVMRWindowlessControl(IVMRWindowlessControl *iface)

◆ windowless_control_DisplayModeChanged()

static HRESULT WINAPI windowless_control_DisplayModeChanged ( IVMRWindowlessControl *  iface)
static

Definition at line 386 of file vmr7_presenter.c.

387{
388 FIXME("iface %p, stub!\n", iface);
389 return E_NOTIMPL;
390}

◆ windowless_control_GetAspectRatioMode()

static HRESULT WINAPI windowless_control_GetAspectRatioMode ( IVMRWindowlessControl *  iface,
DWORD *  mode 
)
static

Definition at line 343 of file vmr7_presenter.c.

345{
346 FIXME("iface %p, mode %p, stub!\n", iface, mode);
347 return E_NOTIMPL;
348}
GLenum mode
Definition: glext.h:6217

◆ windowless_control_GetBorderColor()

static HRESULT WINAPI windowless_control_GetBorderColor ( IVMRWindowlessControl *  iface,
COLORREF *  color 
)
static

Definition at line 404 of file vmr7_presenter.c.

405{
406 FIXME("iface %p, color %p, stub!\n", iface, color);
407 return E_NOTIMPL;
408}
GLuint color
Definition: glext.h:6243

◆ windowless_control_GetColorKey()

static HRESULT WINAPI windowless_control_GetColorKey ( IVMRWindowlessControl *  iface,
COLORREF *  color 
)
static

Definition at line 416 of file vmr7_presenter.c.

417{
418 FIXME("iface %p, color %p, stub!\n", iface, color);
419 return E_NOTIMPL;
420}

◆ windowless_control_GetCurrentImage()

static HRESULT WINAPI windowless_control_GetCurrentImage ( IVMRWindowlessControl *  iface,
BYTE **  image 
)
static

Definition at line 392 of file vmr7_presenter.c.

393{
394 FIXME("iface %p, image %p, stub!\n", iface, image);
395 return E_NOTIMPL;
396}
Definition: image.c:84

◆ windowless_control_GetMaxIdealVideoSize()

static HRESULT WINAPI windowless_control_GetMaxIdealVideoSize ( IVMRWindowlessControl *  iface,
LONG *  width,
LONG *  height 
)
static

Definition at line 322 of file vmr7_presenter.c.

324{
325 FIXME("iface %p, width %p, height %p, stub!\n", iface, width, height);
326 return E_NOTIMPL;
327}
GLint GLint GLsizei GLsizei height
Definition: gl.h:1546
GLint GLint GLsizei width
Definition: gl.h:1546

◆ windowless_control_GetMinIdealVideoSize()

static HRESULT WINAPI windowless_control_GetMinIdealVideoSize ( IVMRWindowlessControl *  iface,
LONG *  width,
LONG *  height 
)
static

Definition at line 315 of file vmr7_presenter.c.

317{
318 FIXME("iface %p, width %p, height %p, stub!\n", iface, width, height);
319 return E_NOTIMPL;
320}

◆ windowless_control_GetNativeVideoSize()

static HRESULT WINAPI windowless_control_GetNativeVideoSize ( IVMRWindowlessControl *  iface,
LONG *  width,
LONG *  height,
LONG *  aspect_width,
LONG *  aspect_height 
)
static

Definition at line 292 of file vmr7_presenter.c.

294{
296
297 TRACE("iface %p, width %p, height %p, aspect_width %p, aspect_height %p.\n",
298 iface, width, height, aspect_width, aspect_height);
299
300 if (width)
301 *width = presenter->native_size.cx;
302 if (height)
303 *height = presenter->native_size.cy;
304 if (aspect_width)
305 *aspect_width = presenter->aspect_ratio.cx;
306 if (aspect_height)
307 *aspect_height = presenter->aspect_ratio.cy;
308
309 TRACE("Returning size (%ld, %ld), aspect ratio (%ld, %ld).\n",
310 presenter->native_size.cx, presenter->native_size.cy,
311 presenter->aspect_ratio.cx, presenter->aspect_ratio.cy);
312 return S_OK;
313}

◆ windowless_control_GetVideoPosition()

static HRESULT WINAPI windowless_control_GetVideoPosition ( IVMRWindowlessControl *  iface,
RECT *  source,
RECT *  dest 
)
static

Definition at line 336 of file vmr7_presenter.c.

338{
339 FIXME("iface %p, source %p, dest %p.\n", iface, source, dest);
340 return E_NOTIMPL;
341}
static char * dest
Definition: rtl.c:149

◆ windowless_control_QueryInterface()

static HRESULT WINAPI windowless_control_QueryInterface ( IVMRWindowlessControl *  iface,
REFIID  iid,
void **  out 
)
static

Definition at line 271 of file vmr7_presenter.c.

272{
274
275 return IVMRImagePresenter_QueryInterface(&presenter->IVMRImagePresenter_iface, iid, out);
276}

◆ windowless_control_Release()

static ULONG WINAPI windowless_control_Release ( IVMRWindowlessControl *  iface)
static

Definition at line 285 of file vmr7_presenter.c.

286{
288
289 return IVMRImagePresenter_Release(&presenter->IVMRImagePresenter_iface);
290}

◆ windowless_control_RepaintVideo()

static HRESULT WINAPI windowless_control_RepaintVideo ( IVMRWindowlessControl *  iface,
HWND  window,
HDC  dc 
)
static

Definition at line 379 of file vmr7_presenter.c.

381{
382 FIXME("iface %p, window %p, dc %p, stub!\n", iface, window, dc);
383 return E_NOTIMPL;
384}
HDC dc
Definition: cylfrac.c:34
static IHTMLWindow2 * window
Definition: events.c:77

◆ windowless_control_SetAspectRatioMode()

static HRESULT WINAPI windowless_control_SetAspectRatioMode ( IVMRWindowlessControl *  iface,
DWORD  mode 
)
static

Definition at line 350 of file vmr7_presenter.c.

352{
353 FIXME("iface %p, mode %#lx, stub!\n", iface, mode);
354 return E_NOTIMPL;
355}

◆ windowless_control_SetBorderColor()

static HRESULT WINAPI windowless_control_SetBorderColor ( IVMRWindowlessControl *  iface,
COLORREF  color 
)
static

Definition at line 398 of file vmr7_presenter.c.

399{
400 FIXME("iface %p, color %#08lx, stub!\n", iface, color);
401 return E_NOTIMPL;
402}

◆ windowless_control_SetColorKey()

static HRESULT WINAPI windowless_control_SetColorKey ( IVMRWindowlessControl *  iface,
COLORREF  color 
)
static

Definition at line 410 of file vmr7_presenter.c.

411{
412 FIXME("iface %p, color %#08lx, stub!\n", iface, color);
413 return E_NOTIMPL;
414}

◆ windowless_control_SetVideoClippingWindow()

static HRESULT WINAPI windowless_control_SetVideoClippingWindow ( IVMRWindowlessControl *  iface,
HWND  window 
)
static

Definition at line 357 of file vmr7_presenter.c.

359{
361 IDirectDrawClipper *clipper;
362 HRESULT hr;
363
364 TRACE("iface %p, window %p.\n", iface, window);
365
366 if (FAILED(hr = IDirectDraw7_CreateClipper(presenter->ddraw, 0, &clipper, NULL)))
367 ERR("Failed to create clipper, hr %#lx.\n", hr);
368 if (FAILED(hr = IDirectDrawClipper_SetHWnd(clipper, 0, window)))
369 ERR("Failed to set clip window, hr %#lx.\n", hr);
370 if (FAILED(hr = IDirectDrawSurface7_SetClipper(presenter->primary, clipper)))
371 ERR("Failed to set clipper, hr %#lx.\n", hr);
372 IDirectDrawClipper_Release(clipper);
373
374 presenter->window = window;
375
376 return S_OK;
377}

◆ windowless_control_SetVideoPosition()

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

Definition at line 329 of file vmr7_presenter.c.

331{
332 FIXME("iface %p, source %s, dest %s, stub!.\n", iface, wine_dbgstr_rect(source), wine_dbgstr_rect(dest));
333 return E_NOTIMPL;
334}

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( quartz  )

Variable Documentation

◆ image_presenter_vtbl

const IVMRImagePresenterVtbl image_presenter_vtbl
static
Initial value:
=
{
}
static ULONG WINAPI image_presenter_Release(IVMRImagePresenter *iface)
static HRESULT WINAPI image_presenter_QueryInterface(IVMRImagePresenter *iface, REFIID iid, void **out)
static HRESULT WINAPI image_presenter_PresentImage(IVMRImagePresenter *iface, DWORD_PTR cookie, VMRPRESENTATIONINFO *info)
static ULONG WINAPI image_presenter_AddRef(IVMRImagePresenter *iface)
static HRESULT WINAPI image_presenter_StartPresenting(IVMRImagePresenter *iface, DWORD_PTR cookie)
static HRESULT WINAPI image_presenter_StopPresenting(IVMRImagePresenter *iface, DWORD_PTR cookie)

Definition at line 138 of file vmr7_presenter.c.

Referenced by vmr7_presenter_create().

◆ surface_allocator_vtbl

const IVMRSurfaceAllocatorVtbl surface_allocator_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI surface_allocator_QueryInterface(IVMRSurfaceAllocator *iface, REFIID iid, void **out)
static ULONG WINAPI surface_allocator_AddRef(IVMRSurfaceAllocator *iface)
static HRESULT WINAPI surface_allocator_FreeSurface(IVMRSurfaceAllocator *iface, DWORD_PTR id)
static ULONG WINAPI surface_allocator_Release(IVMRSurfaceAllocator *iface)
static HRESULT WINAPI surface_allocator_AdviseNotify(IVMRSurfaceAllocator *iface, IVMRSurfaceAllocatorNotify *notify)
static HRESULT WINAPI surface_allocator_AllocateSurface(IVMRSurfaceAllocator *iface, DWORD_PTR id, VMRALLOCATIONINFO *info, DWORD *count, IDirectDrawSurface7 **surface)
static HRESULT WINAPI surface_allocator_PrepareSurface(IVMRSurfaceAllocator *iface, DWORD_PTR id, IDirectDrawSurface7 *surface, DWORD flags)

Definition at line 255 of file vmr7_presenter.c.

Referenced by vmr7_presenter_create().

◆ windowless_control_vtbl

const IVMRWindowlessControlVtbl windowless_control_vtbl
static
Initial value:
=
{
}
static HRESULT WINAPI windowless_control_GetBorderColor(IVMRWindowlessControl *iface, COLORREF *color)
static HRESULT WINAPI windowless_control_GetMaxIdealVideoSize(IVMRWindowlessControl *iface, LONG *width, LONG *height)
static HRESULT WINAPI windowless_control_SetVideoClippingWindow(IVMRWindowlessControl *iface, HWND window)
static ULONG WINAPI windowless_control_AddRef(IVMRWindowlessControl *iface)
static HRESULT WINAPI windowless_control_RepaintVideo(IVMRWindowlessControl *iface, HWND window, HDC dc)
static HRESULT WINAPI windowless_control_SetVideoPosition(IVMRWindowlessControl *iface, const RECT *source, const RECT *dest)
static HRESULT WINAPI windowless_control_SetBorderColor(IVMRWindowlessControl *iface, COLORREF color)
static HRESULT WINAPI windowless_control_GetMinIdealVideoSize(IVMRWindowlessControl *iface, LONG *width, LONG *height)
static HRESULT WINAPI windowless_control_SetAspectRatioMode(IVMRWindowlessControl *iface, DWORD mode)
static ULONG WINAPI windowless_control_Release(IVMRWindowlessControl *iface)
static HRESULT WINAPI windowless_control_SetColorKey(IVMRWindowlessControl *iface, COLORREF color)
static HRESULT WINAPI windowless_control_QueryInterface(IVMRWindowlessControl *iface, REFIID iid, void **out)
static HRESULT WINAPI windowless_control_GetNativeVideoSize(IVMRWindowlessControl *iface, LONG *width, LONG *height, LONG *aspect_width, LONG *aspect_height)
static HRESULT WINAPI windowless_control_GetAspectRatioMode(IVMRWindowlessControl *iface, DWORD *mode)
static HRESULT WINAPI windowless_control_GetVideoPosition(IVMRWindowlessControl *iface, RECT *source, RECT *dest)
static HRESULT WINAPI windowless_control_DisplayModeChanged(IVMRWindowlessControl *iface)
static HRESULT WINAPI windowless_control_GetCurrentImage(IVMRWindowlessControl *iface, BYTE **image)
static HRESULT WINAPI windowless_control_GetColorKey(IVMRWindowlessControl *iface, COLORREF *color)

Definition at line 422 of file vmr7_presenter.c.

Referenced by vmr7_presenter_create().