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 #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 = 65536; 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 kIsacCodecName[] = "ISAC"; 48 const char kL16CodecName[] = "L16"; 49 const char kG722CodecName[] = "G722"; 50 const char kIlbcCodecName[] = "ILBC"; 51 const char kPcmuCodecName[] = "PCMU"; 52 const char kPcmaCodecName[] = "PCMA"; 53 const char kCnCodecName[] = "CN"; 54 const char kDtmfCodecName[] = "telephone-event"; 55 56 // draft-spittka-payload-rtp-opus-03.txt 57 const char kCodecParamPTime[] = "ptime"; 58 const char kCodecParamMaxPTime[] = "maxptime"; 59 const char kCodecParamMinPTime[] = "minptime"; 60 const char kCodecParamSPropStereo[] = "sprop-stereo"; 61 const char kCodecParamStereo[] = "stereo"; 62 const char kCodecParamUseInbandFec[] = "useinbandfec"; 63 const char kCodecParamUseDtx[] = "usedtx"; 64 const char kCodecParamMaxAverageBitrate[] = "maxaveragebitrate"; 65 const char kCodecParamMaxPlaybackRate[] = "maxplaybackrate"; 66 67 const char kParamValueTrue[] = "1"; 68 const char kParamValueEmpty[] = ""; 69 70 const int kOpusDefaultMaxPTime = 120; 71 const int kOpusDefaultPTime = 20; 72 const int kOpusDefaultMinPTime = 3; 73 const int kOpusDefaultSPropStereo = 0; 74 const int kOpusDefaultStereo = 0; 75 const int kOpusDefaultUseInbandFec = 0; 76 const int kOpusDefaultUseDtx = 0; 77 const int kOpusDefaultMaxPlaybackRate = 48000; 78 79 const int kPreferredMaxPTime = 120; 80 const int kPreferredMinPTime = 10; 81 const int kPreferredSPropStereo = 0; 82 const int kPreferredStereo = 0; 83 const int kPreferredUseInbandFec = 0; 84 85 const char kPacketizationParamRaw[] = "raw"; 86 87 const char kRtcpFbParamLntf[] = "goog-lntf"; 88 const char kRtcpFbParamNack[] = "nack"; 89 const char kRtcpFbNackParamPli[] = "pli"; 90 const char kRtcpFbParamRemb[] = "goog-remb"; 91 const char kRtcpFbParamTransportCc[] = "transport-cc"; 92 93 const char kRtcpFbParamCcm[] = "ccm"; 94 const char kRtcpFbCcmParamFir[] = "fir"; 95 const char kRtcpFbParamRrtr[] = "rrtr"; 96 const char kCodecParamMaxBitrate[] = "x-google-max-bitrate"; 97 const char kCodecParamMinBitrate[] = "x-google-min-bitrate"; 98 const char kCodecParamStartBitrate[] = "x-google-start-bitrate"; 99 const char kCodecParamMaxQuantization[] = "x-google-max-quantization"; 100 101 const char kComfortNoiseCodecName[] = "CN"; 102 103 const char kVp8CodecName[] = "VP8"; 104 const char kVp9CodecName[] = "VP9"; 105 const char kAv1CodecName[] = "AV1"; 106 const char kH264CodecName[] = "H264"; 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 const char kVP9ProfileId[] = "profile-id"; 118 119 const int kDefaultVideoMaxFramerate = 60; 120 121 const size_t kConferenceMaxNumSpatialLayers = 3; 122 const size_t kConferenceMaxNumTemporalLayers = 3; 123 const size_t kConferenceDefaultNumTemporalLayers = 3; 124 125 // RFC 3556 and RFC 3890 126 const char kApplicationSpecificBandwidth[] = "AS"; 127 const char kTransportSpecificBandwidth[] = "TIAS"; 128 } // namespace cricket 129