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 #ifndef TALK_MEDIA_BASE_CONSTANTS_H_ 29 #define TALK_MEDIA_BASE_CONSTANTS_H_ 30 31 #include <string> 32 33 // This file contains constants related to media. 34 35 namespace cricket { 36 37 extern const int kVideoCodecClockrate; 38 extern const int kDataCodecClockrate; 39 extern const int kDataMaxBandwidth; // bps 40 41 // Default CPU thresholds. 42 extern const float kHighSystemCpuThreshold; 43 extern const float kLowSystemCpuThreshold; 44 extern const float kProcessCpuThreshold; 45 46 extern const char kRtxCodecName[]; 47 extern const char kRedCodecName[]; 48 extern const char kUlpfecCodecName[]; 49 50 // Codec parameters 51 extern const int kWildcardPayloadType; 52 extern const char kCodecParamAssociatedPayloadType[]; 53 54 extern const char kOpusCodecName[]; 55 56 // Attribute parameters 57 extern const char kCodecParamPTime[]; 58 extern const char kCodecParamMaxPTime[]; 59 // fmtp parameters 60 extern const char kCodecParamMinPTime[]; 61 extern const char kCodecParamSPropStereo[]; 62 extern const char kCodecParamStereo[]; 63 extern const char kCodecParamUseInbandFec[]; 64 extern const char kCodecParamMaxAverageBitrate[]; 65 extern const char kCodecParamMaxPlaybackRate[]; 66 extern const char kCodecParamSctpProtocol[]; 67 extern const char kCodecParamSctpStreams[]; 68 69 extern const char kParamValueTrue[]; 70 // Parameters are stored as parameter/value pairs. For parameters who do not 71 // have a value, |kParamValueEmpty| should be used as value. 72 extern const char kParamValueEmpty[]; 73 74 // opus parameters. 75 // Default value for maxptime according to 76 // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 77 extern const int kOpusDefaultMaxPTime; 78 extern const int kOpusDefaultPTime; 79 extern const int kOpusDefaultMinPTime; 80 extern const int kOpusDefaultSPropStereo; 81 extern const int kOpusDefaultStereo; 82 extern const int kOpusDefaultUseInbandFec; 83 extern const int kOpusDefaultMaxPlaybackRate; 84 85 // Prefered values in this code base. Note that they may differ from the default 86 // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 87 // Only frames larger or equal to 10 ms are currently supported in this code 88 // base. 89 extern const int kPreferredMaxPTime; 90 extern const int kPreferredMinPTime; 91 extern const int kPreferredSPropStereo; 92 extern const int kPreferredStereo; 93 extern const int kPreferredUseInbandFec; 94 95 // rtcp-fb messages according to RFC 4585 96 extern const char kRtcpFbParamNack[]; 97 extern const char kRtcpFbNackParamPli[]; 98 // rtcp-fb messages according to 99 // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00 100 extern const char kRtcpFbParamRemb[]; 101 // ccm submessages according to RFC 5104 102 extern const char kRtcpFbParamCcm[]; 103 extern const char kRtcpFbCcmParamFir[]; 104 // Google specific parameters 105 extern const char kCodecParamMaxBitrate[]; 106 extern const char kCodecParamMinBitrate[]; 107 extern const char kCodecParamStartBitrate[]; 108 extern const char kCodecParamMaxQuantization[]; 109 extern const char kCodecParamPort[]; 110 111 // We put the data codec names here so callers of 112 // DataEngine::CreateChannel don't have to import rtpdataengine.h or 113 // sctpdataengine.h to get the codec names they want to pass in. 114 extern const int kGoogleRtpDataCodecId; 115 extern const char kGoogleRtpDataCodecName[]; 116 117 // TODO(pthatcher): Find an id that won't conflict with anything. On 118 // the other hand, it really shouldn't matter since the id won't be 119 // used on the wire. 120 extern const int kGoogleSctpDataCodecId; 121 extern const char kGoogleSctpDataCodecName[]; 122 123 extern const char kComfortNoiseCodecName[]; 124 125 // Extension header for audio levels, as defined in 126 // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 127 extern const int kRtpAudioLevelHeaderExtensionDefaultId; 128 extern const char kRtpAudioLevelHeaderExtension[]; 129 130 // Extension header for RTP timestamp offset, see RFC 5450 for details: 131 // http://tools.ietf.org/html/rfc5450 132 extern const int kRtpTimestampOffsetHeaderExtensionDefaultId; 133 extern const char kRtpTimestampOffsetHeaderExtension[]; 134 135 // Extension header for absolute send time, see url for details: 136 // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time 137 extern const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId; 138 extern const char kRtpAbsoluteSenderTimeHeaderExtension[]; 139 140 extern const int kNumDefaultUnsignalledVideoRecvStreams; 141 } // namespace cricket 142 143 #endif // TALK_MEDIA_BASE_CONSTANTS_H_ 144 145