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 11 #ifndef MEDIA_BASE_MEDIA_CONSTANTS_H_ 12 #define MEDIA_BASE_MEDIA_CONSTANTS_H_ 13 14 #include <stddef.h> 15 16 #include "rtc_base/system/rtc_export.h" 17 18 // This file contains constants related to media. 19 20 namespace cricket { 21 22 extern const int kVideoCodecClockrate; 23 extern const int kDataCodecClockrate; 24 extern const int kRtpDataMaxBandwidth; // bps 25 26 extern const int kVideoMtu; 27 extern const int kVideoRtpSendBufferSize; 28 extern const int kVideoRtpRecvBufferSize; 29 30 // Default CPU thresholds. 31 extern const float kHighSystemCpuThreshold; 32 extern const float kLowSystemCpuThreshold; 33 extern const float kProcessCpuThreshold; 34 35 extern const char kRedCodecName[]; 36 extern const char kUlpfecCodecName[]; 37 extern const char kFlexfecCodecName[]; 38 extern const char kMultiplexCodecName[]; 39 40 extern const char kFlexfecFmtpRepairWindow[]; 41 42 extern const char kRtxCodecName[]; 43 extern const char kCodecParamRtxTime[]; 44 extern const char kCodecParamAssociatedPayloadType[]; 45 46 extern const char kCodecParamAssociatedCodecName[]; 47 48 extern const char kOpusCodecName[]; 49 extern const char kIsacCodecName[]; 50 extern const char kL16CodecName[]; 51 extern const char kG722CodecName[]; 52 extern const char kIlbcCodecName[]; 53 extern const char kPcmuCodecName[]; 54 extern const char kPcmaCodecName[]; 55 extern const char kCnCodecName[]; 56 extern const char kDtmfCodecName[]; 57 58 // Attribute parameters 59 extern const char kCodecParamPTime[]; 60 extern const char kCodecParamMaxPTime[]; 61 // fmtp parameters 62 extern const char kCodecParamMinPTime[]; 63 extern const char kCodecParamSPropStereo[]; 64 extern const char kCodecParamStereo[]; 65 extern const char kCodecParamUseInbandFec[]; 66 extern const char kCodecParamUseDtx[]; 67 extern const char kCodecParamMaxAverageBitrate[]; 68 extern const char kCodecParamMaxPlaybackRate[]; 69 70 extern const char kParamValueTrue[]; 71 // Parameters are stored as parameter/value pairs. For parameters who do not 72 // have a value, |kParamValueEmpty| should be used as value. 73 extern const char kParamValueEmpty[]; 74 75 // opus parameters. 76 // Default value for maxptime according to 77 // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 78 extern const int kOpusDefaultMaxPTime; 79 extern const int kOpusDefaultPTime; 80 extern const int kOpusDefaultMinPTime; 81 extern const int kOpusDefaultSPropStereo; 82 extern const int kOpusDefaultStereo; 83 extern const int kOpusDefaultUseInbandFec; 84 extern const int kOpusDefaultUseDtx; 85 extern const int kOpusDefaultMaxPlaybackRate; 86 87 // Prefered values in this code base. Note that they may differ from the default 88 // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 89 // Only frames larger or equal to 10 ms are currently supported in this code 90 // base. 91 extern const int kPreferredMaxPTime; 92 extern const int kPreferredMinPTime; 93 extern const int kPreferredSPropStereo; 94 extern const int kPreferredStereo; 95 extern const int kPreferredUseInbandFec; 96 97 extern const char kPacketizationParamRaw[]; 98 99 // rtcp-fb message in its first experimental stages. Documentation pending. 100 extern const char kRtcpFbParamLntf[]; 101 // rtcp-fb messages according to RFC 4585 102 extern const char kRtcpFbParamNack[]; 103 extern const char kRtcpFbNackParamPli[]; 104 // rtcp-fb messages according to 105 // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00 106 extern const char kRtcpFbParamRemb[]; 107 // rtcp-fb messages according to 108 // https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01 109 extern const char kRtcpFbParamTransportCc[]; 110 // ccm submessages according to RFC 5104 111 extern const char kRtcpFbParamCcm[]; 112 extern const char kRtcpFbCcmParamFir[]; 113 // Receiver reference time report 114 // https://tools.ietf.org/html/rfc3611 section 4.4 115 extern const char kRtcpFbParamRrtr[]; 116 // Google specific parameters 117 extern const char kCodecParamMaxBitrate[]; 118 extern const char kCodecParamMinBitrate[]; 119 extern const char kCodecParamStartBitrate[]; 120 extern const char kCodecParamMaxQuantization[]; 121 122 // We put the data codec names here so callers of DataEngine::CreateChannel 123 // don't have to import rtpdataengine.h to get the codec names they want to 124 // pass in. 125 extern const int kGoogleRtpDataCodecPlType; 126 extern const char kGoogleRtpDataCodecName[]; 127 128 extern const char kComfortNoiseCodecName[]; 129 130 RTC_EXPORT extern const char kVp8CodecName[]; 131 RTC_EXPORT extern const char kVp9CodecName[]; 132 RTC_EXPORT extern const char kAv1CodecName[]; 133 RTC_EXPORT extern const char kH264CodecName[]; 134 #ifndef DISABLE_H265 135 RTC_EXPORT extern const char kH265CodecName[]; 136 #endif 137 138 // RFC 6184 RTP Payload Format for H.264 video 139 RTC_EXPORT extern const char kH264FmtpProfileLevelId[]; 140 RTC_EXPORT extern const char kH264FmtpLevelAsymmetryAllowed[]; 141 RTC_EXPORT extern const char kH264FmtpPacketizationMode[]; 142 extern const char kH264FmtpSpropParameterSets[]; 143 extern const char kH264FmtpSpsPpsIdrInKeyframe[]; 144 extern const char kH264ProfileLevelConstrainedBaseline[]; 145 extern const char kH264ProfileLevelConstrainedHigh[]; 146 147 #ifndef DISABLE_H265 148 // RFC 7798 RTP Payload Format for H.265 video 149 RTC_EXPORT extern const char kH265FmtpProfileSpace[]; 150 RTC_EXPORT extern const char kH265FmtpProfileId[]; 151 RTC_EXPORT extern const char kH265FmtpTierFlag[]; 152 RTC_EXPORT extern const char kH265FmtpLevelId[]; 153 #endif 154 extern const int kDefaultVideoMaxFramerate; 155 156 extern const size_t kConferenceMaxNumSpatialLayers; 157 extern const size_t kConferenceMaxNumTemporalLayers; 158 extern const size_t kConferenceDefaultNumTemporalLayers; 159 160 extern const char kApplicationSpecificBandwidth[]; 161 extern const char kTransportSpecificBandwidth[]; 162 } // namespace cricket 163 164 #endif // MEDIA_BASE_MEDIA_CONSTANTS_H_ 165