Home | History | Annotate | Download | only in base
      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 // draft-spittka-payload-rtp-opus-03.txt
     53 const char* kCodecParamPTime = "ptime";
     54 const char* kCodecParamMaxPTime = "maxptime";
     55 const char* kCodecParamMinPTime = "minptime";
     56 const char* kCodecParamSPropStereo = "sprop-stereo";
     57 const char* kCodecParamStereo = "stereo";
     58 const char* kCodecParamUseInbandFec = "useinbandfec";
     59 const char* kCodecParamMaxAverageBitrate = "maxaveragebitrate";
     60 
     61 const char* kCodecParamSctpProtocol = "protocol";
     62 const char* kCodecParamSctpStreams = "streams";
     63 
     64 const char* kParamValueTrue = "1";
     65 const char* kParamValueEmpty = "";
     66 
     67 const int kOpusDefaultMaxPTime = 120;
     68 const int kOpusDefaultPTime = 20;
     69 const int kOpusDefaultMinPTime = 3;
     70 const int kOpusDefaultSPropStereo = 0;
     71 const int kOpusDefaultStereo = 0;
     72 const int kOpusDefaultUseInbandFec = 0;
     73 
     74 const int kPreferredMaxPTime = 60;
     75 const int kPreferredMinPTime = 10;
     76 const int kPreferredSPropStereo = 0;
     77 const int kPreferredStereo = 0;
     78 const int kPreferredUseInbandFec = 0;
     79 
     80 const char* kRtcpFbParamNack = "nack";
     81 const char* kRtcpFbParamRemb = "goog-remb";
     82 
     83 const char* kRtcpFbParamCcm = "ccm";
     84 const char* kRtcpFbCcmParamFir = "fir";
     85 const char* kCodecParamMaxBitrate = "x-google-max-bitrate";
     86 const char* kCodecParamMinBitrate = "x-google-min-bitrate";
     87 const char* kCodecParamMaxQuantization = "x-google-max-quantization";
     88 
     89 const int kGoogleRtpDataCodecId = 101;
     90 const char kGoogleRtpDataCodecName[] = "google-data";
     91 
     92 const int kGoogleSctpDataCodecId = 108;
     93 const char kGoogleSctpDataCodecName[] = "google-sctp-data";
     94 
     95 const char kComfortNoiseCodecName[] = "CN";
     96 
     97 }  // namespace cricket
     98