ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

vmrender.idl
Go to the documentation of this file.
00001 /*
00002  * Copyright (C) 2008 Maarten Lankhorst
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
00017  */
00018 
00019 cpp_quote("#if 0")
00020 typedef DWORD IDirectDrawSurface7;
00021 typedef DWORD IDirectDraw7;
00022 typedef DWORD *LPBITMAPINFOHEADER;
00023 typedef DWORD *LPDDPIXELFORMAT;
00024 typedef struct { DWORD dw1, dw2; } DDCOLORKEY;
00025 cpp_quote("#endif")
00026 cpp_quote("#include <ddraw.h>")
00027 
00028 interface IVMRSurface;
00029 interface IVMRSurfaceAllocator;
00030 interface IVMRSurfaceAllocatorNotify;
00031 interface IVMRImagePresenter;
00032 interface IVMRImagePresenterNotify;
00033 interface IVMRWindowlessControl;
00034 interface IVMRMixerControl;
00035 interface IVMRMixerBitmap;
00036 interface IVMRFilterConfig;
00037 interface IVMRAspectRatioControl;
00038 interface IVMRDeinterlaceControl;
00039 interface IVMRMonitorConfig;
00040 interface IVMRImageCompositor;
00041 interface IVMRVideoStreamControl;
00042 
00043 typedef enum _VMRPresentationFlags
00044 {
00045     VMRSample_SyncPoint = 0x01,
00046     VMRSample_Preroll = 0x02,
00047     VMRSample_Discontinuity = 0x04,
00048     VMRSample_TimeValid = 0x08,
00049     VMRSample_SrcDstRectsValid = 0x10
00050 } VMRPresentationFlags;
00051 
00052 typedef struct tagVMRPRESENTATIONINFO
00053 {
00054     DWORD dwFlags;
00055     IDirectDrawSurface7 *lpSurf;
00056     REFERENCE_TIME rtStart, rtEnd;
00057     SIZE szAspectRatio;
00058     RECT rcSrc, rcDst;
00059     DWORD dwTypeSpecificFlags;
00060     DWORD dwInterlaceFlags;
00061 } VMRPRESENTATIONINFO;
00062 
00063 [
00064     local,
00065     object,
00066     uuid(ce704fe7-e71e-41fb-baa2-c4403e1182f5),
00067     helpstring("IVMRImagePresenter interface"),
00068     pointer_default(unique)
00069 ]
00070 interface IVMRImagePresenter : IUnknown
00071 {
00072     HRESULT StartPresenting([in] DWORD_PTR id);
00073     HRESULT StopPresenting([in] DWORD_PTR id);
00074     HRESULT PresentImage([in] DWORD_PTR id, [in] VMRPRESENTATIONINFO *info);
00075 };
00076 
00077 typedef enum _VMRSurfaceAllocationFlags
00078 {
00079     AMAP_PIXELFORMAT_VALID = 0x01,
00080     AMAP_3D_TARGET = 0x02,
00081     AMAP_ALLOW_SYSMEM = 0x04,
00082     AMAP_FORCE_SYSMEM = 0x08,
00083     AMAP_DIRECTED_FLIP = 0x10,
00084     AMAP_DXVA_TARGET = 0x20
00085 } VMRSurfaceAllocationFlags;
00086 
00087 typedef struct tagVMRALLOCATIONINFO
00088 {
00089     DWORD dwFlags;
00090     LPBITMAPINFOHEADER lpHdr;
00091     LPDDPIXELFORMAT lpPixFmt;
00092     SIZE szAspectRatio;
00093     DWORD dwMinBuffers;
00094     DWORD dwMaxBuffers;
00095     DWORD dwInterlaceFlags;
00096     SIZE szNativeSize;
00097 } VMRALLOCATIONINFO;
00098 
00099 [
00100     local,
00101     object,
00102     uuid(31ce832e-4484-458b-8cca-f4d7e3db0b52),
00103     helpstring("IVMRSurfaceAllocator interface"),
00104     pointer_default(unique)
00105 ]
00106 interface IVMRSurfaceAllocator : IUnknown
00107 {
00108     HRESULT AllocateSurface([in] DWORD_PTR id, [in] VMRALLOCATIONINFO *allocinfo, [in, out] DWORD *buffers, IDirectDrawSurface7 **surface);
00109     HRESULT FreeSurface([in] DWORD_PTR id);
00110     HRESULT PrepareSurface([in] DWORD_PTR id, [in] IDirectDrawSurface7 *surface, [in] DWORD dwSurfaceFlags);
00111     HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify *notify);
00112 };
00113 
00114 [
00115     local,
00116     object,
00117     uuid(aada05a8-5a4e-4729-af0b-cea27aed51e2),
00118     helpstring("IVMRSurfaceAllocatorNotify interface"),
00119     pointer_default(unique)
00120 ]
00121 interface IVMRSurfaceAllocatorNotify : IUnknown
00122 {
00123     HRESULT AdviseSurfaceAllocator([in] DWORD_PTR id, [in] IVMRSurfaceAllocator *allocator);
00124     HRESULT SetDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor);
00125     HRESULT ChangeDDrawDevice([in] IDirectDraw7 *device, [in] HMONITOR monitor);
00126     HRESULT RestoreDDrawSurfaces();
00127     HRESULT NotifyEvent([in] LONG EventCode, [in] LONG_PTR p1, [in] LONG_PTR p2);
00128     HRESULT SetBorderColor([in] COLORREF border);
00129 };
00130 
00131 typedef enum _VMR_ASPECT_RATIO_MODE
00132 {
00133     VMR_ARMODE_NONE,
00134     VMR_ARMODE_LETTER_BOX
00135 } VMR_ASPECT_RATIO_MODE;
00136 
00137 [
00138     local,
00139     object,
00140     uuid(0eb1088c-4dcd-46f0-878f-39dae86a51b7),
00141     helpstring("IVMRWindowlessControl interface"),
00142     pointer_default(unique)
00143 ]
00144 interface IVMRWindowlessControl : IUnknown
00145 {
00146     HRESULT GetNativeVideoSize([out] LONG *width, [out] LONG *height, [out] LONG *ar_width, [out] LONG *ar_height);
00147     HRESULT GetMinIdealVideoSize([out] LONG *width, [out] LONG *height);
00148     HRESULT GetMaxIdealVideoSize([out] LONG *width, [out] LONG *height);
00149     HRESULT SetVideoPosition([in] const RECT *src_rect, [in] const RECT *dst_rect);
00150     HRESULT GetVideoPosition([out] RECT *src_rect, [out] RECT *dst_rect);
00151     HRESULT GetAspectRatioMode([out] DWORD *mode);
00152     HRESULT SetAspectRatioMode([in] DWORD mode);
00153     HRESULT SetVideoClippingWindow([in] HWND hwnd);
00154     HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc);
00155     HRESULT DisplayModeChanged();
00156     HRESULT GetCurrentImage([out] BYTE **data);
00157     HRESULT SetBorderColor([in] COLORREF border);
00158     HRESULT GetBorderColor([out] COLORREF *border);
00159     HRESULT SetColorKey([in] COLORREF key);
00160     HRESULT GetColorKey([out] COLORREF *key);
00161 };
00162 
00163 typedef enum _VMRMixerPrefs
00164 {
00165     MixerPref_NoDecimation = 0x0001,
00166     MixerPref_DecimateOutput = 0x0002,
00167     MixerPref_ARAdjustXorY = 0x0004,
00168     MixerPref_DecimationReserved = 0x0008,
00169     MixerPref_DecimateMask = 0x000f,
00170 
00171     MixerPref_BiLinearFiltering = 0x0010,
00172     MixerPref_PointFiltering = 0x0020,
00173     MixerPref_FinteringMask = 0x00f0,
00174 
00175     MixerPref_RenderTargetRGB = 0x0100,
00176     MixerPref_RenderTargetYUV = 0x1000,
00177     MixerPref_RenderTargetYUV420 = 0x0200,
00178     MixerPref_RenderTargetYUV422 = 0x0400,
00179     MixerPref_RenderTargetYUV444 = 0x0800,
00180     MixerPref_RenderTargetReserved = 0xe000,
00181     MixerPref_RenderTargetMask = 0xff00,
00182 
00183     MixerPref_DynamicSwitchToBOB = 0x10000,
00184     MixerPref_DynamicDecimateBy2 = 0x20000,
00185     MixerPref_DynamicReserved = 0xc0000,
00186     MixerPref_DynamicMask = 0xf0000
00187 } VMRMixerPrefs;
00188 
00189 typedef struct _NORMALIZEDRECT
00190 {
00191     FLOAT left, top, right, bottom;
00192 } NORMALIZEDRECT;
00193 
00194 [
00195     local,
00196     object,
00197     uuid(1c1a17b0-bed0-415d-974b-dc6696131599),
00198     helpstring("IVMRMixerControl interface"),
00199     pointer_default(unique)
00200 ]
00201 interface IVMRMixerControl : IUnknown
00202 {
00203     HRESULT SetAlpha([in] DWORD id, [in] FLOAT alpha);
00204     HRESULT GetAlpha([in] DWORD id, [out] FLOAT *alpha);
00205     HRESULT SetZOrder([in] DWORD id, [in] DWORD z);
00206     HRESULT GetZOrder([in] DWORD id, [out] DWORD *z);
00207     HRESULT SetOutputRect([in] DWORD id, [in] const NORMALIZEDRECT *rect);
00208     HRESULT SetBackgroundClr([in] COLORREF background);
00209     HRESULT GetBackgroundClr([out] COLORREF *background);
00210     HRESULT SetMixingPrefs([in] DWORD prefs);
00211     HRESULT GetMixingPrefs([out] DWORD *prefs);
00212 };
00213 
00214 typedef struct tagVMRGUID
00215 {
00216     struct _GUID *pGUID, GUID;
00217 } VMRGUID;
00218 
00219 #define VMRDEVICENAMELEN 32
00220 #define VMRDEVICEDESCRIPTIONLEN 256
00221 
00222 typedef struct tagVMRMONITORINFO
00223 {
00224     VMRGUID guid;
00225     RECT rcMonitor;
00226     HMONITOR hMon;
00227     DWORD dwFlags;
00228     WCHAR szDevice[VMRDEVICENAMELEN];
00229     WCHAR szDescription[VMRDEVICEDESCRIPTIONLEN];
00230     LARGE_INTEGER liDriverVersion;
00231     DWORD dwVendorId;
00232     DWORD dwDeviceId;
00233     DWORD dwSubSysId;
00234     DWORD dwRevision;
00235 } VMRMONITORINFO;
00236 
00237 [
00238     local,
00239     object,
00240     uuid(9cf0b1b6-fbaa-4b7f-88cf-cf1f130a0dce),
00241     helpstring("IVMRMonitorConfig interface"),
00242     pointer_default(unique)
00243 ]
00244 interface IVMRMonitorConfig : IUnknown
00245 {
00246     HRESULT SetMonitor([in] const VMRGUID *vmrguid);
00247     HRESULT GetMonitor([out] VMRGUID *vmrguid);
00248     HRESULT SetDefaultMonitor([in] const VMRGUID *vmrguid);
00249     HRESULT GetDefaultMonitor([out] VMRGUID *vmrguid);
00250     HRESULT GetAvailableMonitors([out, size_is(array_size)] VMRMONITORINFO *info, [in] DWORD array_size, [out] DWORD *retrieved);
00251 }
00252 
00253 typedef enum _VMRRenderPrefs
00254 {
00255     RenderPrefs_RestrictToInitialMonitor = 0x00,
00256     RenderPrefs_ForceOffScreen = 0x01,
00257     RenderPrefs_ForceOverlays = 0x02,
00258     RenderPrefs_AllowOverlays = 0x00,
00259     RenderPrefs_AllowOffscreen = 0x00,
00260     RenderPrefs_DoNotRenderColorKeyAndBorder = 0x08,
00261     RenderPrefs_Reserved = 0x10,
00262     RenderPrefs_PreferAGPMemWhenMixing = 0x20,
00263     RenderPrefs_Mask = 0x3f
00264 } VMRRenderPrefs;
00265 
00266 typedef enum _VMRMode
00267 {
00268     VMRMode_Windowed = 0x1,
00269     VMRMode_Windowless = 0x2,
00270     VMRMode_Renderless = 0x4,
00271     VMRMode_Mask = 0x7
00272 } VMRMode;
00273 
00274 enum { MAX_NUMBER_OF_STREAMS = 16 };
00275 
00276 [
00277     local,
00278     object,
00279     uuid(9e5530c5-7034-48b4-bb46-0b8a6efc8e36),
00280     helpstring("IVMRFilterConfig interface"),
00281     pointer_default(unique)
00282 ]
00283 interface IVMRFilterConfig : IUnknown
00284 {
00285     HRESULT SetImageCompositor([in] IVMRImageCompositor *compositor);
00286     HRESULT SetNumberOfStreams([in] DWORD streams);
00287     HRESULT GetNumberOfStreams([out] DWORD *streams);
00288     HRESULT SetRenderingPrefs([in] DWORD prefs);
00289     HRESULT GetRenderingPrefs([out] DWORD *prefs);
00290     HRESULT SetRenderingMode([in] DWORD mode);
00291     HRESULT GetRenderingMode([out] DWORD *mode);
00292 };
00293 
00294 [
00295     local,
00296     object,
00297     uuid(ede80b5c-bad6-4623-b537-65586c9f8dfd),
00298     helpstring("IVMRAspectRatioControl interface"),
00299     pointer_default(unique)
00300 ]
00301 interface IVMRAspectRatioControl : IUnknown
00302 {
00303     HRESULT GetAspectRatioMode([out] DWORD *armode);
00304     HRESULT SetAspectRatioMode([in] DWORD armode);
00305 };
00306 
00307 typedef enum _VMRDeinterlacePrefs
00308 {
00309     DeinterlacePref_NextBest = 0x1,
00310     DeinterlacePref_BOB = 0x2,
00311     DeinterlacePref_Weave = 0x4,
00312     DeinterlacePref_Mask = 0x7
00313 } VMRDeinterlacePrefs;
00314 
00315 typedef enum _VMRDeinterlaceTech
00316 {
00317     DeinterlaceTech_Unknown = 0x00,
00318     DeinterlaceTech_BOBLineReplicate = 0x01,
00319     DeinterlaceTech_BOBVerticalStretch = 0x02,
00320     DeinterlaceTech_MedianFiltering = 0x04,
00321     DeinterlaceTech_EdgeFiltering = 0x08,
00322     DeinterlaceTech_FieldAdaptive = 0x10,
00323     DeinterlaceTech_PixelAdaptive = 0x20,
00324     DeinterlaceTech_MotionVectorSteered = 0x80
00325 } VMRDeinterlaceTech;
00326 
00327 typedef struct _VMRFrequency
00328 {
00329     DWORD dwNumerator, dwDenominator;
00330 } VMRFrequency;
00331 
00332 typedef struct _VMRVideoDesc
00333 {
00334     DWORD dwSize;
00335     DWORD dwSampleWidth;
00336     DWORD dwSampleHeight;
00337     BOOL SingleFieldPerSample;
00338     DWORD dwFourCC;
00339     VMRFrequency InputSampleFreq;
00340     VMRFrequency OutputFrameFreq;
00341 } VMRVideoDesc;
00342 
00343 typedef struct _VMRDeinterlaceCaps
00344 {
00345     DWORD dwSize;
00346     DWORD dwNumPreviousOutputFrames;
00347     DWORD dwNumForwardRefSamples;
00348     DWORD dwNumBackwardRefSamples;
00349     VMRDeinterlaceTech DeinterlaceTechnology;
00350 } VMRDeinterlaceCaps;
00351 
00352 [
00353     local,
00354     object,
00355     uuid(bb057577-0db8-4e6a-87a7-1a8c9a505a0f),
00356     helpstring("IVMRDeinterlaceControl interface"),
00357     pointer_default(unique)
00358 ]
00359 interface IVMRDeinterlaceControl : IUnknown
00360 {
00361     HRESULT GetNumberOfDeinterlaceModes([in] VMRVideoDesc *desc, [in, out] DWORD *num_modes, [out] GUID *modes);
00362     HRESULT GetDeinterlaceModeCaps([in] GUID *mode, [in] VMRVideoDesc *desc, [in, out] VMRDeinterlaceCaps *caps);
00363     HRESULT GetDeinterlaceMode([in] DWORD id, [out] GUID *mode);
00364     HRESULT SetDeinterlaceMode([in] DWORD id, [in] GUID *mode);
00365     HRESULT GetDeinterlacePrefs([out] DWORD *prefs);
00366     HRESULT SetDeinterlacePrefs([in] DWORD prefs);
00367     HRESULT GetActualDeinterlaceMode([in] DWORD id, [out] GUID *mode);
00368 };
00369 
00370 typedef struct _VMRALPHABITMAP
00371 {
00372     DWORD dwFlags;
00373     HDC hdc;
00374     IDirectDrawSurface7 *pDDS;
00375     RECT rSrc;
00376     RECT rDest;
00377     FLOAT fAlpha;
00378     COLORREF clrSrcKey;
00379 } VMRALPHABITMAP, *PVMRALPHABITMAP;
00380 
00381 cpp_quote("#define VMRBITMAP_DISABLE (0x01)")
00382 cpp_quote("#define VMRBITMAP_HDC (0x02)")
00383 cpp_quote("#define VMRBITMAP_ENTIREDDS (0x04)")
00384 cpp_quote("#define VMRBITMAP_SRCCOLORKEY (0x08)")
00385 cpp_quote("#define VMRBITMAP_SRCRECT (0x10)")
00386 
00387 [
00388     local,
00389     object,
00390     uuid(1e673275-0257-40aa-af20-7c608d4a0428),
00391     helpstring("IVMRMixerBitmap interface"),
00392     pointer_default(unique)
00393 ]
00394 interface IVMRMixerBitmap : IUnknown
00395 {
00396     HRESULT SetAlphaBitmap([in] const VMRALPHABITMAP *params);
00397     HRESULT UpdateAlphaBitmapParameters([in] VMRALPHABITMAP *params);
00398     HRESULT GetAlphaBitmapParameters([out] VMRALPHABITMAP *params);
00399 };
00400 
00401 typedef struct _VMRVIDEOSTREAMINFO
00402 {
00403     IDirectDrawSurface7 *pddsVideoSurface;
00404     DWORD dwWidth;
00405     DWORD dwHeight;
00406     DWORD dwStrmID;
00407     FLOAT fAlpha;
00408     DDCOLORKEY ddClrKey;
00409     NORMALIZEDRECT rNormal;
00410 } VMRVIDEOSTREAMINFO;
00411 
00412 [
00413     local,
00414     object,
00415     uuid(7a4fb5af-479f-4074-bb40-ce6722e43c82),
00416     helpstring("IVMRImageCompositor interface"),
00417     pointer_default(unique)
00418 ]
00419 interface IVMRImageCompositor : IUnknown
00420 {
00421     HRESULT InitCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget);
00422     HRESULT TermCompositionTarget([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget);
00423     HRESULT SetStreamMediaType([in] DWORD id, [in] AM_MEDIA_TYPE *pmt, [in] BOOL texture);
00424     HRESULT CompositeImage([in] IUnknown *d3ddev, [in] IDirectDrawSurface7 *rendertarget,
00425                            [in] AM_MEDIA_TYPE *pmt, [in] REFERENCE_TIME start, [in] REFERENCE_TIME stop,
00426                            [in] DWORD backgrnd, [in] VMRVIDEOSTREAMINFO *info, [in] UINT streams);
00427 };
00428 
00429 [
00430     local,
00431     object,
00432     uuid(058d1f11-2a54-4bef-bd54-df706626b727),
00433     helpstring("IVMRVideoStreamControl interface"),
00434     pointer_default(unique)
00435 ]
00436 interface IVMRVideoStreamControl : IUnknown
00437 {
00438     HRESULT SetColorKey([in] DDCOLORKEY *key);
00439     HRESULT GetColorKey([out] DDCOLORKEY *key);
00440     HRESULT SetStreamActiveState([in] BOOL active);
00441     HRESULT GetStreamActiveState([out] BOOL *active);
00442 };
00443 
00444 [
00445     local,
00446     object,
00447     uuid(9f3a1c85-8555-49ba-935f-be5b5b29d178),
00448     helpstring("IVMRImagePresenterConfig interface"),
00449     pointer_default(unique)
00450 ]
00451 interface IVMRImagePresenterConfig : IUnknown
00452 {
00453     HRESULT SetRenderingPrefs([in] DWORD prefs);
00454     HRESULT GetRenderingPrefs([out] DWORD *prefs);
00455 };
00456 
00457 [
00458     local,
00459     object,
00460     uuid(e6f7ce40-4673-44f1-8f77-5499d68cb4ea),
00461     helpstring("IVMRImagePresenterExclModeConfig interface"),
00462     pointer_default(unique)
00463 ]
00464 interface IVMRImagePresenterExclModeConfig : IVMRImagePresenterConfig
00465 {
00466     HRESULT SetXlcModeDDObjAndPrimarySurface([in] IDirectDraw7 *dddev, [in] IDirectDrawSurface7 *ddsurface);
00467     HRESULT GetXlcModeDDObjAndPrimarySurface([out] IDirectDraw7 **dddev, [out] IDirectDrawSurface7 **ddsurface);
00468 };
00469 
00470 [
00471     local,
00472     object,
00473     uuid(aac18c18-e186-46d2-825d-a1f8dc8e395a),
00474     helpstring("IVPManager interface"),
00475     pointer_default(unique)
00476 ]
00477 interface IVPManager : IUnknown
00478 {
00479     HRESULT SetVideoPortIndex([in] DWORD index);
00480     HRESULT GetVideoPortIndex([out] DWORD *index);
00481 };

Generated on Sun May 27 2012 04:30:46 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.