Counter Strike : Global Offensive Source Code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

144 lines
6.1 KiB

  1. //------------------------------------------------------------------------------
  2. // File: MPConfig.h
  3. //
  4. // Desc:
  5. //
  6. // Copyright (c) 1997-2001, Microsoft Corporation. All rights reserved.
  7. //------------------------------------------------------------------------------
  8. #ifndef __IMPConfig__
  9. #define __IMPConfig__
  10. #ifdef __cplusplus
  11. extern "C" {
  12. #endif
  13. typedef enum _AM_ASPECT_RATIO_MODE
  14. {
  15. AM_ARMODE_STRETCHED, // don't do any aspect ratio correction
  16. AM_ARMODE_LETTER_BOX, // letter box the video, paint background color in the excess region
  17. AM_ARMODE_CROP, // crop the video to the right aspect ratio
  18. AM_ARMODE_STRETCHED_AS_PRIMARY // follow whatever the primary stream does (in terms of the mode as well as pict-aspect-ratio values)
  19. } AM_ASPECT_RATIO_MODE;
  20. DECLARE_INTERFACE_(IMixerPinConfig, IUnknown)
  21. {
  22. // this function sets the position of the stream in the display window, assuming
  23. // that the window coordinates are {0, 0, 10000, 10000}. Thus giving arguments
  24. // (0, 0, 5000, 5000) will put the stream in the top-left quarter. Any value greater
  25. // than 10000 is invalid.
  26. STDMETHOD (SetRelativePosition)(THIS_
  27. IN DWORD dwLeft,
  28. IN DWORD dwTop,
  29. IN DWORD dwRight,
  30. IN DWORD dwBottom
  31. ) PURE;
  32. // this function gets the position of the stream in the display window, assuming
  33. // that the window coordinates are {0, 0, 10000, 10000}. Thus if the values returned
  34. // are (0, 0, 5000, 5000), then it means that the stream is in the top-left quarter.
  35. STDMETHOD (GetRelativePosition)(THIS_
  36. OUT DWORD *pdwLeft,
  37. OUT DWORD *pdwTop,
  38. OUT DWORD *pdwRight,
  39. OUT DWORD *pdwBottom
  40. ) PURE;
  41. // this function sets the ZOrder of the stream. The ZOrder of 0 is the closest
  42. // to the eyes of the user, and increasing values imply greater distance.
  43. STDMETHOD (SetZOrder)(THIS_
  44. IN DWORD dwZOrder
  45. ) PURE;
  46. // this function gets the ZOrder of the stream. The ZOrder of 0 is the closest
  47. // to the eyes of the user, and increasing values imply greater distance.
  48. STDMETHOD (GetZOrder)(THIS_
  49. OUT DWORD *pdwZOrder
  50. ) PURE;
  51. // this function sets the colorkey being used by the stream. Setting this value on the
  52. // primary stream sets the destination colorkey being used by the overlay surface. Setting
  53. // this value on the secondary pin makes sense only if the stream is transparent. By default
  54. // the destination colorkey is used as the colorkey for all transparent (secondary) streams.
  55. STDMETHOD (SetColorKey)(THIS_
  56. IN COLORKEY *pColorKey
  57. ) PURE;
  58. // this function gets the colorkey being used by the stream. Getting this value on the
  59. // primary stream gets the destination colorkey being used by the overlay surface. Getting
  60. // this value on the secondary pin returns the colorkey being used by that particular stream.
  61. // When using this method, you are allowed to pass NULL for either pColorKey or pColor but
  62. // not both.
  63. STDMETHOD (GetColorKey)(THIS_
  64. OUT COLORKEY *pColorKey,
  65. OUT DWORD *pColor
  66. ) PURE;
  67. // this function sets the blending parameter which in turn defines, how the secondary stream
  68. // is going to be blended with the primary stream. A value of 0 makes the secondary stream
  69. // invisible, a value of 255 makes the primary stream invisible (in that region only ofcourse),
  70. // and any value inbetween, say x, blends the secondary and primary streams in the ratio x : (255-x).
  71. // If no value is set, the default is 255.
  72. // Any value less than 0 or greater than 255 is invalid. Calling this function on the primary
  73. // stream would result in a return value of E_UNEXPECTED.
  74. STDMETHOD (SetBlendingParameter)(THIS_
  75. IN DWORD dwBlendingParameter
  76. ) PURE;
  77. // this function gets the blending parameter which in turn defines, how the secondary stream
  78. // is currently being blended with the primary stream.
  79. STDMETHOD (GetBlendingParameter)(THIS_
  80. OUT DWORD *pdwBlendingParameter
  81. ) PURE;
  82. // this function is used to set the Aspect Ratio Correction mode on the pin.
  83. // If the mode is set to letter box, black color is painted on the excess region
  84. STDMETHOD (SetAspectRatioMode)(THIS_
  85. IN AM_ASPECT_RATIO_MODE amAspectRatioMode
  86. ) PURE;
  87. // this function is used to get the Aspect Ratio Correction mode on the pin.
  88. STDMETHOD (GetAspectRatioMode)(THIS_
  89. OUT AM_ASPECT_RATIO_MODE* pamAspectRatioMode
  90. ) PURE;
  91. // this function sets the stream to be transparent. That means that the stream is not going
  92. // to occupy the whole of the rectangle (specified by SetRelativePosition), some of the region
  93. // is going to be transparent i.e. the stream underneath, is going to see through.
  94. // Calling this function on the primary stream would result in a return value of E_UNEXPECTED.
  95. STDMETHOD (SetStreamTransparent)(THIS_
  96. IN BOOL bStreamTransparent
  97. ) PURE;
  98. // this function is used to tell whether the stream is transparent or not.
  99. STDMETHOD (GetStreamTransparent)(THIS_
  100. OUT BOOL *pbStreamTransparent
  101. ) PURE;
  102. };
  103. DECLARE_INTERFACE_(IMixerPinConfig2, IMixerPinConfig)
  104. {
  105. // this functions sets the color-controls, if the vga chip supports it.
  106. STDMETHOD (SetOverlaySurfaceColorControls)(THIS_
  107. IN LPDDCOLORCONTROL pColorControl
  108. ) PURE;
  109. // this functions gets the color-controls. It also returns the capability of the vga hardware
  110. // in the dwFlags value of the struct.
  111. STDMETHOD (GetOverlaySurfaceColorControls)(THIS_
  112. OUT LPDDCOLORCONTROL pColorControl
  113. ) PURE;
  114. };
  115. #ifdef __cplusplus
  116. }
  117. #endif
  118. #endif // #define __IMPConfig__