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 | #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 | |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 46 | extern const char kRtxCodecName[]; |
pbos@webrtc.org | b5a22b1 | 2014-05-13 11:07:01 +0000 | [diff] [blame] | 47 | extern const char kRedCodecName[]; |
| 48 | extern const char kUlpfecCodecName[]; |
| 49 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 50 | // Codec parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 51 | extern const char kCodecParamAssociatedPayloadType[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 52 | |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 53 | extern const char kOpusCodecName[]; |
Brave Yao | 5225dd8 | 2015-03-26 07:39:19 +0800 | [diff] [blame] | 54 | extern const char kIsacCodecName[]; |
| 55 | extern const char kL16CodecName[]; |
| 56 | extern const char kG722CodecName[]; |
| 57 | extern const char kIlbcCodecName[]; |
| 58 | extern const char kPcmuCodecName[]; |
| 59 | extern const char kPcmaCodecName[]; |
| 60 | extern const char kCnCodecName[]; |
| 61 | extern const char kDtmfCodecName[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 62 | |
| 63 | // Attribute parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 64 | extern const char kCodecParamPTime[]; |
| 65 | extern const char kCodecParamMaxPTime[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 66 | // fmtp parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 67 | extern const char kCodecParamMinPTime[]; |
| 68 | extern const char kCodecParamSPropStereo[]; |
| 69 | extern const char kCodecParamStereo[]; |
| 70 | extern const char kCodecParamUseInbandFec[]; |
Minyue Li | 7100dcd | 2015-03-27 05:05:59 +0100 | [diff] [blame] | 71 | extern const char kCodecParamUseDtx[]; |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 72 | extern const char kCodecParamMaxAverageBitrate[]; |
buildbot@webrtc.org | 5d639b3 | 2014-09-10 07:57:12 +0000 | [diff] [blame] | 73 | extern const char kCodecParamMaxPlaybackRate[]; |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 74 | extern const char kCodecParamSctpProtocol[]; |
| 75 | extern const char kCodecParamSctpStreams[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 76 | |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 77 | extern const char kParamValueTrue[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 78 | // Parameters are stored as parameter/value pairs. For parameters who do not |
| 79 | // have a value, |kParamValueEmpty| should be used as value. |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 80 | extern const char kParamValueEmpty[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 81 | |
| 82 | // opus parameters. |
| 83 | // Default value for maxptime according to |
| 84 | // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 |
| 85 | extern const int kOpusDefaultMaxPTime; |
| 86 | extern const int kOpusDefaultPTime; |
| 87 | extern const int kOpusDefaultMinPTime; |
| 88 | extern const int kOpusDefaultSPropStereo; |
| 89 | extern const int kOpusDefaultStereo; |
| 90 | extern const int kOpusDefaultUseInbandFec; |
Minyue Li | 7100dcd | 2015-03-27 05:05:59 +0100 | [diff] [blame] | 91 | extern const int kOpusDefaultUseDtx; |
buildbot@webrtc.org | 5d639b3 | 2014-09-10 07:57:12 +0000 | [diff] [blame] | 92 | extern const int kOpusDefaultMaxPlaybackRate; |
| 93 | |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 94 | // Prefered values in this code base. Note that they may differ from the default |
| 95 | // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 |
| 96 | // Only frames larger or equal to 10 ms are currently supported in this code |
| 97 | // base. |
| 98 | extern const int kPreferredMaxPTime; |
| 99 | extern const int kPreferredMinPTime; |
| 100 | extern const int kPreferredSPropStereo; |
| 101 | extern const int kPreferredStereo; |
| 102 | extern const int kPreferredUseInbandFec; |
| 103 | |
| 104 | // rtcp-fb messages according to RFC 4585 |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 105 | extern const char kRtcpFbParamNack[]; |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 106 | extern const char kRtcpFbNackParamPli[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 107 | // rtcp-fb messages according to |
| 108 | // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00 |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 109 | extern const char kRtcpFbParamRemb[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 110 | // ccm submessages according to RFC 5104 |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 111 | extern const char kRtcpFbParamCcm[]; |
| 112 | extern const char kRtcpFbCcmParamFir[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 113 | // Google specific parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 114 | extern const char kCodecParamMaxBitrate[]; |
| 115 | extern const char kCodecParamMinBitrate[]; |
buildbot@webrtc.org | ed97bb0 | 2014-05-07 11:15:20 +0000 | [diff] [blame] | 116 | extern const char kCodecParamStartBitrate[]; |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 117 | extern const char kCodecParamMaxQuantization[]; |
| 118 | extern const char kCodecParamPort[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 119 | |
| 120 | // We put the data codec names here so callers of |
| 121 | // DataEngine::CreateChannel don't have to import rtpdataengine.h or |
| 122 | // sctpdataengine.h to get the codec names they want to pass in. |
| 123 | extern const int kGoogleRtpDataCodecId; |
| 124 | extern const char kGoogleRtpDataCodecName[]; |
| 125 | |
| 126 | // TODO(pthatcher): Find an id that won't conflict with anything. On |
| 127 | // the other hand, it really shouldn't matter since the id won't be |
| 128 | // used on the wire. |
| 129 | extern const int kGoogleSctpDataCodecId; |
| 130 | extern const char kGoogleSctpDataCodecName[]; |
| 131 | |
| 132 | extern const char kComfortNoiseCodecName[]; |
| 133 | |
guoweis@webrtc.org | fdd1057 | 2015-03-12 20:50:57 +0000 | [diff] [blame] | 134 | // Header extension for audio levels, as defined in |
henrike@webrtc.org | 79047f9 | 2014-03-06 23:46:59 +0000 | [diff] [blame] | 135 | // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 |
| 136 | extern const int kRtpAudioLevelHeaderExtensionDefaultId; |
| 137 | extern const char kRtpAudioLevelHeaderExtension[]; |
| 138 | |
guoweis@webrtc.org | fdd1057 | 2015-03-12 20:50:57 +0000 | [diff] [blame] | 139 | // Header extension for RTP timestamp offset, see RFC 5450 for details: |
henrike@webrtc.org | 79047f9 | 2014-03-06 23:46:59 +0000 | [diff] [blame] | 140 | // http://tools.ietf.org/html/rfc5450 |
| 141 | extern const int kRtpTimestampOffsetHeaderExtensionDefaultId; |
| 142 | extern const char kRtpTimestampOffsetHeaderExtension[]; |
| 143 | |
guoweis@webrtc.org | fdd1057 | 2015-03-12 20:50:57 +0000 | [diff] [blame] | 144 | // Header extension for absolute send time, see url for details: |
henrike@webrtc.org | d43aa9d | 2014-02-21 23:43:24 +0000 | [diff] [blame] | 145 | // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time |
henrike@webrtc.org | 79047f9 | 2014-03-06 23:46:59 +0000 | [diff] [blame] | 146 | extern const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId; |
| 147 | extern const char kRtpAbsoluteSenderTimeHeaderExtension[]; |
henrike@webrtc.org | d43aa9d | 2014-02-21 23:43:24 +0000 | [diff] [blame] | 148 | |
guoweis@webrtc.org | fdd1057 | 2015-03-12 20:50:57 +0000 | [diff] [blame] | 149 | // Header extension for coordination of video orientation, see url for details: |
| 150 | // http://www.etsi.org/deliver/etsi_ts/126100_126199/126114/12.07.00_60/ |
| 151 | // ts_126114v120700p.pdf |
| 152 | extern const int kRtpVideoRotationHeaderExtensionDefaultId; |
| 153 | extern const char kRtpVideoRotationHeaderExtension[]; |
| 154 | // We don't support 6 bit CVO. Added here for testing purpose. |
| 155 | extern const char kRtpVideoRotation6BitsHeaderExtensionForTesting[]; |
| 156 | |
henrike@webrtc.org | 704bf9e | 2014-02-27 17:52:04 +0000 | [diff] [blame] | 157 | extern const int kNumDefaultUnsignalledVideoRecvStreams; |
Shao Changbin | e62202f | 2015-04-21 20:24:50 +0800 | [diff] [blame^] | 158 | |
| 159 | extern const char kVp8CodecName[]; |
| 160 | extern const char kVp9CodecName[]; |
| 161 | |
| 162 | extern const int kDefaultVp8PlType; |
| 163 | extern const int kDefaultVp9PlType; |
| 164 | extern const int kDefaultRedPlType; |
| 165 | extern const int kDefaultUlpfecType; |
| 166 | extern const int kDefaultRtxVp8PlType; |
| 167 | |
| 168 | extern const int kDefaultVideoMaxWidth; |
| 169 | extern const int kDefaultVideoMaxHeight; |
| 170 | extern const int kDefaultVideoMaxFramerate; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 171 | } // namespace cricket |
| 172 | |
| 173 | #endif // TALK_MEDIA_BASE_CONSTANTS_H_ |
henrike@webrtc.org | 704bf9e | 2014-02-27 17:52:04 +0000 | [diff] [blame] | 174 | |