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[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 47 | |
| 48 | // Codec parameters |
| 49 | extern const int kWildcardPayloadType; |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 50 | extern const char kCodecParamAssociatedPayloadType[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 51 | |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 52 | extern const char kOpusCodecName[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 53 | |
| 54 | // Attribute parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 55 | extern const char kCodecParamPTime[]; |
| 56 | extern const char kCodecParamMaxPTime[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 57 | // fmtp parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 58 | extern const char kCodecParamMinPTime[]; |
| 59 | extern const char kCodecParamSPropStereo[]; |
| 60 | extern const char kCodecParamStereo[]; |
| 61 | extern const char kCodecParamUseInbandFec[]; |
| 62 | extern const char kCodecParamMaxAverageBitrate[]; |
| 63 | extern const char kCodecParamSctpProtocol[]; |
| 64 | extern const char kCodecParamSctpStreams[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 65 | |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 66 | extern const char kParamValueTrue[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 67 | // Parameters are stored as parameter/value pairs. For parameters who do not |
| 68 | // have a value, |kParamValueEmpty| should be used as value. |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 69 | extern const char kParamValueEmpty[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 70 | |
| 71 | // opus parameters. |
| 72 | // Default value for maxptime according to |
| 73 | // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 |
| 74 | extern const int kOpusDefaultMaxPTime; |
| 75 | extern const int kOpusDefaultPTime; |
| 76 | extern const int kOpusDefaultMinPTime; |
| 77 | extern const int kOpusDefaultSPropStereo; |
| 78 | extern const int kOpusDefaultStereo; |
| 79 | extern const int kOpusDefaultUseInbandFec; |
| 80 | // Prefered values in this code base. Note that they may differ from the default |
| 81 | // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03 |
| 82 | // Only frames larger or equal to 10 ms are currently supported in this code |
| 83 | // base. |
| 84 | extern const int kPreferredMaxPTime; |
| 85 | extern const int kPreferredMinPTime; |
| 86 | extern const int kPreferredSPropStereo; |
| 87 | extern const int kPreferredStereo; |
| 88 | extern const int kPreferredUseInbandFec; |
| 89 | |
| 90 | // rtcp-fb messages according to RFC 4585 |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 91 | extern const char kRtcpFbParamNack[]; |
henrika@webrtc.org | aebb1ad | 2014-01-14 10:00:58 +0000 | [diff] [blame] | 92 | extern const char kRtcpFbNackParamPli[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 93 | // rtcp-fb messages according to |
| 94 | // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00 |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 95 | extern const char kRtcpFbParamRemb[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 96 | // ccm submessages according to RFC 5104 |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 97 | extern const char kRtcpFbParamCcm[]; |
| 98 | extern const char kRtcpFbCcmParamFir[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 99 | // Google specific parameters |
sergeyu@chromium.org | 32f485b | 2013-12-05 22:36:21 +0000 | [diff] [blame] | 100 | extern const char kCodecParamMaxBitrate[]; |
| 101 | extern const char kCodecParamMinBitrate[]; |
| 102 | extern const char kCodecParamMaxQuantization[]; |
| 103 | extern const char kCodecParamPort[]; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 104 | |
| 105 | // We put the data codec names here so callers of |
| 106 | // DataEngine::CreateChannel don't have to import rtpdataengine.h or |
| 107 | // sctpdataengine.h to get the codec names they want to pass in. |
| 108 | extern const int kGoogleRtpDataCodecId; |
| 109 | extern const char kGoogleRtpDataCodecName[]; |
| 110 | |
| 111 | // TODO(pthatcher): Find an id that won't conflict with anything. On |
| 112 | // the other hand, it really shouldn't matter since the id won't be |
| 113 | // used on the wire. |
| 114 | extern const int kGoogleSctpDataCodecId; |
| 115 | extern const char kGoogleSctpDataCodecName[]; |
| 116 | |
| 117 | extern const char kComfortNoiseCodecName[]; |
| 118 | |
henrike@webrtc.org | 79047f9 | 2014-03-06 23:46:59 +0000 | [diff] [blame^] | 119 | // Extension header for audio levels, as defined in |
| 120 | // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03 |
| 121 | extern const int kRtpAudioLevelHeaderExtensionDefaultId; |
| 122 | extern const char kRtpAudioLevelHeaderExtension[]; |
| 123 | |
| 124 | // Extension header for RTP timestamp offset, see RFC 5450 for details: |
| 125 | // http://tools.ietf.org/html/rfc5450 |
| 126 | extern const int kRtpTimestampOffsetHeaderExtensionDefaultId; |
| 127 | extern const char kRtpTimestampOffsetHeaderExtension[]; |
| 128 | |
henrike@webrtc.org | d43aa9d | 2014-02-21 23:43:24 +0000 | [diff] [blame] | 129 | // Extension header for absolute send time, see url for details: |
| 130 | // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time |
henrike@webrtc.org | 79047f9 | 2014-03-06 23:46:59 +0000 | [diff] [blame^] | 131 | extern const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId; |
| 132 | extern const char kRtpAbsoluteSenderTimeHeaderExtension[]; |
henrike@webrtc.org | d43aa9d | 2014-02-21 23:43:24 +0000 | [diff] [blame] | 133 | |
henrike@webrtc.org | 704bf9e | 2014-02-27 17:52:04 +0000 | [diff] [blame] | 134 | extern const int kNumDefaultUnsignalledVideoRecvStreams; |
henrike@webrtc.org | 28e2075 | 2013-07-10 00:45:36 +0000 | [diff] [blame] | 135 | } // namespace cricket |
| 136 | |
| 137 | #endif // TALK_MEDIA_BASE_CONSTANTS_H_ |
henrike@webrtc.org | 704bf9e | 2014-02-27 17:52:04 +0000 | [diff] [blame] | 138 | |