| 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 | #include "media/base/media_constants.h" |
| 12 |
| 13 | namespace cricket { |
| 14 |
| 15 | const int kVideoCodecClockrate = 90000; |
| 16 |
| 17 | const int kVideoMtu = 1200; |
| 18 | const int kVideoRtpSendBufferSize = 262144; |
| 19 | const int kVideoRtpRecvBufferSize = 262144; |
| 20 |
| 21 | const float kHighSystemCpuThreshold = 0.85f; |
| 22 | const float kLowSystemCpuThreshold = 0.65f; |
| 23 | const float kProcessCpuThreshold = 0.10f; |
| 24 |
| 25 | const char kRedCodecName[] = "red"; |
| 26 | const char kUlpfecCodecName[] = "ulpfec"; |
| 27 | const char kMultiplexCodecName[] = "multiplex"; |
| 28 |
| 29 | // TODO(brandtr): Change this to 'flexfec' when we are confident that the |
| 30 | // header format is not changing anymore. |
| 31 | const char kFlexfecCodecName[] = "flexfec-03"; |
| 32 |
| 33 | // draft-ietf-payload-flexible-fec-scheme-02.txt |
| 34 | const char kFlexfecFmtpRepairWindow[] = "repair-window"; |
| 35 |
| 36 | // RFC 4588 RTP Retransmission Payload Format |
| 37 | const char kRtxCodecName[] = "rtx"; |
| 38 | const char kCodecParamRtxTime[] = "rtx-time"; |
| 39 | const char kCodecParamAssociatedPayloadType[] = "apt"; |
| 40 |
| 41 | const char kCodecParamAssociatedCodecName[] = "acn"; |
| 42 | // Parameters that do not follow the key-value convention |
| 43 | // are treated as having the empty string as key. |
| 44 | const char kCodecParamNotInNameValueFormat[] = ""; |
| 45 |
| 46 | const char kOpusCodecName[] = "opus"; |
| 47 | const char kL16CodecName[] = "L16"; |
| 48 | const char kG722CodecName[] = "G722"; |
| 49 | const char kIlbcCodecName[] = "ILBC"; |
| 50 | const char kPcmuCodecName[] = "PCMU"; |
| 51 | const char kPcmaCodecName[] = "PCMA"; |
| 52 | const char kCnCodecName[] = "CN"; |
| 53 | const char kDtmfCodecName[] = "telephone-event"; |
| 54 |
| 55 | // draft-spittka-payload-rtp-opus-03.txt |
| 56 | const char kCodecParamPTime[] = "ptime"; |
| 57 | const char kCodecParamMaxPTime[] = "maxptime"; |
| 58 | const char kCodecParamMinPTime[] = "minptime"; |
| 59 | const char kCodecParamSPropStereo[] = "sprop-stereo"; |
| 60 | const char kCodecParamStereo[] = "stereo"; |
| 61 | const char kCodecParamUseInbandFec[] = "useinbandfec"; |
| 62 | const char kCodecParamUseDtx[] = "usedtx"; |
| 63 | const char kCodecParamMaxAverageBitrate[] = "maxaveragebitrate"; |
| 64 | const char kCodecParamMaxPlaybackRate[] = "maxplaybackrate"; |
| 65 |
| 66 | const char kParamValueTrue[] = "1"; |
| 67 | const char kParamValueEmpty[] = ""; |
| 68 |
| 69 | const int kOpusDefaultMaxPTime = 120; |
| 70 | const int kOpusDefaultPTime = 20; |
| 71 | const int kOpusDefaultMinPTime = 3; |
| 72 | const int kOpusDefaultSPropStereo = 0; |
| 73 | const int kOpusDefaultStereo = 0; |
| 74 | const int kOpusDefaultUseInbandFec = 0; |
| 75 | const int kOpusDefaultUseDtx = 0; |
| 76 | const int kOpusDefaultMaxPlaybackRate = 48000; |
| 77 |
| 78 | const int kPreferredMaxPTime = 120; |
| 79 | const int kPreferredMinPTime = 10; |
| 80 | const int kPreferredSPropStereo = 0; |
| 81 | const int kPreferredStereo = 0; |
| 82 | const int kPreferredUseInbandFec = 0; |
| 83 |
| 84 | const char kPacketizationParamRaw[] = "raw"; |
| 85 |
| 86 | const char kRtcpFbParamLntf[] = "goog-lntf"; |
| 87 | const char kRtcpFbParamNack[] = "nack"; |
| 88 | const char kRtcpFbNackParamPli[] = "pli"; |
| 89 | const char kRtcpFbParamRemb[] = "goog-remb"; |
| 90 | const char kRtcpFbParamTransportCc[] = "transport-cc"; |
| 91 |
| 92 | const char kRtcpFbParamCcm[] = "ccm"; |
| 93 | const char kRtcpFbCcmParamFir[] = "fir"; |
| 94 | const char kRtcpFbParamRrtr[] = "rrtr"; |
| 95 | const char kCodecParamMaxBitrate[] = "x-google-max-bitrate"; |
| 96 | const char kCodecParamMinBitrate[] = "x-google-min-bitrate"; |
| 97 | const char kCodecParamStartBitrate[] = "x-google-start-bitrate"; |
| 98 | const char kCodecParamMaxQuantization[] = "x-google-max-quantization"; |
| 99 |
| 100 | const char kComfortNoiseCodecName[] = "CN"; |
| 101 |
| 102 | const char kVp8CodecName[] = "VP8"; |
| 103 | const char kVp9CodecName[] = "VP9"; |
| 104 | const char kAv1CodecName[] = "AV1"; |
| 105 | const char kH264CodecName[] = "H264"; |
| 106 | const char kH265CodecName[] = "H265"; |
| 107 |
| 108 | // RFC 6184 RTP Payload Format for H.264 video |
| 109 | const char kH264FmtpProfileLevelId[] = "profile-level-id"; |
| 110 | const char kH264FmtpLevelAsymmetryAllowed[] = "level-asymmetry-allowed"; |
| 111 | const char kH264FmtpPacketizationMode[] = "packetization-mode"; |
| 112 | const char kH264FmtpSpropParameterSets[] = "sprop-parameter-sets"; |
| 113 | const char kH264FmtpSpsPpsIdrInKeyframe[] = "sps-pps-idr-in-keyframe"; |
| 114 | const char kH264ProfileLevelConstrainedBaseline[] = "42e01f"; |
| 115 | const char kH264ProfileLevelConstrainedHigh[] = "640c1f"; |
| 116 |
| 117 | // RFC 7798 RTP Payload Format for H.265 video |
| 118 | const char kH265FmtpProfileSpace[] = "profile-space"; |
| 119 | const char kH265FmtpTierFlag[] = "tier-flag"; |
| 120 | const char kH265FmtpProfileId[] = "profile-id"; |
| 121 | const char kH265FmtpLevelId[] = "level-id"; |
| 122 | const char kH265FmtpProfileCompatibilityIndicator[] = |
| 123 | "profile-compatibility-indicator"; |
| 124 | const char kH265FmtpInteropConstraints[] = "interop-constraints"; |
| 125 | const char kH265FmtpTxMode[] = "tx-mode"; |
| 126 |
| 127 | // draft-ietf-payload-vp9 |
| 128 | const char kVP9ProfileId[] = "profile-id"; |
| 129 |
| 130 | // https://aomediacodec.github.io/av1-rtp-spec/ |
| 131 | const char kAv1FmtpProfile[] = "profile"; |
| 132 | const char kAv1FmtpLevelIdx[] = "level-idx"; |
| 133 | const char kAv1FmtpTier[] = "tier"; |
| 134 |
| 135 | const int kDefaultVideoMaxFramerate = 60; |
| 136 | // Max encode quantizer for VP8/9 and AV1 encoders assuming libvpx/libaom API |
| 137 | // range [0, 63] |
| 138 | const int kDefaultVideoMaxQpVpx = 56; |
| 139 | // Max encode quantizer for H264/5 assuming the bitstream range [0, 51]. |
| 140 | const int kDefaultVideoMaxQpH26x = 51; |
| 141 |
| 142 | const size_t kConferenceMaxNumSpatialLayers = 3; |
| 143 | const size_t kConferenceMaxNumTemporalLayers = 3; |
| 144 | const size_t kConferenceDefaultNumTemporalLayers = 3; |
| 145 |
| 146 | // RFC 3556 and RFC 3890 |
| 147 | const char kApplicationSpecificBandwidth[] = "AS"; |
| 148 | const char kTransportSpecificBandwidth[] = "TIAS"; |
| 149 | } // namespace cricket |
| 150 |