Home | History | Annotate | Download | only in include
      1 /*** Autogenerated by WIDL 1.5.25 from include/dxva2api.idl - Do not edit ***/
      2 
      3 #ifndef __REQUIRED_RPCNDR_H_VERSION__
      4 #define __REQUIRED_RPCNDR_H_VERSION__ 475
      5 #endif
      6 
      7 #include <rpc.h>
      8 #include <rpcndr.h>
      9 
     10 #ifndef COM_NO_WINDOWS_H
     11 #include <windows.h>
     12 #include <ole2.h>
     13 #endif
     14 
     15 #ifndef __dxva2api_h__
     16 #define __dxva2api_h__
     17 
     18 /* Forward declarations */
     19 
     20 #ifndef __IDirect3DDeviceManager9_FWD_DEFINED__
     21 #define __IDirect3DDeviceManager9_FWD_DEFINED__
     22 typedef interface IDirect3DDeviceManager9 IDirect3DDeviceManager9;
     23 #endif
     24 
     25 /* Headers for imported files */
     26 
     27 #include <unknwn.h>
     28 
     29 #ifdef __cplusplus
     30 extern "C" {
     31 #endif
     32 
     33 #if 0
     34 typedef DWORD IDirect3DDevice9;
     35 typedef DWORD IDirect3DSurface9;
     36 typedef DWORD D3DFORMAT;
     37 typedef DWORD D3DPOOL;
     38 #endif
     39 #ifndef __REFERENCE_TIME_DEFINED
     40 #define __REFERENCE_TIME_DEFINED
     41 typedef LONGLONG REFERENCE_TIME;
     42 #endif /*__REFERENCE_TIME_DEFINED*/
     43 #define DXVA2_ProcAmp_None 0x0000
     44 #define DXVA2_ProcAmp_Brightness 0x0001
     45 #define DXVA2_ProcAmp_Contrast 0x0002
     46 #define DXVA2_ProcAmp_Hue 0x0004
     47 #define DXVA2_ProcAmp_Saturation 0x0008
     48 
     49 #define DXVA2_E_NOT_INITIALIZED     MAKE_HRESULT(1, 4, 4096)
     50 #define DXVA2_E_NEW_VIDEO_DEVICE    MAKE_HRESULT(1, 4, 4097)
     51 #define DXVA2_E_VIDEO_DEVICE_LOCKED MAKE_HRESULT(1, 4, 4098)
     52 #define DXVA2_E_NOT_AVAILABLE       MAKE_HRESULT(1, 4, 4099)
     53 
     54 DEFINE_GUID(IID_IDirectXVideoDecoderService, 0xfc51a551, 0xd5e7, 0x11d9, 0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
     55 DEFINE_GUID(IID_IDirectXVideoAccelerationService, 0xfc51a550, 0xd5e7, 0x11d9, 0xaf,0x55,0x00,0x05,0x4e,0x43,0xff,0x02);
     56 
     57 DEFINE_GUID(DXVA2_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0,0x4563, 0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66);
     58 DEFINE_GUID(DXVA2_ModeMPEG2_IDCT, 0xbf22ad00, 0x03ea,0x4690, 0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e);
     59 DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65, 0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);
     60 DEFINE_GUID(DXVA2_ModeH264_A, 0x1b81be64, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     61 DEFINE_GUID(DXVA2_ModeH264_B, 0x1b81be65, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     62 DEFINE_GUID(DXVA2_ModeH264_C, 0x1b81be66, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     63 DEFINE_GUID(DXVA2_ModeH264_D, 0x1b81be67, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     64 DEFINE_GUID(DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     65 DEFINE_GUID(DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     66 DEFINE_GUID(DXVA2_ModeWMV8_A, 0x1b81be80, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     67 DEFINE_GUID(DXVA2_ModeWMV8_B, 0x1b81be81, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     68 DEFINE_GUID(DXVA2_ModeWMV9_A, 0x1b81be90, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     69 DEFINE_GUID(DXVA2_ModeWMV9_B, 0x1b81be91, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     70 DEFINE_GUID(DXVA2_ModeWMV9_C, 0x1b81be94, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     71 DEFINE_GUID(DXVA2_ModeVC1_A, 0x1b81beA0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     72 DEFINE_GUID(DXVA2_ModeVC1_B, 0x1b81beA1, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     73 DEFINE_GUID(DXVA2_ModeVC1_C, 0x1b81beA2, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     74 DEFINE_GUID(DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
     75 
     76 typedef struct IDirectXVideoDecoderService IDirectXVideoDecoderService;
     77 
     78 typedef enum _DXVA2_SampleFormat {
     79   DXVA2_SampleFormatMask                  = 0x00FF,
     80   DXVA2_SampleUnknown                     = 0,
     81   DXVA2_SampleProgressiveFrame            = 2,
     82   DXVA2_SampleFieldInterleavedEvenFirst   = 3,
     83   DXVA2_SampleFieldInterleavedOddFirst    = 4,
     84   DXVA2_SampleFieldSingleEven             = 5,
     85   DXVA2_SampleFieldSingleOdd              = 6,
     86   DXVA2_SampleSubStream                   = 7
     87 } DXVA2_SampleFormat;
     88 
     89 typedef enum _DXVA2_VideoChromaSubSampling {
     90   DXVA2_VideoChromaSubsamplingMask                              = 0x0F,
     91   DXVA2_VideoChromaSubsampling_Unknown                          = 0,
     92   DXVA2_VideoChromaSubsampling_ProgressiveChroma                = 0x8,
     93   DXVA2_VideoChromaSubsampling_Horizontally_Cosited             = 0x4,
     94   DXVA2_VideoChromaSubsampling_Vertically_Cosited               = 0x2,
     95   DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes   = 0x1,
     96   DXVA2_VideoChromaSubsampling_MPEG2                            =
     97               DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
     98               DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,
     99   DXVA2_VideoChromaSubsampling_MPEG1                            =
    100               DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,
    101   DXVA2_VideoChromaSubsampling_DV_PAL                           =
    102               DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
    103               DXVA2_VideoChromaSubsampling_Vertically_Cosited,
    104   DXVA2_VideoChromaSubsampling_Cosited                          =
    105               DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
    106               DXVA2_VideoChromaSubsampling_Vertically_Cosited |
    107               DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes
    108 } DXVA2_VideoChromaSubSampling;
    109 
    110 typedef enum _DXVA2_NominalRange {
    111   DXVA2_NominalRangeMask       = 0x07,
    112   DXVA2_NominalRange_Unknown   = 0,
    113   DXVA2_NominalRange_Normal    = 1,
    114   DXVA2_NominalRange_Wide      = 2,
    115   DXVA2_NominalRange_0_255     = 1,
    116   DXVA2_NominalRange_16_235    = 2,
    117   DXVA2_NominalRange_48_208    = 3
    118 } DXVA2_NominalRange;
    119 
    120 typedef enum _DXVA2_VideoLighting {
    121   DXVA2_VideoLightingMask       = 0x0F,
    122   DXVA2_VideoLighting_Unknown   = 0,
    123   DXVA2_VideoLighting_bright    = 1,
    124   DXVA2_VideoLighting_office    = 2,
    125   DXVA2_VideoLighting_dim       = 3,
    126   DXVA2_VideoLighting_dark      = 4
    127 } DXVA2_VideoLighting;
    128 
    129 typedef enum _DXVA2_VideoPrimaries {
    130   DXVA2_VideoPrimariesMask             = 0x001f,
    131   DXVA2_VideoPrimaries_Unknown         = 0,
    132   DXVA2_VideoPrimaries_reserved        = 1,
    133   DXVA2_VideoPrimaries_BT709           = 2,
    134   DXVA2_VideoPrimaries_BT470_2_SysM    = 3,
    135   DXVA2_VideoPrimaries_BT470_2_SysBG   = 4,
    136   DXVA2_VideoPrimaries_SMPTE170M       = 5,
    137   DXVA2_VideoPrimaries_SMPTE240M       = 6,
    138   DXVA2_VideoPrimaries_EBU3213         = 7,
    139   DXVA2_VideoPrimaries_SMPTE_C         = 8
    140 } DXVA2_VideoPrimaries;
    141 
    142 typedef enum _DXVA2_VideoTransferFunction {
    143   DXVA2_VideoTransFuncMask       = 0x001f,
    144   DXVA2_VideoTransFunc_Unknown   = 0,
    145   DXVA2_VideoTransFunc_10        = 1,
    146   DXVA2_VideoTransFunc_18        = 2,
    147   DXVA2_VideoTransFunc_20        = 3,
    148   DXVA2_VideoTransFunc_22        = 4,
    149   DXVA2_VideoTransFunc_709       = 5,
    150   DXVA2_VideoTransFunc_240M      = 6,
    151   DXVA2_VideoTransFunc_sRGB      = 7,
    152   DXVA2_VideoTransFunc_28        = 8
    153 } DXVA2_VideoTransferFunction;
    154 
    155 typedef enum  {
    156   DXVA2_SurfaceType_DecoderRenderTarget      = 0,
    157   DXVA2_SurfaceType_ProcessorRenderTarget    = 1,
    158   DXVA2_SurfaceType_D3DRenderTargetTexture   = 2
    159 } DXVA2_SurfaceType;
    160 
    161 typedef enum _DXVA2_VideoTransferMatrix {
    162   DXVA2_VideoTransferMatrixMask         = 0x07,
    163   DXVA2_VideoTransferMatrix_Unknown     = 0,
    164   DXVA2_VideoTransferMatrix_BT709       = 1,
    165   DXVA2_VideoTransferMatrix_BT601       = 2,
    166   DXVA2_VideoTransferMatrix_SMPTE240M   = 3
    167 } DXVA2_VideoTransferMatrix;
    168 
    169 typedef struct _DXVA2_AYUVSample16 {
    170   USHORT Cr;
    171   USHORT Cb;
    172   USHORT Y;
    173   USHORT Alpha;
    174 } DXVA2_AYUVSample16;
    175 
    176 typedef struct _DXVA2_AYUVSample8 {
    177   UCHAR Cr;
    178   UCHAR Cb;
    179   UCHAR Y;
    180   UCHAR Alpha;
    181 } DXVA2_AYUVSample8;
    182 
    183 typedef struct _DXVA2_ConfigPictureDecode {
    184   GUID   guidConfigBitstreamEncryption;
    185   GUID   guidConfigMBcontrolEncryption;
    186   GUID   guidConfigResidDiffEncryption;
    187   UINT   ConfigBitstreamRaw;
    188   UINT   ConfigMBcontrolRasterOrder;
    189   UINT   ConfigResidDiffHost;
    190   UINT   ConfigSpatialResid8;
    191   UINT   ConfigResid8Subtraction;
    192   UINT   ConfigSpatialHost8or9Clipping;
    193   UINT   ConfigSpatialResidInterleaved;
    194   UINT   ConfigIntraResidUnsigned;
    195   UINT   ConfigResidDiffAccelerator;
    196   UINT   ConfigHostInverseScan;
    197   UINT   ConfigSpecificIDCT;
    198   UINT   Config4GroupedCoefs;
    199   USHORT ConfigMinRenderTargetBuffCount;
    200   USHORT ConfigDecoderSpecific;
    201 } DXVA2_ConfigPictureDecode;
    202 
    203 typedef struct _DXVA2_DecodeBufferDesc {
    204   DWORD CompressedBufferType;
    205   UINT  BufferIndex;
    206   UINT  DataOffset;
    207   UINT  DataSize;
    208   UINT  FirstMBaddress;
    209   UINT  NumMBsInBuffer;
    210   UINT  Width;
    211   UINT  Height;
    212   UINT  Stride;
    213   UINT  ReservedBits;
    214   PVOID pvPVPState;
    215 } DXVA2_DecodeBufferDesc;
    216 
    217 typedef struct _DXVA2_DecodeExtensionData {
    218   UINT  Function;
    219   PVOID pPrivateInputData;
    220   UINT  PrivateInputDataSize;
    221   PVOID pPrivateOutputData;
    222   UINT  PrivateOutputDataSize;
    223 } DXVA2_DecodeExtensionData;
    224 
    225 typedef struct _DXVA2_DecodeExecuteParams {
    226   UINT                      NumCompBuffers;
    227   DXVA2_DecodeBufferDesc    *pCompressedBuffers;
    228   DXVA2_DecodeExtensionData *pExtensionData;
    229 } DXVA2_DecodeExecuteParams;
    230 
    231 typedef struct {
    232   __C89_NAMELESS union {
    233     __C89_NAMELESS struct {
    234       UINT SampleFormat            :8;
    235       UINT VideoChromaSubsampling  :4;
    236       UINT NominalRange            :3;
    237       UINT VideoTransferMatrix     :3;
    238       UINT VideoLighting           :4;
    239       UINT VideoPrimaries          :5;
    240       UINT VideoTransferFunction   :5;
    241     } DUMMYSTRUCTNAME;
    242     UINT   value;
    243   } DUMMYUNIONNAME;
    244 } DXVA2_ExtendedFormat;
    245 
    246 typedef struct _DXVA2_Fixed32 {
    247   __C89_NAMELESS union {
    248     __C89_NAMELESS struct {
    249       USHORT Fraction;
    250       SHORT  Value;
    251     } DUMMYSTRUCTNAME;
    252     LONG   ll;
    253   } DUMMYUNIONNAME;
    254 } DXVA2_Fixed32;
    255 
    256 typedef struct _DXVA2_FilterValues {
    257   DXVA2_Fixed32 Level;
    258   DXVA2_Fixed32 Threshold;
    259   DXVA2_Fixed32 Radius;
    260 } DXVA2_FilterValues;
    261 
    262 typedef struct _DXVA2_Frequency {
    263   UINT Numerator;
    264   UINT Denominator;
    265 } DXVA2_Frequency;
    266 
    267 typedef struct _DXVA2_ProcAmpValues {
    268   DXVA2_Fixed32 Brightness;
    269   DXVA2_Fixed32 Contrast;
    270   DXVA2_Fixed32 Hue;
    271   DXVA2_Fixed32 Saturation;
    272 } DXVA2_ProcAmpValues;
    273 
    274 typedef struct _DXVA2_ValueRange {
    275   DXVA2_Fixed32 MinValue;
    276   DXVA2_Fixed32 MaxValue;
    277   DXVA2_Fixed32 DefaultValue;
    278   DXVA2_Fixed32 StepSize;
    279 } DXVA2_ValueRange;
    280 
    281 typedef struct _DXVA2_VideoDesc {
    282   UINT                 SampleWidth;
    283   UINT                 SampleHeight;
    284   DXVA2_ExtendedFormat SampleFormat;
    285   D3DFORMAT            Format;
    286   DXVA2_Frequency      InputSampleFreq;
    287   DXVA2_Frequency      OutputFrameFreq;
    288   UINT                 UABProtectionLevel;
    289   UINT                 Reserved;
    290 } DXVA2_VideoDesc;
    291 
    292 /* DeviceCaps
    293 DXVA2_VPDev_EmulatedDXVA1
    294 DXVA2_VPDev_HardwareDevice
    295 DXVA2_VPDev_SoftwareDevice
    296 */
    297 /* DeinterlaceTechnology
    298 DXVA2_DeinterlaceTech_Unknown
    299 DXVA2_DeinterlaceTech_BOBLineReplicate
    300 DXVA2_DeinterlaceTech_BOBVerticalStretch
    301 DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap
    302 DXVA2_DeinterlaceTech_MedianFiltering
    303 DXVA2_DeinterlaceTech_EdgeFiltering
    304 DXVA2_DeinterlaceTech_FieldAdaptive
    305 DXVA2_DeinterlaceTech_PixelAdaptive
    306 DXVA2_DeinterlaceTech_MotionVectorSteered
    307 DXVA2_DeinterlaceTech_InverseTelecine
    308 */
    309 
    310 /* VideoProcessorOperations
    311 DXVA2_VideoProcess_YUV2RGB
    312 DXVA2_VideoProcess_StretchX
    313 DXVA2_VideoProcess_StretchY
    314 DXVA2_VideoProcess_AlphaBlend
    315 DXVA2_VideoProcess_SubRects
    316 DXVA2_VideoProcess_SubStreams
    317 DXVA2_VideoProcess_SubStreamsExtended
    318 DXVA2_VideoProcess_YUV2RGBExtended
    319 DXVA2_VideoProcess_AlphaBlendExtended
    320 DXVA2_VideoProcess_Constriction
    321 DXVA2_VideoProcess_NoiseFilter
    322 DXVA2_VideoProcess_DetailFilter
    323 DXVA2_VideoProcess_PlanarAlpha
    324 DXVA2_VideoProcess_LinearScaling
    325 DXVA2_VideoProcess_GammaCompensated
    326 DXVA2_VideoProcess_MaintainsOriginalFieldData
    327 */
    328 
    329 /*NoiseFilterTechnology
    330 DXVA2_NoiseFilterTech_Unsupported
    331 DXVA2_NoiseFilterTech_Unknown
    332 DXVA2_NoiseFilterTech_Median
    333 DXVA2_NoiseFilterTech_Temporal
    334 DXVA2_NoiseFilterTech_BlockNoise
    335 DXVA2_NoiseFilterTech_MosquitoNoise
    336 */
    337 
    338 /* DetailFilterTechnology
    339 DXVA2_DetailFilterTech_Unsupported
    340 DXVA2_DetailFilterTech_Unknown
    341 DXVA2_DetailFilterTech_Edge
    342 DXVA2_DetailFilterTech_Sharpening
    343 */
    344 typedef struct _DXVA2_VideoProcessBltParams {
    345   REFERENCE_TIME       TargetFrame;
    346   RECT                 TargetRect;
    347   SIZE                 ConstrictionSize;
    348   UINT                 StreamingFlags;
    349   DXVA2_AYUVSample16   BackgroundColor;
    350   DXVA2_ExtendedFormat DestFormat;
    351   DXVA2_ProcAmpValues  ProcAmpValues;
    352   DXVA2_Fixed32        Alpha;
    353   DXVA2_FilterValues   NoiseFilterLuma;
    354   DXVA2_FilterValues   NoiseFilterChroma;
    355   DXVA2_FilterValues   DetailFilterLuma;
    356   DXVA2_FilterValues   DetailFilterChroma;
    357   DWORD                DestData;
    358 } DXVA2_VideoProcessBltParams;
    359 
    360 typedef struct _DXVA2_VideoProcessorCaps {
    361   UINT    DeviceCaps;
    362   D3DPOOL InputPool;
    363   UINT    NumForwardRefSamples;
    364   UINT    NumBackwardRefSamples;
    365   UINT    Reserved;
    366   UINT    DeinterlaceTechnology;
    367   UINT    ProcAmpControlCaps;
    368   UINT    VideoProcessorOperations;
    369   UINT    NoiseFilterTechnology;
    370   UINT    DetailFilterTechnology;
    371 } DXVA2_VideoProcessorCaps;
    372 
    373 /* SampleData
    374 DXVA2_SampleData_RFF
    375 DXVA2_SampleData_TFF
    376 DXVA2_SampleData_RFF_TFF_Present
    377 */
    378 
    379 typedef struct _DXVA2_VideoSample {
    380   REFERENCE_TIME       Start;
    381   REFERENCE_TIME       End;
    382   DXVA2_ExtendedFormat SampleFormat;
    383   IDirect3DSurface9*   SrcSurface;
    384   RECT                 SrcRect;
    385   RECT                 DstRect;
    386   DXVA2_AYUVSample8    Pal[16];
    387   DXVA2_Fixed32        PlanarAlpha;
    388   DWORD                SampleData;
    389 } DXVA2_VideoSample;
    390 
    391 /* Constants */
    392 
    393 #define DXVA2_VideoDecoderRenderTarget 0
    394 #define DXVA2_VideoProcessorRenderTarget 1
    395 #define DXVA2_VideoSoftwareRenderTarget 2
    396 
    397 /* CompressedBufferType */
    398 #define DXVA2_PictureParametersBufferType 0
    399 #define DXVA2_MacroBlockControlBufferType 1
    400 #define DXVA2_ResidualDifferenceBufferType 2
    401 #define DXVA2_DeblockingControlBufferType 3
    402 #define DXVA2_InverseQuantizationMatrixBufferType 4
    403 #define DXVA2_SliceControlBufferType 5
    404 #define DXVA2_BitStreamDateBufferType 6
    405 #define DXVA2_MotionVectorBuffer 7
    406 #define DXVA2_FilmGrainBuffer 8
    407 
    408 __forceinline const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {
    409   DXVA2_Fixed32 f32;
    410   f32.ll = 0 + (1 << 16);
    411   return f32;
    412 }
    413 
    414 __forceinline const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {
    415   DXVA2_Fixed32 f32;
    416   f32.ll = 0;
    417   return f32;
    418 }
    419 
    420 __forceinline float DXVA2FixedToFloat (const DXVA2_Fixed32 f32) {
    421   return (float)f32.Value + (float)f32.Fraction / (1 << 16);
    422 }
    423 
    424 __forceinline DXVA2_Fixed32 DXVA2FloatToFixed (const float f) {
    425   DXVA2_Fixed32 f32;
    426   f32.Value    = ((ULONG) (f * (1 << 16))) >> 16;
    427   f32.Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;
    428   return f32;
    429 }
    430 
    431 HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9(UINT *pResetToken,IDirect3DDeviceManager9 **ppDXVAManager);
    432 HRESULT WINAPI DXVA2CreateVideoService(IDirect3DDevice9 *pDD,REFIID riid,void **ppService);
    433 /*****************************************************************************
    434  * IDirect3DDeviceManager9 interface
    435  */
    436 #ifndef __IDirect3DDeviceManager9_INTERFACE_DEFINED__
    437 #define __IDirect3DDeviceManager9_INTERFACE_DEFINED__
    438 
    439 DEFINE_GUID(IID_IDirect3DDeviceManager9, 0xa0cade0f, 0x06d5, 0x4cf4, 0xa1,0xc7, 0xf3,0xcd,0xd7,0x25,0xaa,0x75);
    440 #if defined(__cplusplus) && !defined(CINTERFACE)
    441 MIDL_INTERFACE("a0cade0f-06d5-4cf4-a1c7-f3cdd725aa75")
    442 IDirect3DDeviceManager9 : public IUnknown
    443 {
    444     virtual HRESULT STDMETHODCALLTYPE ResetDevice(
    445         IDirect3DDevice9 *pDevice,
    446         UINT resetToken) = 0;
    447 
    448     virtual HRESULT STDMETHODCALLTYPE OpenDeviceHandle(
    449         HANDLE *phDevice) = 0;
    450 
    451     virtual HRESULT STDMETHODCALLTYPE CloseDeviceHandle(
    452         HANDLE hDevice) = 0;
    453 
    454     virtual HRESULT STDMETHODCALLTYPE TestDevice(
    455         HANDLE hDevice) = 0;
    456 
    457     virtual HRESULT STDMETHODCALLTYPE LockDevice(
    458         HANDLE hDevice,
    459         IDirect3DDevice9 **ppDevice,
    460         WINBOOL fBlock) = 0;
    461 
    462     virtual HRESULT STDMETHODCALLTYPE UnlockDevice(
    463         HANDLE hDevice,
    464         WINBOOL fSaveState) = 0;
    465 
    466     virtual HRESULT STDMETHODCALLTYPE GetVideoService(
    467         HANDLE hDevice,
    468         REFIID riid,
    469         void **ppService) = 0;
    470 
    471 };
    472 #ifdef __CRT_UUID_DECL
    473 __CRT_UUID_DECL(IDirect3DDeviceManager9, 0xa0cade0f, 0x06d5, 0x4cf4, 0xa1,0xc7, 0xf3,0xcd,0xd7,0x25,0xaa,0x75)
    474 #endif
    475 #else
    476 typedef struct IDirect3DDeviceManager9Vtbl {
    477     BEGIN_INTERFACE
    478 
    479     /*** IUnknown methods ***/
    480     HRESULT (STDMETHODCALLTYPE *QueryInterface)(
    481         IDirect3DDeviceManager9* This,
    482         REFIID riid,
    483         void **ppvObject);
    484 
    485     ULONG (STDMETHODCALLTYPE *AddRef)(
    486         IDirect3DDeviceManager9* This);
    487 
    488     ULONG (STDMETHODCALLTYPE *Release)(
    489         IDirect3DDeviceManager9* This);
    490 
    491     /*** IDirect3DDeviceManager9 methods ***/
    492     HRESULT (STDMETHODCALLTYPE *ResetDevice)(
    493         IDirect3DDeviceManager9* This,
    494         IDirect3DDevice9 *pDevice,
    495         UINT resetToken);
    496 
    497     HRESULT (STDMETHODCALLTYPE *OpenDeviceHandle)(
    498         IDirect3DDeviceManager9* This,
    499         HANDLE *phDevice);
    500 
    501     HRESULT (STDMETHODCALLTYPE *CloseDeviceHandle)(
    502         IDirect3DDeviceManager9* This,
    503         HANDLE hDevice);
    504 
    505     HRESULT (STDMETHODCALLTYPE *TestDevice)(
    506         IDirect3DDeviceManager9* This,
    507         HANDLE hDevice);
    508 
    509     HRESULT (STDMETHODCALLTYPE *LockDevice)(
    510         IDirect3DDeviceManager9* This,
    511         HANDLE hDevice,
    512         IDirect3DDevice9 **ppDevice,
    513         WINBOOL fBlock);
    514 
    515     HRESULT (STDMETHODCALLTYPE *UnlockDevice)(
    516         IDirect3DDeviceManager9* This,
    517         HANDLE hDevice,
    518         WINBOOL fSaveState);
    519 
    520     HRESULT (STDMETHODCALLTYPE *GetVideoService)(
    521         IDirect3DDeviceManager9* This,
    522         HANDLE hDevice,
    523         REFIID riid,
    524         void **ppService);
    525 
    526     END_INTERFACE
    527 } IDirect3DDeviceManager9Vtbl;
    528 interface IDirect3DDeviceManager9 {
    529     CONST_VTBL IDirect3DDeviceManager9Vtbl* lpVtbl;
    530 };
    531 
    532 #ifdef COBJMACROS
    533 #ifndef WIDL_C_INLINE_WRAPPERS
    534 /*** IUnknown methods ***/
    535 #define IDirect3DDeviceManager9_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    536 #define IDirect3DDeviceManager9_AddRef(This) (This)->lpVtbl->AddRef(This)
    537 #define IDirect3DDeviceManager9_Release(This) (This)->lpVtbl->Release(This)
    538 /*** IDirect3DDeviceManager9 methods ***/
    539 #define IDirect3DDeviceManager9_ResetDevice(This,pDevice,resetToken) (This)->lpVtbl->ResetDevice(This,pDevice,resetToken)
    540 #define IDirect3DDeviceManager9_OpenDeviceHandle(This,phDevice) (This)->lpVtbl->OpenDeviceHandle(This,phDevice)
    541 #define IDirect3DDeviceManager9_CloseDeviceHandle(This,hDevice) (This)->lpVtbl->CloseDeviceHandle(This,hDevice)
    542 #define IDirect3DDeviceManager9_TestDevice(This,hDevice) (This)->lpVtbl->TestDevice(This,hDevice)
    543 #define IDirect3DDeviceManager9_LockDevice(This,hDevice,ppDevice,fBlock) (This)->lpVtbl->LockDevice(This,hDevice,ppDevice,fBlock)
    544 #define IDirect3DDeviceManager9_UnlockDevice(This,hDevice,fSaveState) (This)->lpVtbl->UnlockDevice(This,hDevice,fSaveState)
    545 #define IDirect3DDeviceManager9_GetVideoService(This,hDevice,riid,ppService) (This)->lpVtbl->GetVideoService(This,hDevice,riid,ppService)
    546 #else
    547 /*** IUnknown methods ***/
    548 static FORCEINLINE HRESULT IDirect3DDeviceManager9_QueryInterface(IDirect3DDeviceManager9* This,REFIID riid,void **ppvObject) {
    549     return This->lpVtbl->QueryInterface(This,riid,ppvObject);
    550 }
    551 static FORCEINLINE ULONG IDirect3DDeviceManager9_AddRef(IDirect3DDeviceManager9* This) {
    552     return This->lpVtbl->AddRef(This);
    553 }
    554 static FORCEINLINE ULONG IDirect3DDeviceManager9_Release(IDirect3DDeviceManager9* This) {
    555     return This->lpVtbl->Release(This);
    556 }
    557 /*** IDirect3DDeviceManager9 methods ***/
    558 static FORCEINLINE HRESULT IDirect3DDeviceManager9_ResetDevice(IDirect3DDeviceManager9* This,IDirect3DDevice9 *pDevice,UINT resetToken) {
    559     return This->lpVtbl->ResetDevice(This,pDevice,resetToken);
    560 }
    561 static FORCEINLINE HRESULT IDirect3DDeviceManager9_OpenDeviceHandle(IDirect3DDeviceManager9* This,HANDLE *phDevice) {
    562     return This->lpVtbl->OpenDeviceHandle(This,phDevice);
    563 }
    564 static FORCEINLINE HRESULT IDirect3DDeviceManager9_CloseDeviceHandle(IDirect3DDeviceManager9* This,HANDLE hDevice) {
    565     return This->lpVtbl->CloseDeviceHandle(This,hDevice);
    566 }
    567 static FORCEINLINE HRESULT IDirect3DDeviceManager9_TestDevice(IDirect3DDeviceManager9* This,HANDLE hDevice) {
    568     return This->lpVtbl->TestDevice(This,hDevice);
    569 }
    570 static FORCEINLINE HRESULT IDirect3DDeviceManager9_LockDevice(IDirect3DDeviceManager9* This,HANDLE hDevice,IDirect3DDevice9 **ppDevice,WINBOOL fBlock) {
    571     return This->lpVtbl->LockDevice(This,hDevice,ppDevice,fBlock);
    572 }
    573 static FORCEINLINE HRESULT IDirect3DDeviceManager9_UnlockDevice(IDirect3DDeviceManager9* This,HANDLE hDevice,WINBOOL fSaveState) {
    574     return This->lpVtbl->UnlockDevice(This,hDevice,fSaveState);
    575 }
    576 static FORCEINLINE HRESULT IDirect3DDeviceManager9_GetVideoService(IDirect3DDeviceManager9* This,HANDLE hDevice,REFIID riid,void **ppService) {
    577     return This->lpVtbl->GetVideoService(This,hDevice,riid,ppService);
    578 }
    579 #endif
    580 #endif
    581 
    582 #endif
    583 
    584 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_ResetDevice_Proxy(
    585     IDirect3DDeviceManager9* This,
    586     IDirect3DDevice9 *pDevice,
    587     UINT resetToken);
    588 void __RPC_STUB IDirect3DDeviceManager9_ResetDevice_Stub(
    589     IRpcStubBuffer* This,
    590     IRpcChannelBuffer* pRpcChannelBuffer,
    591     PRPC_MESSAGE pRpcMessage,
    592     DWORD* pdwStubPhase);
    593 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_OpenDeviceHandle_Proxy(
    594     IDirect3DDeviceManager9* This,
    595     HANDLE *phDevice);
    596 void __RPC_STUB IDirect3DDeviceManager9_OpenDeviceHandle_Stub(
    597     IRpcStubBuffer* This,
    598     IRpcChannelBuffer* pRpcChannelBuffer,
    599     PRPC_MESSAGE pRpcMessage,
    600     DWORD* pdwStubPhase);
    601 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_CloseDeviceHandle_Proxy(
    602     IDirect3DDeviceManager9* This,
    603     HANDLE hDevice);
    604 void __RPC_STUB IDirect3DDeviceManager9_CloseDeviceHandle_Stub(
    605     IRpcStubBuffer* This,
    606     IRpcChannelBuffer* pRpcChannelBuffer,
    607     PRPC_MESSAGE pRpcMessage,
    608     DWORD* pdwStubPhase);
    609 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_TestDevice_Proxy(
    610     IDirect3DDeviceManager9* This,
    611     HANDLE hDevice);
    612 void __RPC_STUB IDirect3DDeviceManager9_TestDevice_Stub(
    613     IRpcStubBuffer* This,
    614     IRpcChannelBuffer* pRpcChannelBuffer,
    615     PRPC_MESSAGE pRpcMessage,
    616     DWORD* pdwStubPhase);
    617 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_LockDevice_Proxy(
    618     IDirect3DDeviceManager9* This,
    619     HANDLE hDevice,
    620     IDirect3DDevice9 **ppDevice,
    621     WINBOOL fBlock);
    622 void __RPC_STUB IDirect3DDeviceManager9_LockDevice_Stub(
    623     IRpcStubBuffer* This,
    624     IRpcChannelBuffer* pRpcChannelBuffer,
    625     PRPC_MESSAGE pRpcMessage,
    626     DWORD* pdwStubPhase);
    627 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_UnlockDevice_Proxy(
    628     IDirect3DDeviceManager9* This,
    629     HANDLE hDevice,
    630     WINBOOL fSaveState);
    631 void __RPC_STUB IDirect3DDeviceManager9_UnlockDevice_Stub(
    632     IRpcStubBuffer* This,
    633     IRpcChannelBuffer* pRpcChannelBuffer,
    634     PRPC_MESSAGE pRpcMessage,
    635     DWORD* pdwStubPhase);
    636 HRESULT STDMETHODCALLTYPE IDirect3DDeviceManager9_GetVideoService_Proxy(
    637     IDirect3DDeviceManager9* This,
    638     HANDLE hDevice,
    639     REFIID riid,
    640     void **ppService);
    641 void __RPC_STUB IDirect3DDeviceManager9_GetVideoService_Stub(
    642     IRpcStubBuffer* This,
    643     IRpcChannelBuffer* pRpcChannelBuffer,
    644     PRPC_MESSAGE pRpcMessage,
    645     DWORD* pdwStubPhase);
    646 
    647 #endif  /* __IDirect3DDeviceManager9_INTERFACE_DEFINED__ */
    648 
    649 #undef  INTERFACE
    650 #define INTERFACE IDirectXVideoDecoder
    651 DECLARE_INTERFACE_(IDirectXVideoDecoder,IUnknown)
    652 {
    653     BEGIN_INTERFACE
    654 
    655     /* IUnknown methods */
    656     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    657     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    658     STDMETHOD_(ULONG, Release)(THIS) PURE;
    659 
    660     /* IDirectXVideoDecoder methods */
    661     STDMETHOD_(HRESULT,GetVideoDecoderService)(THIS_ IDirectXVideoDecoderService **ppAccelServices) PURE;
    662     STDMETHOD_(HRESULT,GetCreationParameters)(THIS_ GUID *pDeviceGuid,DXVA2_VideoDesc *pVideoDesc,DXVA2_ConfigPictureDecode *pConfig,IDirect3DSurface9 ***pppDecoderRenderTargets,UINT *pNumSurfaces) PURE;
    663     STDMETHOD_(HRESULT,GetBuffer)(THIS_ UINT BufferType,void **ppBuffer,UINT *pBufferSize) PURE;
    664     STDMETHOD_(HRESULT,ReleaseBuffer)(THIS_ UINT BufferType) PURE;
    665     STDMETHOD_(HRESULT,BeginFrame)(THIS_ IDirect3DSurface9 *pRenderTarget,void *pvPVPData) PURE;
    666     STDMETHOD_(HRESULT,EndFrame)(THIS_ HANDLE *pHandleComplete) PURE;
    667     STDMETHOD_(HRESULT,Execute)(THIS_ const DXVA2_DecodeExecuteParams *pExecuteParams) PURE;
    668 
    669     END_INTERFACE
    670 };
    671 #ifdef COBJMACROS
    672 #define IDirectXVideoDecoder_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    673 #define IDirectXVideoDecoder_AddRef(This) (This)->lpVtbl->AddRef(This)
    674 #define IDirectXVideoDecoder_Release(This) (This)->lpVtbl->Release(This)
    675 #define IDirectXVideoDecoder_GetVideoDecoderService(This,ppAccelServices) (This)->lpVtbl->GetVideoDecoderService(This,ppAccelServices)
    676 #define IDirectXVideoDecoder_GetCreationParameters(This,pDeviceGuid,pVideoDesc,pConfig,pppDecoderRenderTargets,pNumSurfaces) (This)->lpVtbl->GetCreationParameters(This,pDeviceGuid,pVideoDesc,pConfig,pppDecoderRenderTargets,pNumSurfaces)
    677 #define IDirectXVideoDecoder_GetBuffer(This,BufferType,ppBuffer,pBufferSize) (This)->lpVtbl->GetBuffer(This,BufferType,ppBuffer,pBufferSize)
    678 #define IDirectXVideoDecoder_ReleaseBuffer(This,BufferType) (This)->lpVtbl->ReleaseBuffer(This,BufferType)
    679 #define IDirectXVideoDecoder_BeginFrame(This,pRenderTarget,pvPVPData) (This)->lpVtbl->BeginFrame(This,pRenderTarget,pvPVPData)
    680 #define IDirectXVideoDecoder_EndFrame(This,pHandleComplete) (This)->lpVtbl->EndFrame(This,pHandleComplete)
    681 #define IDirectXVideoDecoder_Execute(This,pExecuteParams) (This)->lpVtbl->Execute(This,pExecuteParams)
    682 #endif /*COBJMACROS*/
    683 
    684 #undef  INTERFACE
    685 #define INTERFACE IDirectXVideoAccelerationService
    686 DECLARE_INTERFACE_(IDirectXVideoAccelerationService,IUnknown)
    687 {
    688     BEGIN_INTERFACE
    689 
    690     /* IUnknown methods */
    691     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    692     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    693     STDMETHOD_(ULONG, Release)(THIS) PURE;
    694 
    695     /* IDirectXVideoAccelerationService methods */
    696     STDMETHOD_(HRESULT,CreateSurface)(THIS_ UINT Width,UINT Height,UINT BackBuffers,D3DFORMAT Format,D3DPOOL Pool,DWORD Usage,DWORD DxvaType,IDirect3DSurface9 **ppSurface,HANDLE *pSharedHandle) PURE;
    697 
    698     END_INTERFACE
    699 };
    700 #ifdef COBJMACROS
    701 #define IDirectXVideoAccelerationService_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    702 #define IDirectXVideoAccelerationService_AddRef(This) (This)->lpVtbl->AddRef(This)
    703 #define IDirectXVideoAccelerationService_Release(This) (This)->lpVtbl->Release(This)
    704 #define IDirectXVideoAccelerationService_CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle) (This)->lpVtbl->CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle)
    705 #endif /*COBJMACROS*/
    706 
    707 #undef  INTERFACE
    708 #define INTERFACE IDirectXVideoDecoderService
    709 DECLARE_INTERFACE_(IDirectXVideoDecoderService,IDirectXVideoAccelerationService)
    710 {
    711     BEGIN_INTERFACE
    712 
    713     /* IUnknown methods */
    714     STDMETHOD(QueryInterface)(THIS_ REFIID riid, void **ppvObject) PURE;
    715     STDMETHOD_(ULONG, AddRef)(THIS) PURE;
    716     STDMETHOD_(ULONG, Release)(THIS) PURE;
    717 
    718     /* IDirectXVideoAccelerationService methods */
    719     STDMETHOD_(HRESULT,CreateSurface)(THIS_ UINT Width,UINT Height,UINT BackBuffers,D3DFORMAT Format,D3DPOOL Pool,DWORD Usage,DWORD DxvaType,IDirect3DSurface9 **ppSurface,HANDLE *pSharedHandle) PURE;
    720 
    721     /* IDirectXVideoDecoderService methods */
    722     STDMETHOD_(HRESULT,GetDecoderDeviceGuids)(THIS_ UINT *Count,GUID **pGuids) PURE;
    723     STDMETHOD_(HRESULT,GetDecoderRenderTargets)(THIS_ REFGUID Guid,UINT *pCount,D3DFORMAT **pFormats) PURE;
    724     STDMETHOD_(HRESULT,GetDecoderConfigurations)(THIS_ REFGUID Guid,const DXVA2_VideoDesc *pVideoDesc,IUnknown *pReserved,UINT *pCount,DXVA2_ConfigPictureDecode **ppConfigs) PURE;
    725     STDMETHOD_(HRESULT,CreateVideoDecoder)(THIS_ REFGUID Guid,const DXVA2_VideoDesc *pVideoDesc,DXVA2_ConfigPictureDecode *pConfig,IDirect3DSurface9 **ppDecoderRenderTargets,UINT NumSurfaces,IDirectXVideoDecoder **ppDecode) PURE;
    726 
    727     END_INTERFACE
    728 };
    729 #ifdef COBJMACROS
    730 #define IDirectXVideoDecoderService_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
    731 #define IDirectXVideoDecoderService_AddRef(This) (This)->lpVtbl->AddRef(This)
    732 #define IDirectXVideoDecoderService_Release(This) (This)->lpVtbl->Release(This)
    733 #define IDirectXVideoDecoderService_CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle) (This)->lpVtbl->CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle)
    734 #define IDirectXVideoDecoderService_GetDecoderDeviceGuids(This,Count,pGuids) (This)->lpVtbl->GetDecoderDeviceGuids(This,Count,pGuids)
    735 #define IDirectXVideoDecoderService_GetDecoderRenderTargets(This,Guid,pCount,pFormats) (This)->lpVtbl->GetDecoderRenderTargets(This,Guid,pCount,pFormats)
    736 #define IDirectXVideoDecoderService_GetDecoderConfigurations(This,Guid,pVideoDesc,pReserved,pCount,ppConfigs) (This)->lpVtbl->GetDecoderConfigurations(This,Guid,pVideoDesc,pReserved,pCount,ppConfigs)
    737 #define IDirectXVideoDecoderService_CreateVideoDecoder(This,Guid,pVideoDesc,pConfig,ppDecoderRenderTargets,NumSurfaces,ppDecode) (This)->lpVtbl->CreateVideoDecoder(This,Guid,pVideoDesc,pConfig,ppDecoderRenderTargets,NumSurfaces,ppDecode)
    738 #endif /*COBJMACROS*/
    739 /* Begin additional prototypes for all interfaces */
    740 
    741 
    742 /* End additional prototypes */
    743 
    744 #ifdef __cplusplus
    745 }
    746 #endif
    747 
    748 #endif /* __dxva2api_h__ */
    749