AppAvCap.h 5.4 KB

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