home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / vc98 / include / amvpe.idl < prev    next >
Text File  |  1998-04-25  |  5KB  |  174 lines

  1. //==========================================================================;
  2. //
  3. //  THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
  4. //  KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
  5. //  IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR
  6. //  PURPOSE.
  7. //
  8. //  Copyright (c) 1992 - 1997  Microsoft Corporation.  All Rights Reserved.
  9. //
  10. //--------------------------------------------------------------------------;
  11.  
  12. import "unknwn.idl";
  13. import "objidl.idl";    // for IPersist (IFilter's root)
  14.  
  15.  
  16. /*
  17.  * VIDOESIGNALINFO
  18.  */
  19. typedef struct _VIDEOSIGNALINFO
  20. {
  21.     DWORD dwSize;                // Size of the structure
  22.     DWORD dwVREFHeight;            // Specifies the number of lines of data in the vref
  23.     BOOL  bDoubleClock;            // videoport should enable double clocking
  24.     BOOL  bVACT;                // videoport should use an external VACT signal
  25.     BOOL  bInterlaced;            // Indicates that the signal is interlaced
  26.     BOOL  bHalfline;            // Device will write half lines into the frame buffer
  27.     BOOL  bInvertedPolarity;    // Devoce inverts the polarity by default
  28. } AMVIDEOSIGNALINFO;
  29.  
  30. typedef struct AMVIDEOSIGNALINFO        *LPAMVIDEOSIGNALINFO;
  31.  
  32.  
  33. interface IVPEConfig;
  34. interface IVPE;
  35.  
  36.  
  37. /*
  38.  * DDVIDEOPORTCONNECT
  39.  */
  40. typedef struct _DDVIDEOPORTCONNECT
  41. {
  42.     DWORD dwSize;            // size of the DDVIDEOPORTCONNECT structure
  43.     GUID  guidTypeID;             // Description of video port connection
  44.     DWORD dwPortWidth;            // Width of the video port
  45.     DWORD dwFlags;            // Connection flags
  46. } DDVIDEOPORTCONNECT;
  47.  
  48. typedef DDVIDEOPORTCONNECT *LPDDVIDEOPORTCONNECT;
  49.  
  50.  
  51.  
  52. /*
  53.  * DDPIXELFORMAT
  54.  */
  55. typedef struct _DDPIXELFORMAT
  56. {
  57.     DWORD    dwSize;            // size of structure
  58.     DWORD    dwFlags;        // pixel format flags
  59.     DWORD    dwFourCC;        // (FOURCC code)
  60.     union
  61.     {
  62.     DWORD    dwRGBBitCount;        // how many bits per pixel (BD_1,2,4,8,16,24,32)
  63.     DWORD    dwYUVBitCount;        // how many bits per pixel (BD_4,8,16,24,32)
  64.     DWORD    dwZBufferBitDepth;    // how many bits for z buffers (BD_8,16,24,32)
  65.     DWORD    dwAlphaBitDepth;    // how many bits for alpha channels (BD_1,2,4,8)
  66.     };
  67.     union
  68.     {
  69.     DWORD    dwRBitMask;        // mask for red bit
  70.     DWORD    dwYBitMask;        // mask for Y bits
  71.     };
  72.     union
  73.     {
  74.     DWORD    dwGBitMask;        // mask for green bits
  75.     DWORD    dwUBitMask;        // mask for U bits
  76.     };
  77.     union
  78.     {
  79.     DWORD    dwBBitMask;        // mask for blue bits
  80.     DWORD    dwVBitMask;        // mask for V bits
  81.     };
  82.     union
  83.     {
  84.     DWORD    dwRGBAlphaBitMask;    // mask for alpha channel
  85.     DWORD    dwYUVAlphaBitMask;    // mask for alpha channel
  86.     DWORD    dwRGBZBitMask;        // mask for Z channel
  87.     DWORD    dwYUVZBitMask;        // mask for Z channel
  88.     };
  89. } DDPIXELFORMAT;
  90.  
  91. typedef DDPIXELFORMAT * LPDDPIXELFORMAT;
  92.  
  93.  
  94. [
  95. object,
  96. uuid(BC29A660-30E3-11d0-9E69-00C04FD7C15B),
  97. pointer_default(unique)
  98. ]
  99.  
  100. interface IVPEConfig : IUnknown {
  101.  
  102.         // gets the various connection information structures (guid, portwidth)
  103.         // in an array of structures. If the pointer to the array is NULL, first 
  104.         // parameter returns the total number of formats supported.
  105.         HRESULT GetConnectInfo(
  106.                         [in,out] LPDWORD lpNumConnectInfo,
  107.                         [out] LPDDVIDEOPORTCONNECT lpddvpConnectInfo
  108.         );
  109.  
  110.         HRESULT SetConnectInfo(
  111.                         [in] DDVIDEOPORTCONNECT ddvpConnectInfo
  112.         );
  113.  
  114.         // gets the various formats supported by the decoder in an array
  115.         // of structures. If the pointer to the array is NULL, first parameter
  116.         // returns the total number of formats supported.
  117.         HRESULT GetVideoFormats(
  118.                         [in,out] LPDWORD lpNumFormats,
  119.                         [out] LPDDPIXELFORMAT lpddpfFormats
  120.         );
  121.  
  122.         // retrives maximum pixels per second rate expected for a given 
  123.         // format and a given scaling factor. If decoder does not support 
  124.         // those scaling factors, then it gives the rate and the nearest 
  125.         // scaling factors.
  126.         HRESULT GetMaxPixelRate(
  127.                         [in] DDPIXELFORMAT ddpfFormat,
  128.                         [in,out] LPDWORD lpdwZoomHeight,
  129.                         [in,out] LPDWORD lpdwZoomWidth,
  130.                         [out] LPDWORD lpdwMaxPixelsPerSecond
  131.         );
  132.  
  133.         // retrives various properties of the decoder for a given format
  134.         HRESULT GetVideoSignalInfo(
  135.                         [in] DDPIXELFORMAT ddpfFormat,
  136.                         [out] LPAMVIDEOSIGNALINFO lpAMVideoSignalInfo
  137.         );
  138.         
  139.         // asks the decoder to ouput in this format. Return value should give
  140.         // appropriate error code
  141.         HRESULT SetVideoFormat(
  142.                         [in] DDPIXELFORMAT ddpfFormat
  143.         );
  144.  
  145.         // asks the decoder to treat even fields like odd fields and visa versa
  146.         HRESULT SetInvertPolarity(
  147.         );
  148.  
  149.         // sets the scaling factors. If decoder does not support these,
  150.         // then it sets the values to the nearest factors it can support
  151.         HRESULT SetScalingFactors(
  152.                         [in,out] LPDWORD lpdwZoomHeight,
  153.                         [in,out] LPDWORD lpdwZoomWidth
  154.         );
  155.  
  156.  }
  157.  
  158.  
  159.  
  160. [
  161. object,
  162. uuid(BC29A661-30E3-11d0-9E69-00C04FD7C15B),
  163. pointer_default(unique)
  164. ]
  165.  
  166. interface IVPE : IUnknown {
  167.         HRESULT SetOverlaySurface(
  168. //                            [in] LPDIRECTDRAWSURFACE lpOverlaySurface,
  169.                             [in] LPUNKNOWN lpOverlaySurface,
  170.                             [in] INT iNumBackBuffers
  171.         );
  172.  
  173. }
  174.