Leaked source code of windows server 2003
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.

142 lines
5.1 KiB

  1. /*
  2. * File: appavcap.h
  3. *
  4. * Network audio/video application capability interface. Provides
  5. * data structures for adding, removing, enumerating, prioritizing,\
  6. * and enabling/disabling codecs independently for send/receive.
  7. *
  8. */
  9. #ifndef _APPAVCAP_H
  10. #define _APPAVCAP_H
  11. #include <mmreg.h>
  12. #include <msacm.h>
  13. #include <pshpack8.h> /* Assume 8 byte packing throughout */
  14. // For use as dimension for variable size arrays
  15. #define VARIABLE_DIM 1
  16. // CPU utilization numbers for NetMeeting-provided codecs
  17. #define LNH_48_CPU 97
  18. #define LNH_8_CPU 47
  19. #define LNH_12_CPU 48
  20. #define LNH_16_CPU 49
  21. #define MS_G723_CPU 70
  22. #define CCITT_A_CPU 24
  23. #define CCITT_U_CPU 25
  24. #define MSRT24_CPU 55
  25. // AUDIO_FORMAT_ID is an index into an array of AUDCAPS structures
  26. typedef DWORD AUDIO_FORMAT_ID;
  27. #define INVALID_AUDIO_FORMAT 0xffffffff
  28. typedef DWORD MEDIA_FORMAT_ID;
  29. #define INVALID_MEDIA_FORMAT 0xffffffff
  30. // VIDEO_FORMAT_ID is an index into an array of VIDCAPS structures
  31. typedef DWORD VIDEO_FORMAT_ID;
  32. #define INVALID_VIDEO_FORMAT 0xffffffff
  33. /*
  34. * @doc EXTERNAL DATASTRUC
  35. *
  36. * AUDIO capabilities info structure
  37. *
  38. * @struct AUDCAP_INFO | AUDIO capabilities info structure.
  39. * Use for both input and output when calling capabilties APIs.
  40. * The fields are input-only, output-only or input/output depending on the API used.
  41. * Behavior is undefined if these are altered.
  42. */
  43. // basic audcap structure
  44. typedef struct BasicAudCapInfo
  45. {
  46. WORD wFormatTag; // @field The ACM format tag
  47. AUDIO_FORMAT_ID Id; // @field (OUTPUT only) The local id (a.k.a. *Handle*) of this capability entry
  48. char szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; // @field (OUTPUT only) Descriptive string of
  49. // the format, e.g. "Microsoft GSM 6.10"
  50. UINT uMaxBitrate; // @field (OUTPUT only) Worst case bitrate
  51. UINT uAvgBitrate; // @field The average bitrate for this codec
  52. WORD wCPUUtilizationEncode; // @field % of Pentium 90Mhz needed for compress
  53. WORD wCPUUtilizationDecode; // @field % of Pentium 90Mhz needed for decompress
  54. BOOL bSendEnabled; // @field OK to use this format for sending
  55. BOOL bRecvEnabled; // @field OK to use this format for receiving
  56. WORD wSortIndex; // @field The ordered position of this entry
  57. // in the capability table. Can be used as input only
  58. // in ReorderFormats
  59. }BASIC_AUDCAP_INFO, *PBASIC_AUDCAP_INFO, AUDCAP_INFO, *PAUDCAP_INFO;
  60. /*
  61. * @struct AUDCAP_INFO_LIST | List of AUDCAP_INFO structures
  62. */
  63. typedef struct _audcapinfolist
  64. {
  65. ULONG cFormats; // @field Number of AUDCAP_INFO structures in this list
  66. AUDCAP_INFO aFormats[VARIABLE_DIM]; // @field cFormats AUDCAP_INFO structures
  67. } AUDCAP_INFO_LIST, *PAUDCAP_INFO_LIST;
  68. /*
  69. * @enum VIDEO_SIZES | Enumeration values for the three video sizes supported by NetMeeting
  70. */
  71. typedef enum
  72. {
  73. Small = 0, // @emem Small size video
  74. Medium, // @emem Medium size video
  75. Large // @emem Large size video
  76. } VIDEO_SIZES;
  77. /*
  78. * VIDEO capabilities info structure
  79. *
  80. * @struct VIDCAP_INFO | VIDEO capabilities info structure.
  81. * Use for both input and output when calling capabilties APIs.
  82. * The fields are input-only, output-only or input/output depending on the API used.
  83. * Behavior is undefined if these are altered.
  84. */
  85. // VIDCAP_INFO structure
  86. typedef struct BasicVidCapInfo
  87. {
  88. // format identification
  89. DWORD dwFormatTag; // @field The format tag of this format
  90. VIDEO_FORMAT_ID Id; // @field (OUTPUT only) The local id (a.k.a. *Handle*) of this capability entry
  91. char szFormat[ACMFORMATDETAILS_FORMAT_CHARS]; // @field (OUTPUT only) Descriptive string of,
  92. // the formate.g. "Microsoft H.263"
  93. // NetMeeting specific info
  94. WORD wCPUUtilizationEncode; // @field % of Pentium 90Mhz needed for compress
  95. WORD wCPUUtilizationDecode; // @field % of Pentium 90Mhz needed for decompress
  96. BOOL bSendEnabled; // @field OK to use this format for sending
  97. BOOL bRecvEnabled; // @field OK to use this format for receiving
  98. WORD wSortIndex; // @field (OUTPUT only) The ordered position of this entry
  99. // in the capability table.
  100. // video format details
  101. VIDEO_SIZES enumVideoSize; // @field The video size for this format. Different video sizes for
  102. // the same formats must be added as separate formats
  103. BITMAPINFOHEADER bih; // @field The BITMAPINFOHEADER sturcture for the video
  104. // size in enumVideosize
  105. UINT uFrameRate; // @field Number of frames per second
  106. DWORD dwBitsPerSample; // @field number of bits per sample for this format. Must
  107. // match the value in bih.biBitCount
  108. UINT uAvgBitrate; // @field The average bitrate for this codec
  109. UINT uMaxBitrate; // @field (OUTPUT only) Worst case bitrate
  110. }BASIC_VIDCAP_INFO, *PBASIC_VIDCAP_INFO, VIDCAP_INFO, *PVIDCAP_INFO;
  111. /*
  112. * @struct VIDCAP_INFO_LIST | List of VIDCAP_INFO structures
  113. */
  114. typedef struct _vidcapinfolist
  115. {
  116. ULONG cFormats;// @field Number of VIDCAP_INFO structures in this list
  117. VIDCAP_INFO aFormats[VARIABLE_DIM]; // @field cFormats VIDCAP_INFO structures
  118. } VIDCAP_INFO_LIST, *PVIDCAP_INFO_LIST;
  119. #include <poppack.h> /* End byte packing */
  120. #endif //#ifndef _APPAVCAP_H