media_constants.h 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
  1. /*
  2. * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef MEDIA_BASE_MEDIA_CONSTANTS_H_
  11. #define MEDIA_BASE_MEDIA_CONSTANTS_H_
  12. #include <stddef.h>
  13. #include "rtc_base/system/rtc_export.h"
  14. // This file contains constants related to media.
  15. namespace cricket {
  16. extern const int kVideoCodecClockrate;
  17. extern const int kDataCodecClockrate;
  18. extern const int kDataMaxBandwidth; // bps
  19. // Default CPU thresholds.
  20. extern const float kHighSystemCpuThreshold;
  21. extern const float kLowSystemCpuThreshold;
  22. extern const float kProcessCpuThreshold;
  23. extern const char kRtxCodecName[];
  24. extern const char kRedCodecName[];
  25. extern const char kUlpfecCodecName[];
  26. extern const char kFlexfecCodecName[];
  27. extern const char kMultiplexCodecName[];
  28. extern const char kFlexfecFmtpRepairWindow[];
  29. // Codec parameters
  30. extern const char kCodecParamAssociatedPayloadType[];
  31. extern const char kCodecParamAssociatedCodecName[];
  32. extern const char kOpusCodecName[];
  33. extern const char kIsacCodecName[];
  34. extern const char kL16CodecName[];
  35. extern const char kG722CodecName[];
  36. extern const char kIlbcCodecName[];
  37. extern const char kPcmuCodecName[];
  38. extern const char kPcmaCodecName[];
  39. extern const char kCnCodecName[];
  40. extern const char kDtmfCodecName[];
  41. // Attribute parameters
  42. extern const char kCodecParamPTime[];
  43. extern const char kCodecParamMaxPTime[];
  44. // fmtp parameters
  45. extern const char kCodecParamMinPTime[];
  46. extern const char kCodecParamSPropStereo[];
  47. extern const char kCodecParamStereo[];
  48. extern const char kCodecParamUseInbandFec[];
  49. extern const char kCodecParamUseDtx[];
  50. extern const char kCodecParamMaxAverageBitrate[];
  51. extern const char kCodecParamMaxPlaybackRate[];
  52. extern const char kCodecParamSctpProtocol[];
  53. extern const char kCodecParamSctpStreams[];
  54. extern const char kParamValueTrue[];
  55. // Parameters are stored as parameter/value pairs. For parameters who do not
  56. // have a value, |kParamValueEmpty| should be used as value.
  57. extern const char kParamValueEmpty[];
  58. // opus parameters.
  59. // Default value for maxptime according to
  60. // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
  61. extern const int kOpusDefaultMaxPTime;
  62. extern const int kOpusDefaultPTime;
  63. extern const int kOpusDefaultMinPTime;
  64. extern const int kOpusDefaultSPropStereo;
  65. extern const int kOpusDefaultStereo;
  66. extern const int kOpusDefaultUseInbandFec;
  67. extern const int kOpusDefaultUseDtx;
  68. extern const int kOpusDefaultMaxPlaybackRate;
  69. // Prefered values in this code base. Note that they may differ from the default
  70. // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
  71. // Only frames larger or equal to 10 ms are currently supported in this code
  72. // base.
  73. extern const int kPreferredMaxPTime;
  74. extern const int kPreferredMinPTime;
  75. extern const int kPreferredSPropStereo;
  76. extern const int kPreferredStereo;
  77. extern const int kPreferredUseInbandFec;
  78. extern const char kPacketizationParamRaw[];
  79. // rtcp-fb message in its first experimental stages. Documentation pending.
  80. extern const char kRtcpFbParamLntf[];
  81. // rtcp-fb messages according to RFC 4585
  82. extern const char kRtcpFbParamNack[];
  83. extern const char kRtcpFbNackParamPli[];
  84. // rtcp-fb messages according to
  85. // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00
  86. extern const char kRtcpFbParamRemb[];
  87. // rtcp-fb messages according to
  88. // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01
  89. extern const char kRtcpFbParamTransportCc[];
  90. // ccm submessages according to RFC 5104
  91. extern const char kRtcpFbParamCcm[];
  92. extern const char kRtcpFbCcmParamFir[];
  93. // Receiver reference time report
  94. // https://tools.ietf.org/html/rfc3611 section 4.4
  95. extern const char kRtcpFbParamRrtr[];
  96. // Google specific parameters
  97. extern const char kCodecParamMaxBitrate[];
  98. extern const char kCodecParamMinBitrate[];
  99. extern const char kCodecParamStartBitrate[];
  100. extern const char kCodecParamMaxQuantization[];
  101. extern const char kCodecParamPort[];
  102. extern const char kCodecParamMaxMessageSize[];
  103. // We put the data codec names here so callers of DataEngine::CreateChannel
  104. // don't have to import rtpdataengine.h to get the codec names they want to
  105. // pass in.
  106. extern const int kGoogleRtpDataCodecPlType;
  107. extern const char kGoogleRtpDataCodecName[];
  108. extern const char kComfortNoiseCodecName[];
  109. RTC_EXPORT extern const char kVp8CodecName[];
  110. RTC_EXPORT extern const char kVp9CodecName[];
  111. RTC_EXPORT extern const char kAv1CodecName[];
  112. RTC_EXPORT extern const char kH264CodecName[];
  113. // RFC 6184 RTP Payload Format for H.264 video
  114. RTC_EXPORT extern const char kH264FmtpProfileLevelId[];
  115. RTC_EXPORT extern const char kH264FmtpLevelAsymmetryAllowed[];
  116. RTC_EXPORT extern const char kH264FmtpPacketizationMode[];
  117. extern const char kH264FmtpSpropParameterSets[];
  118. extern const char kH264FmtpSpsPpsIdrInKeyframe[];
  119. extern const char kH264ProfileLevelConstrainedBaseline[];
  120. extern const char kH264ProfileLevelConstrainedHigh[];
  121. extern const int kDefaultVideoMaxFramerate;
  122. extern const size_t kConferenceMaxNumSpatialLayers;
  123. extern const size_t kConferenceMaxNumTemporalLayers;
  124. extern const size_t kConferenceDefaultNumTemporalLayers;
  125. extern const char kApplicationSpecificBandwidth[];
  126. extern const char kTransportSpecificBandwidth[];
  127. } // namespace cricket
  128. #endif // MEDIA_BASE_MEDIA_CONSTANTS_H_