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

  1. //==========================================================================;
  2. //
  3. //  Copyright (c) 1992 - 1997  Microsoft Corporation.  All Rights Reserved.
  4. //
  5. //--------------------------------------------------------------------------;
  6.  
  7. // An interface exposed by the decoder to help the decoder and the filter configuring
  8. // the videoport to communicate. 
  9.  
  10. #ifndef __IVPConfig__
  11. #define __IVPConfig__
  12.  
  13. #ifdef __cplusplus
  14. extern "C" {
  15. #endif
  16.  
  17. // IVPBaseConfig
  18. DECLARE_INTERFACE_(IVPBaseConfig, IUnknown)
  19. {
  20. public:
  21.  
  22.     // gets the various connection information structures (guid, portwidth)
  23.     // in an array of structures. If the pointer to the array is NULL, first 
  24.     // parameter returns the total number of formats supported.
  25.     STDMETHOD (GetConnectInfo)(THIS_
  26.                    IN OUT LPDWORD pdwNumConnectInfo,
  27.                    IN OUT LPDDVIDEOPORTCONNECT pddVPConnectInfo
  28.                   ) PURE;
  29.  
  30.     // sets the connection entry chosen (0, 1, .. ,(dwNumProposedEntries-1))
  31.     STDMETHOD (SetConnectInfo)(THIS_
  32.                    IN DWORD dwChosenEntry
  33.                   ) PURE;
  34.  
  35.     // gets various data parameters, includes dimensionnal info
  36.     STDMETHOD (GetVPDataInfo)(THIS_
  37.                   IN OUT LPAMVPDATAINFO pamvpDataInfo
  38.                  ) PURE;
  39.  
  40.     // retrives maximum pixels per second rate expected for a given 
  41.     // format and a given scaling factor. If decoder does not support 
  42.     // those scaling factors, then it gives the rate and the nearest 
  43.     // scaling factors.
  44.     STDMETHOD (GetMaxPixelRate)(THIS_
  45.                 IN OUT LPAMVPSIZE pamvpSize,
  46.                 OUT LPDWORD pdwMaxPixelsPerSecond
  47.                    ) PURE;
  48.  
  49.     // informs the callee of the videoformats supported by the videoport
  50.     STDMETHOD (InformVPInputFormats)(THIS_
  51.                      IN DWORD dwNumFormats,
  52.                      IN LPDDPIXELFORMAT pDDPixelFormats
  53.                     ) PURE;
  54.  
  55.     // gets the various formats supported by the decoder in an array
  56.     // of structures. If the pointer to the array is NULL, first parameter
  57.     // returns the total number of formats supported.
  58.     STDMETHOD (GetVideoFormats)(THIS_
  59.                 IN OUT LPDWORD pdwNumFormats,
  60.                 IN OUT LPDDPIXELFORMAT pddPixelFormats
  61.                    ) PURE;
  62.  
  63.     // sets the format entry chosen (0, 1, .. ,(dwNumProposedEntries-1))
  64.     STDMETHOD (SetVideoFormat)(THIS_
  65.                    IN DWORD dwChosenEntry
  66.                   ) PURE;
  67.  
  68.     // asks the decoder to treat even fields like odd fields and visa versa
  69.     STDMETHOD (SetInvertPolarity)(THIS_
  70.                  ) PURE;
  71.  
  72.     // the mixer uses this function to determine if the callee wants
  73.     // the vpmixer to use its overlay surface and if so to get a pointer to it
  74.     STDMETHOD (GetOverlaySurface)(THIS_
  75.                   OUT LPDIRECTDRAWSURFACE* ppddOverlaySurface
  76.                  ) PURE;
  77.  
  78.     // sets the direct draw kernel handle
  79.     STDMETHOD (SetDirectDrawKernelHandle)(THIS_
  80.                       IN DWORD dwDDKernelHandle
  81.                      ) PURE;
  82.  
  83.     // sets the video port id
  84.     STDMETHOD (SetVideoPortID)(THIS_
  85.                    IN DWORD dwVideoPortID
  86.                   ) PURE;
  87.  
  88.     // sets the direct draw surface kernel handle
  89.     STDMETHOD (SetDDSurfaceKernelHandles)(THIS_
  90.                       IN DWORD cHandles,
  91.                       IN DWORD *rgDDKernelHandles
  92.                      ) PURE;
  93.  
  94.     // Tells driver about surface created on its behalf by ovmixer/vbisurf and 
  95.     // returned from videoport/ddraw. Should always return NOERROR or E_NOIMPL. 
  96.     // dwPitch is the pitch of the surface (distance in pixels between the start 
  97.     // pixels of two consecutive lines of the surface). (dwXOrigin, dwYOrigin) 
  98.     // are the (X, Y) coordinates of the pixel at which valid data starts.  
  99.     STDMETHOD (SetSurfaceParameters)(THIS_
  100.                     IN DWORD dwPitch,
  101.                     IN DWORD dwXOrigin,
  102.                     IN DWORD dwYOrigin
  103.                     ) PURE;
  104. };
  105.  
  106. // IVPConfig
  107. DECLARE_INTERFACE_(IVPConfig, IVPBaseConfig)
  108. {
  109. public:
  110.     // the mixer uses this function to determine if the callee wants
  111.     // the mixer to decimate VIDEO data at its own descrition
  112.     STDMETHOD (IsVPDecimationAllowed)(THIS_
  113.                       OUT LPBOOL pbIsDecimationAllowed
  114.                      ) PURE;
  115.  
  116.     // sets the scaling factors. If decoder does not support these,
  117.     // then it sets the values to the nearest factors it can support
  118.     STDMETHOD (SetScalingFactors)(THIS_
  119.                       IN LPAMVPSIZE pamvpSize
  120.                      ) PURE;
  121. };
  122.  
  123. // IVPVBIConfig
  124. DECLARE_INTERFACE_(IVPVBIConfig, IVPBaseConfig)
  125. {
  126. public:
  127. };
  128.  
  129. #ifdef __cplusplus
  130. }
  131. #endif
  132.  
  133.  
  134. #endif // __IVPConfig__
  135.