henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame^] | 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 | |
| 44 | // RTP payload type is in the 0-127 range. Use 128 to indicate "all" payload |
| 45 | // types. |
| 46 | const int kWildcardPayloadType = -1; |
| 47 | |
| 48 | const char* kCodecParamAssociatedPayloadType = "apt"; |
| 49 | |
| 50 | const char* kOpusCodecName = "opus"; |
| 51 | |
| 52 | const char* kCodecParamPTime = "ptime"; |
| 53 | const char* kCodecParamMaxPTime = "maxptime"; |
| 54 | |
| 55 | const char* kCodecParamMinPTime = "minptime"; |
| 56 | const char* kCodecParamSPropStereo = "sprop-stereo"; |
| 57 | const char* kCodecParamStereo = "stereo"; |
| 58 | const char* kCodecParamUseInbandFec = "useinbandfec"; |
| 59 | const char* kCodecParamSctpProtocol = "protocol"; |
| 60 | const char* kCodecParamSctpStreams = "streams"; |
| 61 | |
| 62 | const char* kParamValueTrue = "1"; |
| 63 | const char* kParamValueEmpty = ""; |
| 64 | |
| 65 | const int kOpusDefaultMaxPTime = 120; |
| 66 | const int kOpusDefaultPTime = 20; |
| 67 | const int kOpusDefaultMinPTime = 3; |
| 68 | const int kOpusDefaultSPropStereo = 0; |
| 69 | const int kOpusDefaultStereo = 0; |
| 70 | const int kOpusDefaultUseInbandFec = 0; |
| 71 | |
| 72 | const int kPreferredMaxPTime = 60; |
| 73 | const int kPreferredMinPTime = 10; |
| 74 | const int kPreferredSPropStereo = 0; |
| 75 | const int kPreferredStereo = 0; |
| 76 | const int kPreferredUseInbandFec = 0; |
| 77 | |
| 78 | const char* kRtcpFbParamNack = "nack"; |
| 79 | const char* kRtcpFbParamRemb = "goog-remb"; |
| 80 | |
| 81 | const char* kRtcpFbParamCcm = "ccm"; |
| 82 | const char* kRtcpFbCcmParamFir = "fir"; |
| 83 | const char* kCodecParamMaxBitrate = "x-google-max-bitrate"; |
| 84 | const char* kCodecParamMinBitrate = "x-google-min-bitrate"; |
| 85 | const char* kCodecParamMaxQuantization = "x-google-max-quantization"; |
| 86 | |
| 87 | const int kGoogleRtpDataCodecId = 101; |
| 88 | const char kGoogleRtpDataCodecName[] = "google-data"; |
| 89 | |
| 90 | const int kGoogleSctpDataCodecId = 108; |
| 91 | const char kGoogleSctpDataCodecName[] = "google-sctp-data"; |
| 92 | |
| 93 | const char kComfortNoiseCodecName[] = "CN"; |
| 94 | |
| 95 | } // namespace cricket |