home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / dvp.h < prev    next >
C/C++ Source or Header  |  1998-04-25  |  29KB  |  884 lines

  1. /*==========================================================================;
  2.  *
  3.  *  Copyright (C) 1996-1997 Microsoft Corporation.  All Rights Reserved.
  4.  *
  5.  *  File:    dvp.h
  6.  *  Content:    DirectDrawVideoPort include file
  7.  *
  8.  ***************************************************************************/
  9.  
  10. #ifndef __DVP_INCLUDED__
  11. #define __DVP_INCLUDED__
  12. #if defined( _WIN32 )  && !defined( _NO_COM )
  13. #define COM_NO_WINDOWS_H
  14. #include <objbase.h>
  15. #else
  16. #define IUnknown        void
  17. #endif
  18.  
  19. #ifdef __cplusplus
  20. extern "C" {
  21. #endif
  22.  
  23. /*
  24.  * GUIDS used by DirectDrawVideoPort objects
  25.  */
  26. #if defined( _WIN32 ) && (!defined( _NO_COM ) || defined( DEFINE_GUID ))
  27. DEFINE_GUID( IID_IDDVideoPortContainer,        0x6C142760,0xA733,0x11CE,0xA5,0x21,0x00,0x20,0xAF,0x0B,0xE5,0x60 );
  28. DEFINE_GUID( IID_IDirectDrawVideoPort,        0xB36D93E0,0x2B43,0x11CF,0xA2,0xDE,0x00,0xAA,0x00,0xB9,0x33,0x56 );
  29.  
  30. DEFINE_GUID( DDVPTYPE_E_HREFH_VREFH, 0x54F39980L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  31. DEFINE_GUID( DDVPTYPE_E_HREFH_VREFL, 0x92783220L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  32. DEFINE_GUID( DDVPTYPE_E_HREFL_VREFH, 0xA07A02E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  33. DEFINE_GUID( DDVPTYPE_E_HREFL_VREFL, 0xE09C77E0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  34. DEFINE_GUID( DDVPTYPE_CCIR656,         0xFCA326A0L,0xDA60,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  35. DEFINE_GUID( DDVPTYPE_BROOKTREE,     0x1352A560L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  36. DEFINE_GUID( DDVPTYPE_PHILIPS,         0x332CF160L,0xDA61,0x11CF,0x9B,0x06,0x00,0xA0,0xC9,0x03,0xA3,0xB8);
  37.  
  38. /*
  39.  * GUIDS used to describe connections
  40.  */
  41.  
  42. #endif
  43.  
  44. /*============================================================================
  45.  *
  46.  * DirectDraw Structures
  47.  *
  48.  * Various structures used to invoke DirectDraw.
  49.  *
  50.  *==========================================================================*/
  51.  
  52. struct IDirectDraw;
  53. struct IDirectDrawSurface;
  54. struct IDirectDrawPalette;
  55. struct IDirectDrawClipper;
  56.  
  57. typedef struct IDDVideoPortContainer        FAR *LPDDVIDEOPORTCONTAINER;
  58. typedef struct IDirectDrawVideoPort        FAR *LPDIRECTDRAWVIDEOPORT;
  59.  
  60. typedef struct _DDVIDEOPORTCONNECT    FAR *LPDDVIDEOPORTCONNECT;
  61. typedef struct _DDVIDEOPORTCAPS        FAR *LPDDVIDEOPORTCAPS;
  62. typedef struct _DDVIDEOPORTDESC        FAR *LPDDVIDEOPORTDESC;
  63. typedef struct _DDVIDEOPORTINFO        FAR *LPDDVIDEOPORTINFO;
  64. typedef struct _DDVIDEOPORTBANDWIDTH    FAR *LPDDVIDEOPORTBANDWIDTH;
  65. typedef struct _DDVIDEOPORTSTATUS    FAR *LPDDVIDEOPORTSTATUS;
  66.  
  67. typedef struct IDDVideoPortContainerVtbl DDVIDEOPORTCONTAINERCALLBACKS;
  68. typedef struct IDirectDrawVideoPortVtbl  DIRECTDRAWVIDEOPORTCALLBACKS;
  69.  
  70.  
  71. /*
  72.  * API's
  73.  */
  74. typedef HRESULT (FAR PASCAL * LPDDENUMVIDEOCALLBACK)(LPDDVIDEOPORTCAPS, LPVOID);
  75.  
  76.  
  77. /*
  78.  * INTERACES FOLLOW:
  79.  *    IDirectDrawVideoPort
  80.  *    IVideoPort
  81.  */
  82.  
  83. /*
  84.  * IDirectDrawVideoPortContainer
  85.  */
  86. #if defined( _WIN32 ) && !defined( _NO_COM )
  87. #undef INTERFACE
  88. #define INTERFACE IDDVideoPortContainer
  89. DECLARE_INTERFACE_( IDDVideoPortContainer, IUnknown )
  90. {
  91.     /*** IUnknown methods ***/
  92.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  93.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  94.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  95.     /*** IDirectDrawVideoPort methods ***/
  96.     STDMETHOD(CreateVideoPort)(THIS_ DWORD, LPDDVIDEOPORTDESC, LPDIRECTDRAWVIDEOPORT FAR *, IUnknown FAR *) PURE;
  97.     STDMETHOD(EnumVideoPorts)(THIS_ DWORD, LPDDVIDEOPORTCAPS, LPVOID,LPDDENUMVIDEOCALLBACK ) PURE;
  98.     STDMETHOD(GetVideoPortConnectInfo)(THIS_ DWORD, LPDWORD, LPDDVIDEOPORTCONNECT ) PURE;
  99.     STDMETHOD(QueryVideoPortStatus)(THIS_ DWORD, LPDDVIDEOPORTSTATUS ) PURE;
  100. };
  101.  
  102. #if !defined(__cplusplus) || defined(CINTERFACE)
  103. #define IVideoPortContainer_QueryInterface(p, a, b)         (p)->lpVtbl->QueryInterface(p, a, b)
  104. #define IVideoPortContainer_AddRef(p)                       (p)->lpVtbl->AddRef(p)
  105. #define IVideoPortContainer_Release(p)                      (p)->lpVtbl->Release(p)
  106. #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d)  (p)->lpVtbl->CreateVideoPort(p, a, b, c, d)
  107. #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d)   (p)->lpVtbl->EnumVideoPorts(p, a, b, c, d)
  108. #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->lpVtbl->GetVideoPortConnectInfo(p, a, b, c)
  109. #define IVideoPortContainer_QueryVideoPortStatus(p, a, b)   (p)->lpVtbl->QueryVideoPortStatus(p, a, b)
  110. #else
  111. #define IVideoPortContainer_QueryInterface(p, a, b)         (p)->QueryInterface(a, b)
  112. #define IVideoPortContainer_AddRef(p)                       (p)->AddRef()
  113. #define IVideoPortContainer_Release(p)                      (p)->Release()
  114. #define IVideoPortContainer_CreateVideoPort(p, a, b, c, d)  (p)->CreateVideoPort(a, b, c, d)
  115. #define IVideoPortContainer_EnumVideoPorts(p, a, b, c, d)   (p)->EnumVideoPorts(a, b, c, d)
  116. #define IVideoPortContainer_GetVideoPortConnectInfo(p, a, b, c) (p)->GetVideoPortConnectInfo(a, b, c)
  117. #define IVideoPortContainer_QueryVideoPortStatus(p, a, b)   (p)->QueryVideoPortStatus(a, b)
  118. #endif
  119.  
  120. #endif
  121.  
  122.  
  123. /*
  124.  * IDirectDrawVideoPort
  125.  */
  126. #if defined( _WIN32 ) && !defined( _NO_COM )
  127. #undef INTERFACE
  128. #define INTERFACE IDirectDrawVideoPort
  129. DECLARE_INTERFACE_( IDirectDrawVideoPort, IUnknown )
  130. {
  131.     /*** IUnknown methods ***/
  132.     STDMETHOD(QueryInterface) (THIS_ REFIID riid, LPVOID FAR * ppvObj) PURE;
  133.     STDMETHOD_(ULONG,AddRef) (THIS)  PURE;
  134.     STDMETHOD_(ULONG,Release) (THIS) PURE;
  135.     /*** IVideoPort methods ***/
  136.     STDMETHOD(Flip)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  137.     STDMETHOD(GetBandwidthInfo)(THIS_ LPDDPIXELFORMAT, DWORD, DWORD, DWORD, LPDDVIDEOPORTBANDWIDTH) PURE;
  138.     STDMETHOD(GetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  139.     STDMETHOD(GetInputFormats)(THIS_ LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
  140.     STDMETHOD(GetOutputFormats)(THIS_ LPDDPIXELFORMAT, LPDWORD, LPDDPIXELFORMAT, DWORD) PURE;
  141.     STDMETHOD(GetFieldPolarity)(THIS_ LPBOOL) PURE;
  142.     STDMETHOD(GetVideoLine)(THIS_ LPDWORD) PURE;
  143.     STDMETHOD(GetVideoSignalStatus)(THIS_ LPDWORD) PURE;
  144.     STDMETHOD(SetColorControls)(THIS_ LPDDCOLORCONTROL) PURE;
  145.     STDMETHOD(SetTargetSurface)(THIS_ LPDIRECTDRAWSURFACE, DWORD) PURE;
  146.     STDMETHOD(StartVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
  147.     STDMETHOD(StopVideo)(THIS) PURE;
  148.     STDMETHOD(UpdateVideo)(THIS_ LPDDVIDEOPORTINFO) PURE;
  149.     STDMETHOD(WaitForSync)(THIS_ DWORD, DWORD, DWORD) PURE;
  150. };
  151.  
  152. #if !defined(__cplusplus) || defined(CINTERFACE)
  153. #define IVideoPort_QueryInterface(p,a,b)        (p)->lpVtbl->QueryInterface(p,a,b)
  154. #define IVideoPort_AddRef(p)                    (p)->lpVtbl->AddRef(p)
  155. #define IVideoPort_Release(p)                   (p)->lpVtbl->Release(p)
  156. #define IVideoPort_SetTargetSurface(p,a,b)    (p)->lpVtbl->SetTargetSurface(p,a,b)
  157. #define IVideoPort_Flip(p,a,b)            (p)->lpVtbl->Flip(p,a,b)
  158. #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->lpVtbl->GetBandwidthInfo(p,a,b,c,d,e)
  159. #define IVideoPort_GetColorControls(p,a)     (p)->lpVtbl->GetColorControls(p,a)
  160. #define IVideoPort_GetInputFormats(p,a,b,c)    (p)->lpVtbl->GetInputFormats(p,a,b,c)
  161. #define IVideoPort_GetOutputFormats(p,a,b,c,d)    (p)->lpVtbl->GetOutputFormats(p,a,b,c,d)
  162. #define IVideoPort_GetFieldPolarity(p,a)    (p)->lpVtbl->GetFieldPolarity(p,a)
  163. #define IVideoPort_GetVideoLine(p,a)        (p)->lpVtbl->GetVideoLine(p,a)
  164. #define IVideoPort_GetVideoSignalStatus(p,a)    (p)->lpVtbl->GetVideoSignalStatus(p,a)
  165. #define IVideoPort_SetColorControls(p,a)    (p)->lpVtbl->SetColorControls(p,a)
  166. #define IVideoPort_StartVideo(p,a)        (p)->lpVtbl->StartVideo(p,a)
  167. #define IVideoPort_StopVideo(p)            (p)->lpVtbl->StopVideo(p)
  168. #define IVideoPort_UpdateVideo(p,a)        (p)->lpVtbl->UpdateVideo(p,a)
  169. #define IVideoPort_WaitForSync(p,a,b,c)        (p)->lpVtbl->WaitForSync(p,a,b,c)
  170. #else
  171. #define IVideoPort_QueryInterface(p,a,b)        (p)->QueryInterface(a,b)
  172. #define IVideoPort_AddRef(p)                    (p)->AddRef()
  173. #define IVideoPort_Release(p)                   (p)->Release()
  174. #define IVideoPort_SetTargetSurface(p,a,b)    (p)->SetTargetSurface(a,b)
  175. #define IVideoPort_Flip(p,a,b)            (p)->Flip(a,b)
  176. #define IVideoPort_GetBandwidthInfo(p,a,b,c,d,e) (p)->GetBandwidthInfo(a,b,c,d,e)
  177. #define IVideoPort_GetColorControls(p,a)     (p)->GetColorControls(a)
  178. #define IVideoPort_GetInputFormats(p,a,b,c)    (p)->GetInputFormats(a,b,c)
  179. #define IVideoPort_GetOutputFormats(p,a,b,c,d)    (p)->GetOutputFormats(a,b,c,d)
  180. #define IVideoPort_GetFieldPolarity(p,a)    (p)->GetFieldPolarity(a)
  181. #define IVideoPort_GetVideoLine(p,a)        (p)->GetVideoLine(a)
  182. #define IVideoPort_GetVideoSignalStatus(p,a)    (p)->GetVideoSignalStatus(a)
  183. #define IVideoPort_SetColorControls(p,a)    (p)->SetColorControls(a)
  184. #define IVideoPort_StartVideo(p,a)        (p)->StartVideo(a)
  185. #define IVideoPort_StopVideo(p)            (p)->StopVideo()
  186. #define IVideoPort_UpdateVideo(p,a)        (p)->UpdateVideo(a)
  187. #define IVideoPort_WaitForSync(p,a,b,c)        (p)->WaitForSync(a,b,c)
  188. #endif
  189.  
  190. #endif
  191.  
  192.  
  193. /*
  194.  * DDVIDEOPORTCONNECT
  195.  */
  196. typedef struct _DDVIDEOPORTCONNECT
  197. {
  198.     DWORD dwSize;           // size of the DDVIDEOPORTCONNECT structure
  199.     DWORD dwPortWidth;      // Width of the video port
  200.     GUID  guidTypeID;       // Description of video port connection
  201.     DWORD dwFlags;          // Connection flags
  202.     DWORD dwReserved1;      // Reserved, set to zero.
  203. } DDVIDEOPORTCONNECT;
  204.  
  205.  
  206. /*
  207.  * DDVIDEOPORTCAPS
  208.  */
  209. typedef struct _DDVIDEOPORTCAPS
  210. {
  211.     DWORD dwSize;            // size of the DDVIDEOPORTCAPS structure
  212.     DWORD dwFlags;            // indicates which fields contain data
  213.     DWORD dwMaxWidth;            // max width of the video port field
  214.     DWORD dwMaxVBIWidth;        // max width of the VBI data
  215.     DWORD dwMaxHeight;             // max height of the video port field
  216.     DWORD dwVideoPortID;        // Video port ID (0 - (dwMaxVideoPorts -1))
  217.     DWORD dwCaps;            // Video port capabilities
  218.     DWORD dwFX;                // More video port capabilities
  219.     DWORD dwNumAutoFlipSurfaces;    // Number of autoflippable surfaces
  220.     DWORD dwAlignVideoPortBoundary;    // Byte restriction of placement within the surface
  221.     DWORD dwAlignVideoPortPrescaleWidth;// Byte restriction of width after prescaling
  222.     DWORD dwAlignVideoPortCropBoundary;    // Byte restriction of left cropping
  223.     DWORD dwAlignVideoPortCropWidth;    // Byte restriction of cropping width
  224.     DWORD dwPreshrinkXStep;        // Width can be shrunk in steps of 1/x
  225.     DWORD dwPreshrinkYStep;        // Height can be shrunk in steps of 1/x
  226.     DWORD dwNumVBIAutoFlipSurfaces;    // Number of VBI autoflippable surfaces
  227.     DWORD dwReserved1;            // Reserved for future use
  228.     DWORD dwReserved2;            // Reserved for future use
  229. } DDVIDEOPORTCAPS;
  230.  
  231. /*
  232.  * The dwMaxWidth and dwMaxVBIWidth members are valid
  233.  */
  234. #define DDVPD_WIDTH        0x00000001l
  235.  
  236. /*
  237.  * The dwMaxHeight member is valid
  238.  */
  239. #define DDVPD_HEIGHT        0x00000002l
  240.  
  241. /*
  242.  * The dwVideoPortID member is valid
  243.  */
  244. #define DDVPD_ID        0x00000004l
  245.  
  246. /*
  247.  * The dwCaps member is valid
  248.  */
  249. #define DDVPD_CAPS        0x00000008l
  250.  
  251. /*
  252.  * The dwFX member is valid
  253.  */
  254. #define DDVPD_FX        0x00000010l
  255.  
  256. /*
  257.  * The dwNumAutoFlipSurfaces member is valid
  258.  */
  259. #define DDVPD_AUTOFLIP        0x00000020l
  260.  
  261. /*
  262.  * All of the alignment members are valid
  263.  */
  264. #define DDVPD_ALIGN        0x00000040l
  265.  
  266.  
  267. /*
  268.  * DDVIDEOPORTDESC
  269.  */
  270. typedef struct _DDVIDEOPORTDESC
  271. {
  272.     DWORD dwSize;            // size of the DDVIDEOPORTDESC structure
  273.     DWORD dwFieldWidth;            // width of the video port field
  274.     DWORD dwVBIWidth;            // width of the VBI data
  275.     DWORD dwFieldHeight;        // height of the video port field
  276.     DWORD dwMicrosecondsPerField;    // Microseconds per video field
  277.     DWORD dwMaxPixelsPerSecond;        // Maximum pixel rate per second
  278.     DWORD dwVideoPortID;        // Video port ID (0 - (dwMaxVideoPorts -1))
  279.     DWORD dwReserved1;            // Reserved for future use - set to zero
  280.     DDVIDEOPORTCONNECT VideoPortType;     // Description of video port connection
  281.     DWORD dwReserved2;            // Reserved for future use - set to zero
  282.     DWORD dwReserved3;            // Reserved for future use - set to zero
  283. } DDVIDEOPORTDESC;
  284.  
  285.  
  286. /*
  287.  * DDVIDEOPORTINFO
  288.  */
  289. typedef struct _DDVIDEOPORTINFO
  290. {
  291.     DWORD dwSize;            // Size of the structure
  292.     DWORD dwOriginX;            // Placement of the video data within the surface.
  293.     DWORD dwOriginY;            // Placement of the video data within the surface.
  294.     DWORD dwVPFlags;            // Video port options
  295.     RECT rCrop;                // Cropping rectangle (optional).
  296.     DWORD dwPrescaleWidth;        // Determines pre-scaling/zooming in the X direction (optional).
  297.     DWORD dwPrescaleHeight;        // Determines pre-scaling/zooming in the Y direction (optional).
  298.     LPDDPIXELFORMAT lpddpfInputFormat;    // Video format written to the video port
  299.     LPDDPIXELFORMAT lpddpfVBIInputFormat; // Input format of the VBI data
  300.     LPDDPIXELFORMAT lpddpfVBIOutputFormat;// Output format of the data
  301.     DWORD dwVBIHeight;            // Specifies the number of lines of data within the vertical blanking interval.
  302.     DWORD dwReserved1;            // Reserved for future use - set to zero
  303.     DWORD dwReserved2;            // Reserved for future use - set to zero
  304. } DDVIDEOPORTINFO;
  305.  
  306.  
  307. /*
  308.  * DDVIDEOPORTBANDWIDTH
  309.  */
  310. typedef struct _DDVIDEOPORTBANDWIDTH
  311. {
  312.     DWORD dwSize;            // Size of the structure
  313.     DWORD dwCaps;
  314.     DWORD dwOverlay;                   // Zoom factor at which overlay is supported
  315.     DWORD dwColorkey;            // Zoom factor at which overlay w/ colorkey is supported
  316.     DWORD dwYInterpolate;        // Zoom factor at which overlay w/ Y interpolation is supported
  317.     DWORD dwYInterpAndColorkey;        // Zoom factor at which ovelray w/ Y interpolation and colorkeying is supported
  318.     DWORD dwReserved1;            // Reserved for future use - set to zero
  319.     DWORD dwReserved2;            // Reserved for future use - set to zero
  320. } DDVIDEOPORTBANDWIDTH;
  321.  
  322.  
  323. /*
  324.  * DDVIDEOPORTSTATUS
  325.  */
  326. typedef struct _DDVIDEOPORTSTATUS
  327. {
  328.     DWORD dwSize;            // Size of the structure
  329.     BOOL  bInUse;            // TRUE if video port is currently being used
  330.     DWORD dwFlags;                   // Currently not used
  331.     DWORD dwReserved1;            // Reserved for future use
  332.     DDVIDEOPORTCONNECT VideoPortType;    // Information about the connection
  333.     DWORD dwReserved2;            // Reserved for future use
  334.     DWORD dwReserved3;            // Reserved for future use
  335. } DDVIDEOPORTSTATUS;
  336.  
  337. /*============================================================================
  338.  *
  339.  * Video Port Flags
  340.  *
  341.  * All flags are bit flags.
  342.  *
  343.  *==========================================================================*/
  344.  
  345. /****************************************************************************
  346.  *
  347.  * VIDEOPORT DDVIDEOPORTCONNECT FLAGS
  348.  *
  349.  ****************************************************************************/
  350.  
  351. /*
  352.  * When this is set by the driver and passed to the client, this
  353.  * indicates that the video port is capable of double clocking the data.
  354.  * When this is set by the client, this indicates that the video port
  355.  * should enable double clocking.  This flag is only valid with external
  356.  * syncs.
  357.  */
  358. #define DDVPCONNECT_DOUBLECLOCK            0x00000001l
  359.  
  360. /*
  361.  * When this is set by the driver and passed to the client, this
  362.  * indicates that the video port is capable of using an external VACT
  363.  * signal. When this is set by the client, this indicates that the
  364.  * video port should use the external VACT signal.
  365.  */
  366. #define DDVPCONNECT_VACT            0x00000002l
  367.  
  368. /*
  369.  * When this is set by the driver and passed to the client, this
  370.  * indicates that the video port is capable of treating even fields
  371.  * like odd fields and visa versa.  When this is set by the client,
  372.  * this indicates that the video port should treat even fields like odd
  373.  * fields.
  374.  */
  375. #define DDVPCONNECT_INVERTPOLARITY        0x00000004l
  376.  
  377. /*
  378.  * Indicates that any data written to the video port during the VREF
  379.  * period will not be written into the frame buffer. This flag is read only.
  380.  */
  381. #define DDVPCONNECT_DISCARDSVREFDATA        0x00000008l
  382.  
  383. /*
  384.  * When this is set be the driver and passed to the client, this
  385.  * indicates that the device will write half lines into the frame buffer 
  386.  * if half lines are provided by the decoder.  If this is set by the client,
  387.  * this indicates that the decoder will be supplying half lines.
  388.  */
  389. #define DDVPCONNECT_HALFLINE            0x00000010l
  390.  
  391. /*
  392.  * Indicates that the signal is interlaced. This flag is only
  393.  * set by the client.
  394.  */
  395. #define DDVPCONNECT_INTERLACED            0x00000020l
  396.  
  397. /*
  398.  * Indicates that video port is shareable and that this video port
  399.  * will use the even fields.  This flag is only set by the client.
  400.  */
  401. #define DDVPCONNECT_SHAREEVEN            0x00000040l
  402.  
  403. /*
  404.  * Indicates that video port is shareable and that this video port
  405.  * will use the odd fields.  This flag is only set by the client.
  406.  */
  407. #define DDVPCONNECT_SHAREODD            0x00000080l
  408.  
  409. /****************************************************************************
  410.  *
  411.  * VIDEOPORT DDVIDEOPORTDESC CAPS
  412.  *
  413.  ****************************************************************************/
  414.  
  415. /*
  416.  * Flip can be performed automatically to avoid tearing.
  417.  */
  418. #define DDVPCAPS_AUTOFLIP            0x00000001l
  419.  
  420. /*
  421.  * Supports interlaced video
  422.  */
  423. #define DDVPCAPS_INTERLACED            0x00000002l
  424.  
  425. /*
  426.  * Supports non-interlaced video
  427.  */
  428. #define DDVPCAPS_NONINTERLACED            0x00000004l
  429.  
  430. /*
  431.  * Indicates that the device can return whether the current field
  432.  * of an interlaced signal is even or odd.
  433.  */
  434. #define DDVPCAPS_READBACKFIELD            0x00000008l
  435.  
  436. /*
  437.  * Indicates that the device can return the current line of video
  438.  * being written into the frame buffer.
  439.  */
  440. #define DDVPCAPS_READBACKLINE            0x00000010l
  441.  
  442. /*
  443.  * Allows two gen-locked video streams to share a single video port,
  444.  * where one stream uses the even fields and the other uses the odd
  445.  * fields. Separate parameters (including address, scaling,
  446.  * cropping, etc.) are maintained for both fields.)
  447.  */
  448. #define DDVPCAPS_SHAREABLE            0x00000020l
  449.  
  450. /*
  451.  * Even fields of video can be automatically discarded.
  452.  */
  453. #define DDVPCAPS_SKIPEVENFIELDS            0x00000040l
  454.  
  455. /*
  456.  * Odd fields of video can be automatically discarded.
  457.  */
  458. #define DDVPCAPS_SKIPODDFIELDS            0x00000080l
  459.  
  460. /*
  461.  * Indicates that the device is capable of driving the graphics
  462.  * VSYNC with the video port VSYNC.
  463.  */
  464. #define DDVPCAPS_SYNCMASTER            0x00000100l
  465.  
  466. /*
  467.  * Indicates that data within the vertical blanking interval can
  468.  * be written to a different surface.
  469.  */
  470. #define DDVPCAPS_VBISURFACE            0x00000200l
  471.  
  472. /*
  473.  * Indicates that the video port can perform color operations
  474.  * on the incoming data before it is written to the frame buffer.
  475.  */
  476. #define DDVPCAPS_COLORCONTROL            0x00000400l
  477.  
  478. /*
  479.  * Indicates that the video port can accept VBI data in a different
  480.  * width or format than the regular video data.
  481.  */
  482. #define DDVPCAPS_OVERSAMPLEDVBI            0x00000800l
  483.  
  484. /*
  485.  * Indicates that the video port can write data directly to system memory
  486.  */
  487. #define DDVPCAPS_SYSTEMMEMORY            0x00001000l
  488.  
  489. /*
  490.  * Indicates that the VBI and video portions of the video stream can
  491.  * be controlled by an independent processes.
  492.  */
  493. #define DDVPCAPS_VBIANDVIDEOINDEPENDENT        0x00002000l
  494.  
  495.  
  496. /****************************************************************************
  497.  *
  498.  * VIDEOPORT DDVIDEOPORTDESC FX
  499.  *
  500.  ****************************************************************************/
  501.  
  502. /*
  503.  * Limited cropping is available to crop out the vertical interval data.
  504.  */
  505. #define DDVPFX_CROPTOPDATA            0x00000001l
  506.  
  507. /*
  508.  * Incoming data can be cropped in the X direction before it is written
  509.  * to the surface.
  510.  */
  511. #define DDVPFX_CROPX                0x00000002l
  512.  
  513. /*
  514.  * Incoming data can be cropped in the Y direction before it is written
  515.  * to the surface.
  516.  */
  517. #define DDVPFX_CROPY                0x00000004l
  518.  
  519. /*
  520.  * Supports interleaving interlaced fields in memory.
  521.  */
  522. #define DDVPFX_INTERLEAVE            0x00000008l
  523.  
  524. /*
  525.  * Supports mirroring left to right as the video data is written
  526.  * into the frame buffer.
  527.  */
  528. #define DDVPFX_MIRRORLEFTRIGHT            0x00000010l
  529.  
  530. /*
  531.  * Supports mirroring top to bottom as the video data is written
  532.  * into the frame buffer.
  533.  */
  534. #define DDVPFX_MIRRORUPDOWN            0x00000020l
  535.  
  536. /*
  537.  * Data can be arbitrarily shrunk in the X direction before it
  538.  * is written to the surface.
  539.  */
  540. #define DDVPFX_PRESHRINKX            0x00000040l
  541.  
  542. /*
  543.  * Data can be arbitrarily shrunk in the Y direction before it
  544.  * is written to the surface.
  545.  */
  546. #define DDVPFX_PRESHRINKY            0x00000080l
  547.  
  548. /*
  549.  * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the X
  550.  * direction before it is written to the surface.
  551.  */
  552. #define DDVPFX_PRESHRINKXB            0x00000100l
  553.  
  554. /*
  555.  * Data can be binary shrunk (1/2, 1/4, 1/8, etc.) in the Y
  556.  * direction before it is written to the surface.
  557.  */
  558. #define DDVPFX_PRESHRINKYB            0x00000200l
  559.  
  560. /*
  561.  * Data can be shrunk in increments of 1/x in the X direction
  562.  * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkXStep)
  563.  * before it is written to the surface.
  564.  */
  565. #define DDVPFX_PRESHRINKXS            0x00000400l
  566.  
  567. /*
  568.  * Data can be shrunk in increments of 1/x in the Y direction
  569.  * (where X is specified in the DDVIDEOPORTCAPS.dwPreshrinkYStep)
  570.  * before it is written to the surface.
  571.  */
  572. #define DDVPFX_PRESHRINKYS            0x00000800l
  573.  
  574. /*
  575.  * Data can be arbitrarily stretched in the X direction before
  576.  * it is written to the surface.
  577.  */
  578. #define DDVPFX_PRESTRETCHX            0x00001000l
  579.  
  580. /*
  581.  * Data can be arbitrarily stretched in the Y direction before
  582.  * it is written to the surface.
  583.  */
  584. #define DDVPFX_PRESTRETCHY            0x00002000l
  585.  
  586. /*
  587.  * Data can be integer stretched in the X direction before it is
  588.  * written to the surface.
  589.  */
  590. #define DDVPFX_PRESTRETCHXN            0x00004000l
  591.  
  592. /*
  593.  * Data can be integer stretched in the Y direction before it is
  594.  * written to the surface.
  595.  */
  596. #define DDVPFX_PRESTRETCHYN            0x00008000l
  597.  
  598. /*
  599.  * Indicates that data within the vertical blanking interval can
  600.  * be converted independently of the remaining video data.
  601.  */
  602. #define DDVPFX_VBICONVERT            0x00010000l
  603.  
  604. /*
  605.  * Indicates that scaling can be disabled for data within the
  606.  * vertical blanking interval.
  607.  */
  608. #define DDVPFX_VBINOSCALE            0x00020000l
  609.  
  610. /*
  611.  * Indicates that the video data can ignore the left and right
  612.  * cropping coordinates when cropping oversampled VBI data.
  613.  */
  614. #define DDVPFX_IGNOREVBIXCROP            0x00040000l
  615.  
  616. /*
  617.  * Indicates that interleaving can be disabled for data within the
  618.  * vertical blanking interval.
  619.  */
  620. #define DDVPFX_VBINOINTERLEAVE            0x00080000l
  621.  
  622.  
  623. /****************************************************************************
  624.  *
  625.  * VIDEOPORT DDVIDEOPORTINFO FLAGS
  626.  *
  627.  ****************************************************************************/
  628.  
  629. /*
  630.  * Perform automatic flipping.   Auto-flipping is performed between
  631.  * the overlay surface that was attached to the video port using
  632.  * IDirectDrawVideoPort::AttachSurface and the overlay surfaces that
  633.  * are attached to the surface via the IDirectDrawSurface::AttachSurface
  634.  * method.  The flip order is the order in which the overlay surfaces
  635.  * were. attached.
  636.  */
  637. #define DDVP_AUTOFLIP                0x00000001l
  638.  
  639. /*
  640.  * Perform conversion using the ddpfOutputFormat information.
  641.  */
  642. #define DDVP_CONVERT                0x00000002l
  643.  
  644. /*
  645.  * Perform cropping using the specified rectangle.
  646.  */
  647. #define DDVP_CROP                0x00000004l
  648.  
  649. /*
  650.  * Indicates that interlaced fields should be interleaved in memory.
  651.  */
  652. #define DDVP_INTERLEAVE                0x00000008l
  653.  
  654. /*
  655.  * Indicates that the data should be mirrored left to right as it's
  656.  * written into the frame buffer.
  657.  */
  658. #define DDVP_MIRRORLEFTRIGHT            0x00000010l
  659.  
  660. /*
  661.  * Indicates that the data should be mirrored top to bottom as it's
  662.  * written into the frame buffer.
  663.  */
  664. #define DDVP_MIRRORUPDOWN            0x00000020l
  665.  
  666. /*
  667.  * Perform pre-scaling/zooming based on the pre-scale parameters.
  668.  */
  669. #define DDVP_PRESCALE                0x00000040l
  670.  
  671. /*
  672.  * Ignore input of even fields.
  673.  */
  674. #define DDVP_SKIPEVENFIELDS            0x00000080l
  675.  
  676. /*
  677.  * Ignore input of odd fields.
  678.  */
  679. #define DDVP_SKIPODDFIELDS            0x00000100l
  680.  
  681. /*
  682.  * Drive the graphics VSYNCs using the video port VYSNCs.
  683.  */
  684. #define DDVP_SYNCMASTER                0x00000200l
  685.  
  686. /*
  687.  * The ddpfVBIOutputFormatFormat member contains data that should be used
  688.  * to convert the data within the vertical blanking interval.
  689.  */
  690. #define DDVP_VBICONVERT                0x00000400l
  691.  
  692. /*
  693.  * Indicates that data within the vertical blanking interval
  694.  * should not be scaled.
  695.  */
  696. #define DDVP_VBINOSCALE                0x00000800l
  697.  
  698. /*
  699.  * Indicates that these bob/weave decisions should not be
  700.  * overriden by other interfaces.
  701.  */
  702. #define DDVP_OVERRIDEBOBWEAVE            0x00001000l
  703.  
  704. /*
  705.  * Indicates that the video data should ignore the left and right
  706.  * cropping coordinates when cropping the VBI data.
  707.  */
  708. #define DDVP_IGNOREVBIXCROP            0x00002000l
  709.  
  710. /*
  711.  * Indicates that interleaving can be disabled for data within the
  712.  * vertical blanking interval.
  713.  */
  714. #define DDVP_VBINOINTERLEAVE            0x00004000l
  715.  
  716.  
  717. /****************************************************************************
  718.  *
  719.  * DIRIRECTDRAWVIDEOPORT GETINPUTFORMAT/GETOUTPUTFORMAT FLAGS
  720.  *
  721.  ****************************************************************************/
  722.  
  723. /*
  724.  * Return formats for the video data
  725.  */
  726. #define DDVPFORMAT_VIDEO            0x00000001l
  727.  
  728. /*
  729.  * Return formats for the VBI data
  730.  */
  731. #define DDVPFORMAT_VBI                0x00000002l
  732.  
  733. /****************************************************************************
  734.  *
  735.  * DIRIRECTDRAWVIDEOPORT SETTARGETSURFACE FLAGS
  736.  *
  737.  ****************************************************************************/
  738.  
  739. /*
  740.  * Surface should receive video data (and VBI data if a surface
  741.  * is not explicitly attached for that purpose)
  742.  */
  743. #define DDVPTARGET_VIDEO            0x00000001l
  744.  
  745. /*
  746.  * Surface should receive VBI data
  747.  */
  748. #define DDVPTARGET_VBI                0x00000002l
  749.  
  750.  
  751. /****************************************************************************
  752.  *
  753.  * DIRIRECTDRAWVIDEOPORT WAITFORSYNC FLAGS
  754.  *
  755.  ****************************************************************************/
  756.  
  757. /*
  758.  * Waits until the beginning of the next VSYNC
  759.  */
  760. #define DDVPWAIT_BEGIN                0x00000001l
  761.  
  762. /*
  763.  * Waits until the end of the next/current VSYNC
  764.  */
  765. #define DDVPWAIT_END                0x00000002l
  766.  
  767. /*
  768.  * Waits until the beginning of the specified line
  769.  */
  770. #define DDVPWAIT_LINE                0x00000003l
  771.  
  772. /****************************************************************************
  773.  *
  774.  * DIRECTDRAWVIDEOPORT FLIP FLAGS
  775.  *
  776.  ****************************************************************************/
  777.  
  778. /*
  779.  * Flips the normal video surface
  780.  */
  781. #define DDVPFLIP_VIDEO                0x00000001l
  782.  
  783. /*
  784.  * Flips the VBI surface
  785.  */
  786. #define DDVPFLIP_VBI                0x00000002l
  787.  
  788. /****************************************************************************
  789.  *
  790.  * DIRIRECTDRAWVIDEOPORT GETVIDEOSIGNALSTATUS VALUES
  791.  *
  792.  ****************************************************************************/
  793.  
  794. /*
  795.  * No video signal is present at the video port
  796.  */
  797. #define DDVPSQ_NOSIGNAL                0x00000001l
  798.  
  799. /*
  800.  * A valid video signal is present at the video port
  801.  */
  802. #define DDVPSQ_SIGNALOK                0x00000002l
  803.  
  804. /****************************************************************************
  805.  *
  806.  * VIDEOPORTBANDWIDTH Flags
  807.  *
  808.  ****************************************************************************/
  809.  
  810. /*
  811.  * The specified height/width refer to the size of the video port data
  812.  * written into memory, after prescaling has occured.
  813.  */
  814. #define DDVPB_VIDEOPORT                0x00000001l
  815.  
  816. /*
  817.  * The specified height/width refer to the source size of the overlay.
  818.  */
  819. #define DDVPB_OVERLAY                0x00000002l
  820.  
  821. /*
  822.  * This is a query for the device to return which caps this device requires.
  823.  */
  824. #define DDVPB_TYPE                0x00000004l
  825.  
  826. /****************************************************************************
  827.  *
  828.  * VIDEOPORTBANDWIDTH Caps
  829.  *
  830.  ****************************************************************************/
  831.  
  832. /*
  833.  * The bandwidth for this device is dependant on the overlay source size.
  834.  */
  835. #define DDVPBCAPS_SOURCE            0x00000001l
  836.  
  837. /*
  838.  * The bandwidth for this device is dependant on the overlay destination
  839.  * size.
  840.  */
  841. #define DDVPBCAPS_DESTINATION            0x00000002l
  842.  
  843. /****************************************************************************
  844.  *
  845.  * DDVIDEOPORTCONTAINER CreateVideoPort flags
  846.  *
  847.  ****************************************************************************/
  848.  
  849. /*
  850.  * The process only wants to control the VBI portion of the video stream.
  851.  */
  852. #define DDVPCREATE_VBIONLY            0x00000001l
  853.  
  854. /*
  855.  * The process only wants to control the non-VBI (video) portion of
  856.  * the video stream.
  857.  */
  858. #define DDVPCREATE_VIDEOONLY            0x00000002l
  859.  
  860. /****************************************************************************
  861.  *
  862.  * DDVIDEOPORTSTATUS flags
  863.  *
  864.  ****************************************************************************/
  865.  
  866. /*
  867.  * The video port interface is only controlling the VBI portion of the
  868.  * video stream
  869.  */
  870. #define DDVPSTATUS_VBIONLY            0x00000001l
  871.  
  872. /*
  873.  * The video port interface is only controlling the video portion of the
  874.  * video stream
  875.  */
  876. #define DDVPSTATUS_VIDEOONLY            0x00000002l
  877.  
  878.  
  879. #ifdef __cplusplus
  880. };
  881. #endif
  882.  
  883. #endif
  884.