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.

135 lines
4.6 KiB

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