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 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 const char kCodecParamMaxPlaybackRate[] = "maxplaybackrate";
     63 
     64 const char kCodecParamSctpProtocol[] = "protocol";
     65 const char kCodecParamSctpStreams[] = "streams";
     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 kOpusDefaultMaxPlaybackRate = 48000;
     77 
     78 const int kPreferredMaxPTime = 60;
     79 const int kPreferredMinPTime = 10;
     80 const int kPreferredSPropStereo = 0;
     81 const int kPreferredStereo = 0;
     82 const int kPreferredUseInbandFec = 0;
     83 
     84 const char kRtcpFbParamNack[] = "nack";
     85 const char kRtcpFbNackParamPli[] = "pli";
     86 const char kRtcpFbParamRemb[] = "goog-remb";
     87 
     88 const char kRtcpFbParamCcm[] = "ccm";
     89 const char kRtcpFbCcmParamFir[] = "fir";
     90 const char kCodecParamMaxBitrate[] = "x-google-max-bitrate";
     91 const char kCodecParamMinBitrate[] = "x-google-min-bitrate";
     92 const char kCodecParamStartBitrate[] = "x-google-start-bitrate";
     93 const char kCodecParamMaxQuantization[] = "x-google-max-quantization";
     94 const char kCodecParamPort[] = "x-google-port";
     95 
     96 const int kGoogleRtpDataCodecId = 101;
     97 const char kGoogleRtpDataCodecName[] = "google-data";
     98 
     99 const int kGoogleSctpDataCodecId = 108;
    100 const char kGoogleSctpDataCodecName[] = "google-sctp-data";
    101 
    102 const char kComfortNoiseCodecName[] = "CN";
    103 
    104 const int kRtpAudioLevelHeaderExtensionDefaultId = 1;
    105 const char kRtpAudioLevelHeaderExtension[] =
    106     "urn:ietf:params:rtp-hdrext:ssrc-audio-level";
    107 
    108 const int kRtpTimestampOffsetHeaderExtensionDefaultId = 2;
    109 const char kRtpTimestampOffsetHeaderExtension[] =
    110     "urn:ietf:params:rtp-hdrext:toffset";
    111 
    112 const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId = 3;
    113 const char kRtpAbsoluteSenderTimeHeaderExtension[] =
    114     "http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time";
    115 
    116 const int kNumDefaultUnsignalledVideoRecvStreams = 0;
    117 
    118 
    119 }  // namespace cricket
    120 
    121