1 /* 2 * libjingle 3 * Copyright 2012 Google Inc. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are met: 7 * 8 * 1. Redistributions of source code must retain the above copyright notice, 9 * this list of conditions and the following disclaimer. 10 * 2. Redistributions in binary form must reproduce the above copyright notice, 11 * this list of conditions and the following disclaimer in the documentation 12 * and/or other materials provided with the distribution. 13 * 3. The name of the author may not be used to endorse or promote products 14 * derived from this software without specific prior written permission. 15 * 16 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED 17 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF 18 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO 19 * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 20 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, 21 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; 22 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 23 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR 24 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF 25 * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 26 */ 27 28 #include "talk/media/base/constants.h" 29 30 #include <string> 31 32 namespace cricket { 33 34 const int kVideoCodecClockrate = 90000; 35 const int kDataCodecClockrate = 90000; 36 const int kDataMaxBandwidth = 30720; // bps 37 38 const float kHighSystemCpuThreshold = 0.85f; 39 const float kLowSystemCpuThreshold = 0.65f; 40 const float kProcessCpuThreshold = 0.10f; 41 42 const char kRtxCodecName[] = "rtx"; 43 const char kRedCodecName[] = "red"; 44 const char kUlpfecCodecName[] = "ulpfec"; 45 46 // RTP payload type is in the 0-127 range. Use 128 to indicate "all" payload 47 // types. 48 const int kWildcardPayloadType = -1; 49 50 const char kCodecParamAssociatedPayloadType[] = "apt"; 51 52 const char kOpusCodecName[] = "opus"; 53 54 // draft-spittka-payload-rtp-opus-03.txt 55 const char kCodecParamPTime[] = "ptime"; 56 const char kCodecParamMaxPTime[] = "maxptime"; 57 const char kCodecParamMinPTime[] = "minptime"; 58 const char kCodecParamSPropStereo[] = "sprop-stereo"; 59 const char kCodecParamStereo[] = "stereo"; 60 const char kCodecParamUseInbandFec[] = "useinbandfec"; 61 const char kCodecParamMaxAverageBitrate[] = "maxaveragebitrate"; 62 63 const char kCodecParamSctpProtocol[] = "protocol"; 64 const char kCodecParamSctpStreams[] = "streams"; 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 76 const int kPreferredMaxPTime = 60; 77 const int kPreferredMinPTime = 10; 78 const int kPreferredSPropStereo = 0; 79 const int kPreferredStereo = 0; 80 const int kPreferredUseInbandFec = 0; 81 82 const char kRtcpFbParamNack[] = "nack"; 83 const char kRtcpFbNackParamPli[] = "pli"; 84 const char kRtcpFbParamRemb[] = "goog-remb"; 85 86 const char kRtcpFbParamCcm[] = "ccm"; 87 const char kRtcpFbCcmParamFir[] = "fir"; 88 const char kCodecParamMaxBitrate[] = "x-google-max-bitrate"; 89 const char kCodecParamMinBitrate[] = "x-google-min-bitrate"; 90 const char kCodecParamStartBitrate[] = "x-google-start-bitrate"; 91 const char kCodecParamMaxQuantization[] = "x-google-max-quantization"; 92 const char kCodecParamPort[] = "x-google-port"; 93 94 const int kGoogleRtpDataCodecId = 101; 95 const char kGoogleRtpDataCodecName[] = "google-data"; 96 97 const int kGoogleSctpDataCodecId = 108; 98 const char kGoogleSctpDataCodecName[] = "google-sctp-data"; 99 100 const char kComfortNoiseCodecName[] = "CN"; 101 102 const int kRtpAudioLevelHeaderExtensionDefaultId = 1; 103 const char kRtpAudioLevelHeaderExtension[] = 104 "urn:ietf:params:rtp-hdrext:ssrc-audio-level"; 105 106 const int kRtpTimestampOffsetHeaderExtensionDefaultId = 2; 107 const char kRtpTimestampOffsetHeaderExtension[] = 108 "urn:ietf:params:rtp-hdrext:toffset"; 109 110 const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId = 3; 111 const char kRtpAbsoluteSenderTimeHeaderExtension[] = 112 "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time"; 113 114 const int kNumDefaultUnsignalledVideoRecvStreams = 0; 115 116 117 } // namespace cricket 118 119