From df332d1c1df25efc949cb4a7212f5a538264895e Mon Sep 17 00:00:00 2001 From: Maarten Lankhorst Date: Wed, 9 Jul 2008 15:46:21 -0700 Subject: [PATCH] headers: Add support for video mixing renderer 7 --- dlls/amstream/regsvr.c | 1 + dlls/devenum/devenum_private.h | 1 + dlls/dmusic/Makefile.in | 2 +- dlls/dsound/Makefile.in | 2 +- dlls/dxdiagn/regsvr.c | 1 - dlls/dxguid/dxguid.c | 6 + dlls/objsel/objsel_private.h | 1 + dlls/qcap/capturegraph.c | 9 +- dlls/qcap/dllsetup.c | 1 + dlls/qcap/dllsetup.h | 1 + dlls/qcap/qcap_main.c | 3 +- dlls/qcap/yuv.c | 2 + dlls/qedit/tests/mediadet.c | 3 + dlls/quartz/regsvr.c | 2 + dlls/strmiids/strmiids.c | 1 + include/axcore.idl | 3 +- include/dmdls.h | 3 + include/strmif.idl | 3 + include/vmrender.idl | 484 ++++++++++++++++++++++++++++++++++++++++ 19 files changed, 517 insertions(+), 12 deletions(-) create mode 100644 include/vmrender.idl diff --git a/dlls/amstream/regsvr.c b/dlls/amstream/regsvr.c index 478818f..e356bfe 100644 --- a/dlls/amstream/regsvr.c +++ b/dlls/amstream/regsvr.c @@ -30,6 +30,7 @@ #include "ole2.h" +#include "ddraw.h" #include "amstream.h" #include "wine/debug.h" diff --git a/dlls/devenum/devenum_private.h b/dlls/devenum/devenum_private.h index b50afb8..2595aa5 100644 --- a/dlls/devenum/devenum_private.h +++ b/dlls/devenum/devenum_private.h @@ -34,6 +34,7 @@ #define COBJMACROS #include "ole2.h" +#include "ddraw.h" #include "strmif.h" #include "olectl.h" #include "wine/unicode.h" diff --git a/dlls/dmusic/Makefile.in b/dlls/dmusic/Makefile.in index a3c114a..5760a44 100644 --- a/dlls/dmusic/Makefile.in +++ b/dlls/dmusic/Makefile.in @@ -3,7 +3,7 @@ TOPOBJDIR = ../.. SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = dmusic.dll -IMPORTS = dxguid uuid ole32 user32 advapi32 kernel32 +IMPORTS = dxguid strmiids uuid ole32 user32 advapi32 kernel32 C_SRCS = \ buffer.c \ diff --git a/dlls/dsound/Makefile.in b/dlls/dsound/Makefile.in index e6892c1..d4f1006 100644 --- a/dlls/dsound/Makefile.in +++ b/dlls/dsound/Makefile.in @@ -4,7 +4,7 @@ SRCDIR = @srcdir@ VPATH = @srcdir@ MODULE = dsound.dll IMPORTLIB = dsound -IMPORTS = dxguid uuid winmm ole32 user32 advapi32 kernel32 ntdll +IMPORTS = dxguid strmiids uuid winmm ole32 user32 advapi32 kernel32 ntdll C_SRCS = \ buffer.c \ diff --git a/dlls/dxdiagn/regsvr.c b/dlls/dxdiagn/regsvr.c index 949c4d2..7b79184 100644 --- a/dlls/dxdiagn/regsvr.c +++ b/dlls/dxdiagn/regsvr.c @@ -28,7 +28,6 @@ #include "winreg.h" #include "winerror.h" -#include "initguid.h" #include "dxdiag_private.h" #include "wine/debug.h" diff --git a/dlls/dxguid/dxguid.c b/dlls/dxguid/dxguid.c index 4f34a4f..b04e30f 100644 --- a/dlls/dxguid/dxguid.c +++ b/dlls/dxguid/dxguid.c @@ -33,6 +33,12 @@ #include "d3d.h" #include "ddraw.h" + +#undef INITGUID +#include "guiddef.h" +#include "strmif.h" +#include "initguid.h" + #include "mmsystem.h" #include "dsound.h" #include "dsconf.h" diff --git a/dlls/objsel/objsel_private.h b/dlls/objsel/objsel_private.h index 8c9a3c8..35de705 100644 --- a/dlls/objsel/objsel_private.h +++ b/dlls/objsel/objsel_private.h @@ -31,6 +31,7 @@ #define COBJMACROS #include "ole2.h" +#include "ddraw.h" #include "strmif.h" #include "olectl.h" #include "unknwn.h" diff --git a/dlls/qcap/capturegraph.c b/dlls/qcap/capturegraph.c index f439f3b..e9829f6 100644 --- a/dlls/qcap/capturegraph.c +++ b/dlls/qcap/capturegraph.c @@ -28,19 +28,16 @@ #include "windef.h" #include "winbase.h" +#include "wingdi.h" #include "winerror.h" #include "objbase.h" #include "evcode.h" +#include "ddraw.h" #include "strmif.h" + #include "control.h" #include "vfwmsgs.h" -/* - *#include "amvideo.h" - *#include "mmreg.h" - *#include "dshow.h" - *#include "ddraw.h" - */ #include "qcap_main.h" #include "wine/unicode.h" diff --git a/dlls/qcap/dllsetup.c b/dlls/qcap/dllsetup.c index 850e6b0..490eb6d 100644 --- a/dlls/qcap/dllsetup.c +++ b/dlls/qcap/dllsetup.c @@ -29,6 +29,7 @@ #include "windef.h" #include "winbase.h" #include "winerror.h" +#include "wingdi.h" #include "winreg.h" #include "objbase.h" #include "uuids.h" diff --git a/dlls/qcap/dllsetup.h b/dlls/qcap/dllsetup.h index 4b587ac..677a6d0 100644 --- a/dlls/qcap/dllsetup.h +++ b/dlls/qcap/dllsetup.h @@ -22,6 +22,7 @@ #define _QCAP_DLLSETUP_H_DEFINED #define COBJMACROS +#include "ddraw.h" #include "strmif.h" /* Filter Setup data structures not defined in axextend.idl diff --git a/dlls/qcap/qcap_main.c b/dlls/qcap/qcap_main.c index 93ae555..8e602db 100644 --- a/dlls/qcap/qcap_main.c +++ b/dlls/qcap/qcap_main.c @@ -30,11 +30,12 @@ #include "windef.h" #include "winbase.h" +#include "wingdi.h" #include "winerror.h" #include "objbase.h" #include "uuids.h" -#include "strmif.h" +#include "ddraw.h" #include "dllsetup.h" #include "qcap_main.h" diff --git a/dlls/qcap/yuv.c b/dlls/qcap/yuv.c index 29aa1f2..8df7484 100644 --- a/dlls/qcap/yuv.c +++ b/dlls/qcap/yuv.c @@ -24,7 +24,9 @@ #include #include "windef.h" +#include "wingdi.h" #include "objbase.h" +#include "ddraw.h" #include "strmif.h" #include "qcap_main.h" #include "wine/debug.h" diff --git a/dlls/qedit/tests/mediadet.c b/dlls/qedit/tests/mediadet.c index 2b43124..8c6d268 100644 --- a/dlls/qedit/tests/mediadet.c +++ b/dlls/qedit/tests/mediadet.c @@ -23,8 +23,11 @@ #define COBJMACROS #include "initguid.h" +#include "windef.h" +#include "wingdi.h" #include "ole2.h" #include "vfwmsgs.h" +#include "ddraw.h" #include "uuids.h" #include "wine/test.h" #include "qedit.h" diff --git a/dlls/quartz/regsvr.c b/dlls/quartz/regsvr.c index b6a131d..48c52a9 100644 --- a/dlls/quartz/regsvr.c +++ b/dlls/quartz/regsvr.c @@ -26,11 +26,13 @@ #include "windef.h" #include "winbase.h" +#include "wingdi.h" #include "winuser.h" #include "winreg.h" #include "winerror.h" #include "ole2.h" +#include "ddraw.h" #include "uuids.h" #include "strmif.h" diff --git a/dlls/strmiids/strmiids.c b/dlls/strmiids/strmiids.c index a257a23..08c8d6d 100644 --- a/dlls/strmiids/strmiids.c +++ b/dlls/strmiids/strmiids.c @@ -30,6 +30,7 @@ #include "oleauto.h" #include "olectl.h" #include "d3d9.h" +#include "ddraw.h" #include "initguid.h" diff --git a/include/axcore.idl b/include/axcore.idl index 52e6959..670f4a2 100644 --- a/include/axcore.idl +++ b/include/axcore.idl @@ -47,10 +47,9 @@ typedef enum _PinDirection cpp_quote("#define MAX_PIN_NAME 128") cpp_quote("#define MAX_FILTER_NAME 128") -typedef LONGLONG REFERENCE_TIME; - cpp_quote("#ifndef REFTIME_DEFINED") cpp_quote("#define REFTIME_DEFINED") +typedef LONGLONG REFERENCE_TIME, *LPREFERENCE_TIME; typedef DOUBLE REFTIME; cpp_quote("#endif") diff --git a/include/dmdls.h b/include/dmdls.h index e9f9501..9df8fdd 100644 --- a/include/dmdls.h +++ b/include/dmdls.h @@ -30,7 +30,10 @@ typedef long PCENT; typedef long PERCENT; typedef long TCENT; +#ifndef REFTIME_DEFINED typedef LONGLONG REFERENCE_TIME, *LPREFERENCE_TIME; +typedef DOUBLE REFTIME; +#endif /***************************************************************************** * FOURCC definition diff --git a/include/strmif.idl b/include/strmif.idl index 6ca3c17..a1cad6b 100644 --- a/include/strmif.idl +++ b/include/strmif.idl @@ -25,3 +25,6 @@ import "objidl.idl"; #include #include + +/* TODO: #include */ +#include diff --git a/include/vmrender.idl b/include/vmrender.idl new file mode 100644 index 0000000..0659dd1 --- /dev/null +++ b/include/vmrender.idl @@ -0,0 +1,484 @@ +/* + * Copyright (C) 2008 Maarten Lankhorst + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA + */ + +import "wtypes.idl"; + +cpp_quote("#if 0") +interface IDirectDrawSurface7; +interface IDirectDraw7; +typedef struct { } BITMAPINFOHEADER; + +typedef struct { } DDPIXELFORMAT; +typedef DWORD DDCOLORKEY; +cpp_quote("#endif") + +interface IVMRSurface; +interface IVMRSurfaceAllocator; +interface IVMRSurfaceAllocatorNotify; +interface IVMRImagePresenter; +interface IVMRImagePresenterNotify; +interface IVMRWindowlessControl; +interface IVMRMixerControl; +interface IVMRMixerBitmap; +interface IVMRFilterConfig; +interface IVMRAspectRatioControl; +interface IVMRDeinterlaceControl; +interface IVMRMonitorConfig; +interface IVMRImageCompositor; +interface IVMRVideoStreamControl; + +typedef enum _VMRPresentationFlags +{ + VMRSample_SyncPoint = 0x01, + VMRSample_Preroll = 0x02, + VMRSample_Discontinuity = 0x04, + VMRSample_TimeValid = 0x08, + VMRSample_SrcDstRectsValid = 0x10 +} VMRPresentationFlags; + +typedef struct tagVMRPRESENTATIONINFO +{ + DWORD dwFlags; + IDirectDrawSurface7 *lpSurf; + REFERENCE_TIME rtStart, rtEnd; + SIZE szAspectRatio; + RECT rcSrc, rcDst; + DWORD dwTypeSpecificFlags; + DWORD dwInterlaceFlags; +} VMRPRESENTATIONINFO; + +[ + local, + object, + uuid(ce704fe7-e71e-41fb-baa2-c4403e1182f5), + helpstring("IVMRImagePresenter interface"), + pointer_default(unique) +] +interface IVMRImagePresenter : IUnknown +{ + HRESULT StartPresenting([in] DWORD_PTR id); + HRESULT StopPresenting([in] DWORD_PTR id); + HRESULT PresentImage([in] DWORD_PTR id, [in] VMRPRESENTATIONINFO *info); +}; + +typedef enum _VMRSurfaceAllocationFlags +{ + AMAP_PIXELFORMAT_VALID = 0x01, + AMAP_3D_TARGET = 0x02, + AMAP_ALLOW_SYSMEM = 0x04, + AMAP_FORCE_SYSMEM = 0x08, + AMAP_DIRECTED_FLIP = 0x10, + AMAP_DXVA_TARGET = 0x20 +} VMRSurfaceAllocationFlags; + +typedef struct tagVMRALLOCATIONINFO +{ + DWORD dwFlags; + BITMAPINFOHEADER *lpHdr; + DDPIXELFORMAT *lpPixFmt; + SIZE szAspectRatio; + DWORD dwMinBuffers; + DWORD dwMaxBuffers; + DWORD dwInterlaceFlags; + SIZE szNativeSize; +} VMRALLOCATIONINFO; + +[ + local, + object, + uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52), + helpstring("IVMRSurfaceAllocator interface"), + pointer_default(unique) +] +interface IVMRSurfaceAllocator : IUnknown +{ + HRESULT AllocateSurface([in] DWORD_PTR id, [in] VMRALLOCATIONINFO *allocinfo, [in, out] DWORD *buffers, IDirectDrawSurface7 **surface); + HRESULT FreeSurface([in] DWORD_PTR id); + HRESULT PrepareSurface([in] DWORD_PTR id, [in] IDirectDrawSurface7 *surface, [in] DWORD dwSurfaceFlags); + HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify *notify); +}; + +[ + local, + object, + uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2), + helpstring("IVMRSurfaceAllocatorNotify interface"), + pointer_default(unique) +] +interface IVMRSurfaceAllocatorNotify : IUnknown +{ + HRESULT AdviseSurfaceAllocator([in] DWORD_PTR id, [in] IVMRSurfaceAllocator *allocator); + HRESULT SetDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor); + HRESULT ChangeDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor); + HRESULT RestoreDDrawSurfaces(); + HRESULT NotifyEvent([in] LONG EventCode, [in] LONG_PTR p1, [in] LONG_PTR p2); + HRESULT SetBorderColor([in] COLORREF border); +}; + +typedef enum _VMR_ASPECT_RATIO_MODE +{ + VMR_ARMODE_NONE, + VMR_ARMODE_LETTER_BOX +} VMR_ASPECT_RATIO_MODE; + +[ + local, + object, + uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7), + helpstring("IVMRWindowlessControl interface"), + pointer_default(unique) +] +interface IVMRWindowlessControl : IUnknown +{ + HRESULT GetNativeVideoSize([out] LONG *width, [out] LONG *height, [out] LONG *ar_width, [out] LONG *ar_height); + HRESULT GetMinIdealVideoSize([out] LONG *width, [out] LONG *height); + HRESULT GetMaxIdealVideoSize([out] LONG *width, [out] LONG *height); + HRESULT SetVideoPosition([in] const RECT *src_rect, [in] const RECT *dst_rect); + HRESULT GetVideoPosition([out] RECT *src_rect, [out] RECT *dst_rect); + HRESULT GetAspectRatioMode([out] DWORD *mode); + HRESULT SetAspectRatioMode([in] DWORD mode); + HRESULT SetVideoClippingWindow([in] HWND hwnd); + HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc); + HRESULT DisplayModeChanged(); + HRESULT GetCurrentImage([out] BYTE **data); + HRESULT SetBorderColor([in] COLORREF border); + HRESULT GetBorderColor([out] COLORREF *border); + HRESULT SetColorKey([in] COLORREF key); + HRESULT GetColorKey([out] COLORREF *key); +}; + +typedef enum _VMRMixerPrefs +{ + MixerPref_NoDecimation = 0x0001, + MixerPref_DecimateOutput = 0x0002, + MixerPref_ARAdjustXorY = 0x0004, + MixerPref_DecimationReserved = 0x0008, + MixerPref_DecimateMask = 0x000f, + + MixerPref_BiLinearFiltering = 0x0010, + MixerPref_PointFiltering = 0x0020, + MixerPref_FinteringMask = 0x00f0, + + MixerPref_RenderTargetRGB = 0x0100, + MixerPref_RenderTargetYUV = 0x1000, + MixerPref_RenderTargetYUV420 = 0x0200, + MixerPref_RenderTargetYUV422 = 0x0400, + MixerPref_RenderTargetYUV444 = 0x0800, + MixerPref_RenderTargetReserved = 0xe000, + MixerPref_RenderTargetMask = 0xff00, + + MixerPref_DynamicSwitchToBOB = 0x10000, + MixerPref_DynamicDecimateBy2 = 0x20000, + MixerPref_DynamicReserved = 0xc0000, + MixerPref_DynamicMask = 0xf0000 +} VMRMixerPrefs; + +typedef struct _NORMALIZEDRECT +{ + FLOAT left, top, right, bottom; +} NORMALIZEDRECT; + +[ + local, + object, + uuid(1c1a17b0-bed0-415d-974b-dc6696131599), + helpstring("IVMRMixerControl interface"), + pointer_default(unique) +] +interface IVMRMixerControl : IUnknown +{ + HRESULT SetAlpha([in] DWORD id, [in] FLOAT alpha); + HRESULT GetAlpha([in] DWORD id, [out] FLOAT *alpha); + HRESULT SetZOrder([in] DWORD id, [in] DWORD z); + HRESULT GetZOrder([in] DWORD id, [out] DWORD *z); + HRESULT SetOutputRect([in] DWORD id, [in] const NORMALIZEDRECT *rect); + HRESULT SetBackgroundClr([in] COLORREF background); + HRESULT GetBackgroundClr([out] COLORREF *background); + HRESULT SetMixingPrefs([in] DWORD prefs); + HRESULT GetMixingPrefs([out] DWORD *prefs); +}; + +typedef struct tagVMRGUID +{ + GUID *pGUID, GUID; +} VMRGUID; + +#define VMRDEVICENAMELEN 32 +#define VMRDEVICEDESCRIPTIONLEN 256 + +typedef struct tagVMRMONITORINFO +{ + VMRGUID guid; + RECT rcMonitor; + HMONITOR hMon; + DWORD dwFlags; + WCHAR szDevice[VMRDEVICENAMELEN]; + WCHAR szDescription[VMRDEVICEDESCRIPTIONLEN]; + LARGE_INTEGER liDriverVersion; + DWORD dwVendorId; + DWORD dwDeviceId; + DWORD dwSubSysId; + DWORD dwRevision; +} VMRMONITORINFO; + +[ + local, + object, + uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce), + helpstring("IVMRMonitorConfig interface"), + pointer_default(unique) +] +interface IVMRMonitorConfig : IUnknown +{ + HRESULT SetMonitor([in] const VMRGUID *vmrguid); + HRESULT GetMonitor([out] VMRGUID *vmrguid); + HRESULT SetDefaultMonitor([in] const VMRGUID *vmrguid); + HRESULT GetDefaultMonitor([out] VMRGUID *vmrguid); + HRESULT GetAvailableMonitors([out, size_is(array_size)] VMRMONITORINFO *info, [in] DWORD array_size, [out] DWORD *retrieved); +} + +typedef enum _VMRRenderPrefs +{ + RenderPrefs_RestrictToInitialMonitor = 0x00, + RenderPrefs_ForceOffScreen = 0x01, + RenderPrefs_ForceOverlays = 0x02, + RenderPrefs_AllowOverlays = 0x00, + RenderPrefs_AllowOffscreen = 0x00, + RenderPrefs_DoNotRenderColorKeyAndBorder = 0x08, + RenderPrefs_Reserved = 0x10, + RenderPrefs_PreferAGPMemWhenMixing = 0x20, + RenderPrefs_Mask = 0x3f +} VMRRenderPrefs; + +typedef enum _VMRMode +{ + VMRMode_Windowed = 0x1, + VMRMode_Windowless = 0x2, + VMRMode_Renderless = 0x4, + VMRMODE_Mask = 0x7 +} VMRMode; + +enum { MAX_NUMBER_OF_STREAMS = 16 }; + +[ + local, + object, + uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36), + helpstring("IVMRFilterConfig interface"), + pointer_default(unique) +] +interface IVMRFilterConfig : IUnknown +{ + HRESULT SetImageCompositor([in] IVMRImageCompositor *compositor); + HRESULT SetNumberOfStreams([in] DWORD streams); + HRESULT GetNumberOfStreams([out] DWORD *streams); + HRESULT SetRenderingPrefs([in] DWORD prefs); + HRESULT GetRenderingPrefs([out] DWORD *prefs); + HRESULT SetRenderingMode([in] DWORD mode); + HRESULT GetRenderingMode([out] DWORD *mode); +}; + +[ + local, + object, + uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd), + helpstring("IVMRAspectRatioControl interface"), + pointer_default(unique) +] +interface IVMRAspectRatioControl : IUnknown +{ + HRESULT GetAspectRatioMode([out] DWORD *armode); + HRESULT SetAspectRatioMode([in] DWORD armode); +}; + +typedef enum _VMRDeinterlacePrefs +{ + DeinterlacePref_NextBest = 0x1, + DeinterlacePref_BOB = 0x2, + DeinterlacePref_Weave = 0x4, + DeinterlacePref_Mask = 0x7 +} VMRDeinterlacePrefs; + +typedef enum _VMRDeinterlaceTech +{ + DeinterlaceTech_Unknown = 0x00, + DeinterlaceTech_BOBLineReplicate = 0x01, + DeinterlaceTech_BOBVerticalStretch = 0x02, + DeinterlaceTech_MedianFiltering = 0x04, + DeinterlaceTech_EdgeFiltering = 0x08, + DeinterlaceTech_FieldAdaptive = 0x10, + DeinterlaceTech_PixelAdaptive = 0x20, + DeinterlaceTech_MotionVectorSteered = 0x80 +} VMRDeinterlaceTech; + +typedef struct _VMRFrequency +{ + DWORD dwNumerator, dwDenominator; +} VMRFrequency; + +typedef struct _VMRVideoDesc +{ + DWORD dwSize; + DWORD dwSampleWidth; + DWORD dwSampleHeight; + BOOL SingleFieldPerSample; + DWORD dwFourCC; + VMRFrequency InputSampleFreq; + VMRFrequency OutputFrameFreq; +} VMRVideoDesc; + +typedef struct _VMRDeinterlaceCaps +{ + DWORD dwSize; + DWORD dwNumPreviousOutputFrames; + DWORD dwNumForwardRefSamples; + DWORD dwNumBackwardRefSamples; + VMRDeinterlaceTech DeinterlaceTechnology; +} VMRDeinterlaceCaps; + +[ + local, + object, + uuid(bb057577-0db8-4e6a-87a7-1a8c9a505a0f), + helpstring("IVMRDeinterlaceControl interface"), + pointer_default(unique) +] +interface IVMRDeinterlaceControl : IUnknown +{ + HRESULT GetNumberOfDeinterlaceModes([in] VMRVideoDesc *desc, [in, out] DWORD *num_modes, [out] GUID *modes); + HRESULT GetDeinterlaceModeCaps([in] GUID *mode, [in] VMRVideoDesc *desc, [in, out] VMRDeinterlaceCaps *caps); + HRESULT GetDeinterlaceMode([in] DWORD id, [out] GUID *mode); + HRESULT SetDeinterlaceMode([in] DWORD id, [in] GUID *mode); + HRESULT GetDeinterlacePrefs([out] DWORD *prefs); + HRESULT SetDeinterlacePrefs([in] DWORD prefs); + HRESULT GetActualDeinterlaceMode([in] DWORD id, [out] GUID *mode); +}; + +typedef struct _VMRALPHABITMAP +{ + DWORD dwFlags; + HDC hdc; + IDirectDrawSurface7 *pDDS; + RECT rSrc; + RECT rDest; + FLOAT fAlpha; + COLORREF clrSrcKey; +} VMRALPHABITMAP, *PVMRALPHABITMAP; + +cpp_quote("#define VMRBITMAP_DISABLE (0x01)") +cpp_quote("#define VMRBITMAP_HDC (0x02)") +cpp_quote("#define VMRBITMAP_ENTIREDDS (0x04)") +cpp_quote("#define VMRBITMAP_SRCCOLORKEY (0x08)") +cpp_quote("#define VMRBITMAP_SRCRECT (0x10)") + +[ + local, + object, + uuid(1e673275-0257-40aa-af20-7c608d4a0428), + helpstring("IVMRMixerBitmap interface"), + pointer_default(unique) +] +interface IVMRMixerBitmap : IUnknown +{ + HRESULT SetAlphaBitmap([in] const VMRALPHABITMAP *params); + HRESULT UpdateAlphaBitmapParameters([in] VMRALPHABITMAP *params); + HRESULT GetAlphaBitmapParameters([out] VMRALPHABITMAP *params); +}; + +typedef struct _VMRVIDEOSTREAMINFO +{ + IDirectDrawSurface7 *pddsVideoSurface; + DWORD dwWidth; + DWORD dwHeight; + DWORD dwStrmID; + FLOAT fAlpha; + DDCOLORKEY ddClrKey; + NORMALIZEDRECT rNormal; +} VMRVIDEOSTREAMINFO; + +[ + local, + object, + uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82), + helpstring("IVMRImageCompositor interface"), + pointer_default(unique) +] +interface IVMRImageCompositor : IUnknown +{ + HRESULT InitCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget); + HRESULT TermCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget); + HRESULT SetStreamMediaType([in] DWORD id, [in] AM_MEDIA_TYPE *pmt, [in] BOOL texture); + HRESULT CompositeImage([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget, + [in] AM_MEDIA_TYPE *pmt, [in] REFERENCE_TIME start, [in] REFERENCE_TIME stop, + [in] DWORD backgrnd, [in] VMRVIDEOSTREAMINFO *info, [in] UINT streams); +}; + +[ + local, + object, + uuid(058d1f11-2a54-4bef-bd54-df706626b727), + helpstring("IVMRVideoStreamControl interface"), + pointer_default(unique) +] +interface IVMRVideoStreamControl : IUnknown +{ + HRESULT SetColorKey([in] DDCOLORKEY *key); + HRESULT GetColorKey([out] DDCOLORKEY *key); + HRESULT SetStreamActiveState([in] BOOL active); + HRESULT GetStreamActiveState([out] BOOL *active); +}; + +[ + local, + object, + uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178), + helpstring("IVMRImagePresenterConfig interface"), + pointer_default(unique) +] +interface IVMRImagePresenterConfig : IUnknown +{ + HRESULT SetRenderingPrefs([in] DWORD prefs); + HRESULT GetRenderingPrefs([out] DWORD *prefs); +}; + +[ + local, + object, + uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea), + helpstring("IVMRImagePresenterExclModeConfig interface"), + pointer_default(unique) +] +interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig +{ + HRESULT SetXlcModeDDObjAndPrimarySurface([in] IDirectDraw7 *dddev, [in] IDirectDrawSurface7 *ddsurface); + HRESULT GetXlcModeDDObjAndPrimarySurface([out] IDirectDraw7 **dddev, [out] IDirectDrawSurface7 **ddsurface); +}; + +[ + local, + object, + uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a), + helpstring("IVPManager interface"), + pointer_default(unique) +] +interface IVPManager : IUnknown +{ + HRESULT SetVideoPortIndex([in] DWORD index); + HRESULT GetVideoPortIndex([out] DWORD *index); +}; + -- 1.5.4.1