00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 import "unknwn.idl";
00020
00021 cpp_quote("#if 0")
00022 interface IDirect3DSurface9;
00023 interface IDirect3DDevice9;
00024 typedef LONGLONG REFERENCE_TIME;
00025 typedef DWORD D3DFORMAT;
00026 typedef DWORD D3DPOOL;
00027 typedef HANDLE HMONITOR;
00028 typedef struct { char dummy; } AM_MEDIA_TYPE;
00029 typedef struct { char dummy; } D3DCOLOR;
00030 cpp_quote("#endif")
00031
00032 interface IVMRSurface9;
00033 interface IVMRSurfaceAllocator9;
00034 interface IVMRSurfaceAllocatorEx9;
00035 interface IVMRSurfaceAllocatorNotify9;
00036 interface IVMRImagePresenter9;
00037 interface IVMRImagePresenterConfig9;
00038 interface IVMRMonitorConfig9;
00039 interface IVMRWindowlessControl9;
00040 interface IVMRMixerControl9;
00041 interface IVMRImageCompositor9;
00042 interface IVMRMixerBitmap9;
00043 interface IVMRFilterConfig9;
00044 interface IVMRAspectRatioControl9;
00045 interface IVMRVideoStreamControl9;
00046
00047 typedef enum _VMR9PresentationFlags
00048 {
00049 VMR9Sample_SyncPoint = 0x1,
00050 VMR9Sample_Preroll = 0x2,
00051 VMR9Sample_Discontinuity = 0x4,
00052 VMR9Sample_TimeValid = 0x8,
00053 VMR9Sample_SrcDstRectsValid = 0x10
00054 } VMR9PresentationFlags;
00055
00056 typedef struct _VMR9PresentationInfo
00057 {
00058 DWORD dwFlags;
00059 IDirect3DSurface9 *lpSurf;
00060 REFERENCE_TIME rtStart;
00061 REFERENCE_TIME rtEnd;
00062 SIZE szAspectRatio;
00063 RECT rcSrc;
00064 RECT rcDst;
00065 DWORD dwReserved1;
00066 DWORD dwReserved2;
00067 } VMR9PresentationInfo;
00068
00069 [
00070 local,
00071 object,
00072 uuid(69188c61-12a3-40f0-8ffc-342e7b433fd7),
00073 helpstring("IVMRImagePresenter9 interface"),
00074 pointer_default(unique)
00075 ]
00076 interface IVMRImagePresenter9 : IUnknown
00077 {
00078 HRESULT StartPresenting([in] DWORD_PTR id);
00079 HRESULT StopPresenting([in] DWORD_PTR id);
00080 HRESULT PresentImage([in] DWORD_PTR id, [in] VMR9PresentationInfo *info);
00081 };
00082
00083 typedef enum _VMR9SurfaceAllocationFlags
00084 {
00085 VMR9AllocFlag_3DRenderTarget = 0x1,
00086 VMR9AllocFlag_DXVATarget = 0x2,
00087 VMR9AllocFlag_TextureSurface = 0x4,
00088 VMR9AllocFlag_OffscreenSurface = 0x8,
00089 VMR9AllocFlag_RGBDynamicSwitch = 0x10,
00090 VMR9AllocFlag_UsageReserved = 0xe0,
00091 VMR9AllocFlag_UsageMask = 0xff,
00092 } VMR9SurfaceAllocationFlags;
00093
00094 typedef struct _VMR9AllocationInfo
00095 {
00096 DWORD dwFlags;
00097 DWORD dwWidth;
00098 DWORD dwHeight;
00099 D3DFORMAT Format;
00100 D3DPOOL Pool;
00101 DWORD MinBuffers;
00102 SIZE szAspectRatio;
00103 SIZE szNativeSize;
00104 } VMR9AllocationInfo;
00105
00106 [
00107 local,
00108 object,
00109 uuid(8d5148ea-3f5d-46cf-9df1-d1b896eedb1f),
00110 helpstring("IVMRSurfaceAllocator9 interface"),
00111 pointer_default(unique)
00112 ]
00113 interface IVMRSurfaceAllocator9 : IUnknown
00114 {
00115 HRESULT InitializeDevice([in] DWORD_PTR id, [in] VMR9AllocationInfo *allocinfo, [in, out] DWORD *numbuffers);
00116 HRESULT TerminateDevice([in] DWORD_PTR id);
00117 HRESULT GetSurface([in] DWORD_PTR id, [in] DWORD surfaceindex, [in] DWORD flags, [out] IDirect3DSurface9 **surface);
00118 HRESULT AdviseNotify([in] IVMRSurfaceAllocatorNotify9 *allocnotify);
00119 };
00120
00121 [
00122 local,
00123 object,
00124 uuid(6de9a68a-a928-4522-bf57-655ae3866456),
00125 helpstring("IVMRSurfaceAllocatorEx9 interface"),
00126 pointer_default(unique)
00127 ]
00128 interface IVMRSurfaceAllocatorEx9 : IVMRSurfaceAllocator9
00129 {
00130 HRESULT GetSurfaceEx([in] DWORD_PTR id, [in] DWORD surfaceindex, [in] DWORD flags, [out] IDirect3DSurface9 **surface, [out] RECT *dest);
00131 };
00132
00133 [
00134 local,
00135 object,
00136 uuid(dca3f5df-bb3a-4d03-bd81-84614bfbfa0c),
00137 helpstring("IVMRSurfaceAllocatorNotify9 interface"),
00138 pointer_default(unique)
00139 ]
00140 interface IVMRSurfaceAllocatorNotify9 : IUnknown
00141 {
00142 HRESULT AdviseSurfaceAllocator([in] DWORD_PTR id, [in] IVMRSurfaceAllocator9 *alloc);
00143 HRESULT SetD3DDevice([in] IDirect3DDevice9 *device, [in] HMONITOR monitor);
00144 HRESULT ChangeD3DDevice([in] IDirect3DDevice9 *device, [in] HMONITOR monitor);
00145 HRESULT AllocateSurfaceHelper([in] VMR9AllocationInfo *allocinfo, [in, out] DWORD *numbuffers, [out] IDirect3DSurface9 **surface);
00146 HRESULT NotifyEvent([in] LONG code, [in] LONG_PTR param1, [in] LONG_PTR param2);
00147 };
00148
00149 typedef enum _VMR9AspectRatioMode
00150 {
00151 VMR9ARMode_None,
00152 VMR9ARMode_LetterBox
00153 } VMR9AspectRatioMode;
00154
00155 [
00156 local,
00157 object,
00158 uuid(8f537d09-f85e-4414-b23b-502e54c79927),
00159 helpstring("IVMRWindowlessControl interface"),
00160 pointer_default(unique)
00161 ]
00162 interface IVMRWindowlessControl9 : IUnknown
00163 {
00164 HRESULT GetNativeVideoSize([out] LONG *width, [out] LONG *height, [out] LONG *arwidth, [out] LONG *arheight);
00165 HRESULT GetMinIdealVideoSize([out] LONG *width, [out] LONG *height);
00166 HRESULT GetMaxIdealVideoSize([out] LONG *width, [out] LONG *height);
00167 HRESULT SetVideoPosition([in] const RECT *source, [in] const RECT *dest);
00168 HRESULT GetVideoPosition([out] RECT *source, [out] RECT *dest);
00169 HRESULT GetAspectRatioMode([out] DWORD *mode);
00170 HRESULT SetAspectRatioMode([in] DWORD mode);
00171 HRESULT SetVideoClippingWindow([in] HWND hwnd);
00172 HRESULT RepaintVideo([in] HWND hwnd, [in] HDC hdc);
00173 HRESULT DisplayModeChanged();
00174 HRESULT GetCurrentImage([out] BYTE **dib);
00175 HRESULT SetBorderColor([in] COLORREF color);
00176 HRESULT GetBorderColor([out] COLORREF *color);
00177 };
00178
00179 typedef enum _VMR9MixerPrefs
00180 {
00181
00182 MixerPref9_NoDecimation = 0x1,
00183 MixerPref9_DecimateOutput = 0x2,
00184 MixerPref9_ARAdjustXorY = 0x4,
00185 MixerPref9_NonSquareMixing = 0x8,
00186 MixerPref9_DecimateMask = 0xf,
00187
00188
00189 MixerPref9_BiLinearFiltering = 0x10,
00190 MixerPref9_PointFiltering = 0x20,
00191 MixerPref9_AnisotropicFiltering = 0x40,
00192 MixerPref9_PyramidalQuadFiltering = 0x80,
00193 MixerPref9_GaussianQuadFiltering = 0x100,
00194 MixerPref9_FilteringReserved = 0xe00,
00195 MixerPref9_FilteringMask = 0xff0,
00196
00197
00198 MixerPref9_RenderTargetRGB = 0x1000,
00199 MixerPref9_RenderTargetYUV = 0x2000,
00200 MixerPref9_RenderTargetReserved = 0xfc000,
00201
00202 MixerPref9_DynamicSwitchToBOB = 0x100000,
00203 MixerPref9_DynamicDecimateBy2 = 0x200000,
00204 MixerPref9_DynamicReserved = 0xc00000,
00205 MixerPref9_DynamicMask = 0xf00000,
00206 } VMR9MixerPrefs;
00207
00208 typedef struct _VMR9NormalizedRect
00209 {
00210 FLOAT left;
00211 FLOAT top;
00212 FLOAT right;
00213 FLOAT bottom;
00214 } VMR9NormalizedRect;
00215
00216 typedef enum _VMR9ProcAmpControlFlags
00217 {
00218 ProcAmpControl9_Brightness = 0x1,
00219 ProcAmpControl9_Contrast = 0x2,
00220 ProcAmpControl9_Hue = 0x4,
00221 ProcAmpControl9_Saturation = 0x8,
00222 ProcAmpControl9_Mask = 0xf
00223 } VMR9ProcAmpControlFlags;
00224
00225 typedef struct _VMR9ProcAmpControl
00226 {
00227 DWORD dwSize;
00228 DWORD dwFlags;
00229 FLOAT Brightness;
00230 FLOAT Contrast;
00231 FLOAT Hue;
00232 FLOAT Saturation;
00233 } VMR9ProcAmpControl;
00234
00235 typedef struct _VMR9ProcAmpControlRange
00236 {
00237 DWORD dwSize;
00238 VMR9ProcAmpControlFlags dwProperty;
00239 FLOAT MinValue;
00240 FLOAT MaxValue;
00241 FLOAT DefaultValue;
00242 FLOAT StepSize;
00243 } VMR9ProcAmpControlRange;
00244
00245 [
00246 local,
00247 object,
00248 uuid(1a777eaa-47c8-4930-b2c9-8fee1c1b0f3b),
00249 helpstring("IVMRMixerControl9 interface"),
00250 pointer_default(unique)
00251 ]
00252 interface IVMRMixerControl9 : IUnknown
00253 {
00254 HRESULT SetAlpha([in] DWORD streamid, [in] FLOAT alpha);
00255 HRESULT GetAlpha([in] DWORD streamid, [out] FLOAT *alpha);
00256 HRESULT SetZOrder([in] DWORD streamid, [in] DWORD zorder);
00257 HRESULT GetZOrder([in] DWORD streamid, [out] DWORD *zorder);
00258 HRESULT SetOutputRect([in] DWORD streamid, [in] const VMR9NormalizedRect *rect);
00259 HRESULT GetOutputRect([in] DWORD streamid, [out] VMR9NormalizedRect *rect);
00260 HRESULT SetBackgroundClr([in] COLORREF back);
00261 HRESULT GetBackgroundClr([out] COLORREF *back);
00262 HRESULT SetMixingPrefs([in] DWORD mixingprefs);
00263 HRESULT GetMixingPrefs([out] DWORD *mixingprefs);
00264 HRESULT SetProcAmpControl([in] DWORD streamid, [in] VMR9ProcAmpControl *control);
00265 HRESULT GetProcAmpControl([in] DWORD streamid, [in, out] VMR9ProcAmpControl *control);
00266 HRESULT GetProcAmpControlRange([in] DWORD streamid, [in, out] VMR9ProcAmpControlRange *controlrange);
00267 };
00268
00269 typedef struct _VMR9AlphaBitmap
00270 {
00271 DWORD dwFlags;
00272 HDC hdc;
00273 IDirect3DSurface9 *pDDS;
00274 RECT rSrc;
00275 VMR9NormalizedRect *rDest;
00276 FLOAT fAlpha;
00277 COLORREF clrSrcKey;
00278 DWORD dwFilterMode;
00279 } VMR9AlphaBitmap;
00280
00281 typedef enum _VMR9AlphaBitmapFlags
00282 {
00283 VMR9AlphaBitmap_Disable = 0x1,
00284 VMR9AlphaBitmap_hDC = 0x2,
00285 VMR9AlphaBitmap_EntireDDS = 0x4,
00286 VMR9AlphaBitmap_SrcColorKey = 0x8,
00287 VMR9AlphaBitmap_SrcRect = 0x10,
00288 VMR9AlphaBitmap_FilterMode = 0x20
00289 } VMR9AlphaBitmapFlags;
00290
00291 [
00292 local,
00293 object,
00294 uuid(ced175e5-1935-4820-81bd-ff6ad00c9108),
00295 helpstring("IVMRMixerBitmap interface"),
00296 pointer_default(unique)
00297 ]
00298 interface IVMRMixerBitmap9 : IUnknown
00299 {
00300 HRESULT SetAlphaBitmap([in] const VMR9AlphaBitmap *bitmap);
00301 HRESULT UpdateAlphaBitmapParameters([in] const VMR9AlphaBitmap *bitmap);
00302 HRESULT GetAlphaBitmapParameters([out] VMR9AlphaBitmap *bitmap);
00303 };
00304
00305 [
00306 local,
00307 object,
00308 uuid(dfc581a1-6e1f-4c3a-8d0a-5e9792ea2afc),
00309 helpstring("IVMRSurface interface"),
00310 pointer_default(unique)
00311 ]
00312 interface IVMRSurface9 : IUnknown
00313 {
00314 HRESULT IsSurfaceLocked();
00315 HRESULT LockSurface([out] BYTE **surface);
00316 HRESULT UnlockSurface();
00317 HRESULT GetSurface([out] IDirect3DSurface9 **surface);
00318 };
00319
00320 typedef enum _VMR9RenderPrefs
00321 {
00322 RenderPrefs9_DoNotRenderBorder = 0x1,
00323 RenderPrefs9_Mask = 0x1
00324 } VMR9RenderPrefs;
00325
00326 [
00327 local,
00328 object,
00329 uuid(45c15cab-6e22-420a-8043-ae1f0ac02c7d),
00330 helpstring("IVMRImagePresenterConfig9 interface"),
00331 pointer_default(unique)
00332 ]
00333 interface IVMRImagePresenterConfig9 : IUnknown
00334 {
00335 HRESULT SetRenderingPrefs([in] DWORD renderflags);
00336 HRESULT GetRenderingPrefs([out] DWORD *renderflags);
00337 };
00338
00339 [
00340 local,
00341 object,
00342 uuid(d0cfe38b-93e7-4772-8957-0400c49a4485),
00343 helpstring("IVMRMixerStreamConfig interface"),
00344 pointer_default(unique)
00345 ]
00346 interface IVMRVideoStreamControl9: IUnknown
00347 {
00348 HRESULT SetStreamActiveState([in] BOOL active);
00349 HRESULT GetStreamActiveState([out] BOOL *active);
00350 };
00351
00352 typedef enum _VMR9Mode
00353 {
00354 VMR9Mode_Windowed = 0x1,
00355 VMR9Mode_Windowless = 0x2,
00356 VMR9Mode_Renderless = 0x4,
00357 VMR9Mode_Mask = 0x7
00358 } VMR9Mode;
00359
00360 [
00361 local,
00362 object,
00363 uuid(5a804648-4f66-4867-9c43-4f5c822cf1b8),
00364 helpstring("IVMRFilterConfig9 interface"),
00365 pointer_default(unique)
00366 ]
00367 interface IVMRFilterConfig9 : IUnknown
00368 {
00369 HRESULT SetImageCompositor([in] IVMRImageCompositor9 *compositor);
00370 HRESULT SetNumberOfStreams([in] DWORD max);
00371 HRESULT GetNumberOfStreams([out] DWORD *max);
00372 HRESULT SetRenderingPrefs([in] DWORD renderflags);
00373 HRESULT GetRenderingPrefs([out] DWORD *renderflags);
00374 HRESULT SetRenderingMode([in] DWORD mode);
00375 HRESULT GetRenderingMode([out] DWORD *mode);
00376 };
00377
00378 [
00379 local,
00380 object,
00381 uuid(00d96c29-bbde-4efc-9901-bb5036392146),
00382 helpstring("IVMRAspectRatioControl9 interface"),
00383 pointer_default(unique)
00384 ]
00385 interface IVMRAspectRatioControl9 : IUnknown
00386 {
00387 HRESULT GetAspectRatioMode([out] DWORD *mode);
00388 HRESULT SetAspectRatioMode([in] DWORD mode);
00389 }
00390
00391 #define VMR9DEVICENAMELEN 32
00392 #define VMR9DEVICEDESCRIPTIONLEN 512
00393
00394 typedef struct _VMR9MonitorInfo
00395 {
00396 UINT uDevID;
00397 RECT rcMonitor;
00398 HMONITOR hMon;
00399 DWORD dwFlags;
00400 WCHAR szDevice[VMR9DEVICENAMELEN];
00401 WCHAR szDescription[VMR9DEVICEDESCRIPTIONLEN];
00402 LARGE_INTEGER liDriverVersion;
00403 DWORD dwVendorId;
00404 DWORD dwDeviceId;
00405 DWORD dwSubSysId;
00406 DWORD dwRevision;
00407 } VMR9MonitorInfo;
00408
00409 [
00410 local,
00411 object,
00412 uuid(46c2e457-8ba0-4eef-b80b-0680f0978749),
00413 helpstring("IVMRMonitorConfig9 interface"),
00414 pointer_default(unique)
00415 ]
00416 interface IVMRMonitorConfig9 : IUnknown
00417 {
00418 HRESULT SetMonitor([in] UINT uDev);
00419 HRESULT GetMonitor([out] UINT *uDev);
00420 HRESULT SetDefaultMonitor([in] UINT uDev);
00421 HRESULT GetDefaultMonitor([out] UINT *uDev);
00422 HRESULT GetAvailableMonitors([out, size_is(arraysize)] VMR9MonitorInfo *info, [in] DWORD arraysize, [out] DWORD *numdev);
00423 };
00424
00425 typedef enum _VMR9DeinterlacePrefs
00426 {
00427 DeinterlacePref9_NextBest = 0x1,
00428 DeinterlacePref9_BOB = 0x2,
00429 DeinterlacePref9_Weave = 0x4,
00430 DeinterlacePref9_Mask = 0x7
00431 } VMR9DeinterlacePrefs;
00432
00433 typedef enum _VMR9DeinterlaceTech
00434 {
00435 DeinterlaceTech9_Unknown = 0,
00436 DeinterlaceTech9_BOBLineReplicate = 0x1,
00437 DeinterlaceTech9_BOBVerticalStretch = 0x2,
00438 DeinterlaceTech9_MedianFiltering = 0x4,
00439 DeinterlaceTech9_EdgeFiltering = 0x10,
00440 DeinterlaceTech9_FieldAdaptive = 0x20,
00441 DeinterlaceTech9_PixelAdaptive = 0x40,
00442 DeinterlaceTech9_MotionVectorSteered = 0x80
00443 } VMR9DeinterlaceTech;
00444
00445 typedef struct _VMR9Frequency
00446 {
00447 DWORD dwNumerator;
00448 DWORD dwDenominator;
00449 } VMR9Frequency;
00450
00451 typedef enum _VMR9_SampleFormat
00452 {
00453 VMR9_SampleReserved = 1,
00454 VMR9_SampleProgressiveFrame = 2,
00455 VMR9_SampleFieldInterleavedEvenFirst = 3,
00456 VMR9_SampleFieldInterleavedOddFirst = 4,
00457 VMR9_SampleFieldSingleEven = 5,
00458 VMR9_SampleFieldSingleOdd = 6,
00459 } VMR9_SampleFormat;
00460
00461 typedef struct _VMR9VideoDesc
00462 {
00463 DWORD dwSize;
00464 DWORD dwSampleWidth;
00465 DWORD dwSampleHeight;
00466 VMR9_SampleFormat SampleFormat;
00467 DWORD dwFourCC;
00468 VMR9Frequency InputSampleFreq;
00469 VMR9Frequency OutputFrameFreq;
00470 } VMR9VideoDesc;
00471
00472 typedef struct _VMR9DeinterlaceCaps {
00473 DWORD dwSize;
00474 DWORD dwNumPreviousOutputFrames;
00475 DWORD dwNumForwardRefSamples;
00476 DWORD dwNumBackwardRefSamples;
00477 VMR9DeinterlaceTech DeinterlaceTechnology;
00478 } VMR9DeinterlaceCaps;
00479
00480 [
00481 local,
00482 object,
00483 uuid(a215fb8d-13c2-4f7f-993c-003d6271a459),
00484 helpstring("IVMRDeinterlaceControl9 interface"),
00485 pointer_default(unique)
00486 ]
00487 interface IVMRDeinterlaceControl9 : IUnknown
00488 {
00489 HRESULT GetNumberOfDeinterlaceModes([in] VMR9VideoDesc *desc, [in, out] DWORD *nummodes, [out] GUID *modes);
00490 HRESULT GetDeinterlaceModeCaps([in] GUID *mode, [in] VMR9VideoDesc *desc, [out] VMR9DeinterlaceCaps *caps);
00491 HRESULT GetDeinterlaceMode([in] DWORD streamid, [out] GUID *mode);
00492 HRESULT SetDeinterlaceMode([in] DWORD streamid, [in] GUID *mode);
00493 HRESULT GetDeinterlacePrefs([out] DWORD *prefs);
00494 HRESULT SetDeinterlacePrefs([in] DWORD prefs);
00495 HRESULT GetActualDeinterlaceMode([in] DWORD streamid, [out] GUID *mode);
00496 };
00497
00498 typedef struct _VMR9VideoStreamInfo {
00499 IDirect3DSurface9 *pddsVideoSurface;
00500 DWORD dwWidth;
00501 DWORD dwHeight;
00502 DWORD dwStrmID;
00503 FLOAT fAlpha;
00504 VMR9NormalizedRect rNormal;
00505 REFERENCE_TIME rtStart;
00506 REFERENCE_TIME rtEnd;
00507 VMR9_SampleFormat SampleFormat;
00508 } VMR9VideoStreamInfo;
00509
00510 [
00511 local,
00512 object,
00513 uuid(4a5c89eb-df51-4654-ac2a-e48e02bbabf6),
00514 helpstring("IVMRImageCompositor9 interface"),
00515 pointer_default(unique)
00516 ]
00517 interface IVMRImageCompositor9 : IUnknown
00518 {
00519 HRESULT InitCompositionDevice([in] IUnknown *d3ddev);
00520 HRESULT TermCompositionDevice([in] IUnknown *d3ddev);
00521 HRESULT CompositeImage([in] IUnknown *d3ddev, [in] IDirect3DSurface9 *d3dtarget, [in] AM_MEDIA_TYPE *mttarget,
00522 [in] REFERENCE_TIME start, [in] REFERENCE_TIME stop, D3DCOLOR back,
00523 [in] VMR9VideoStreamInfo *info, [in] UINT streams);
00524 };