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