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