home *** CD-ROM | disk | FTP | other *** search
/ PC Format (South-Africa) 2001 June / PCFJune.iso / Xenon / C++ / FreeCommandLineTools.exe / Include / appavcap.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-01-31  |  5.7 KB  |  150 lines

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