blob: 84216fb534ece2534de08302add3e506e0cbf3f1 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
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
35namespace cricket {
36
37extern const int kVideoCodecClockrate;
38extern const int kDataCodecClockrate;
39extern const int kDataMaxBandwidth; // bps
40
41// Default CPU thresholds.
42extern const float kHighSystemCpuThreshold;
43extern const float kLowSystemCpuThreshold;
44extern const float kProcessCpuThreshold;
45
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000046extern const char kRtxCodecName[];
pbos@webrtc.orgb5a22b12014-05-13 11:07:01 +000047extern const char kRedCodecName[];
48extern const char kUlpfecCodecName[];
49
henrike@webrtc.org28e20752013-07-10 00:45:36 +000050// Codec parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000051extern const char kCodecParamAssociatedPayloadType[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000052
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000053extern const char kOpusCodecName[];
Brave Yao5225dd82015-03-26 07:39:19 +080054extern const char kIsacCodecName[];
55extern const char kL16CodecName[];
56extern const char kG722CodecName[];
57extern const char kIlbcCodecName[];
58extern const char kPcmuCodecName[];
59extern const char kPcmaCodecName[];
60extern const char kCnCodecName[];
61extern const char kDtmfCodecName[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000062
63// Attribute parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000064extern const char kCodecParamPTime[];
65extern const char kCodecParamMaxPTime[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000066// fmtp parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000067extern const char kCodecParamMinPTime[];
68extern const char kCodecParamSPropStereo[];
69extern const char kCodecParamStereo[];
70extern const char kCodecParamUseInbandFec[];
Minyue Li7100dcd2015-03-27 05:05:59 +010071extern const char kCodecParamUseDtx[];
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000072extern const char kCodecParamMaxAverageBitrate[];
buildbot@webrtc.org5d639b32014-09-10 07:57:12 +000073extern const char kCodecParamMaxPlaybackRate[];
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000074extern const char kCodecParamSctpProtocol[];
75extern const char kCodecParamSctpStreams[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000076
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000077extern const char kParamValueTrue[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000078// Parameters are stored as parameter/value pairs. For parameters who do not
79// have a value, |kParamValueEmpty| should be used as value.
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000080extern const char kParamValueEmpty[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000081
82// opus parameters.
83// Default value for maxptime according to
84// http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
85extern const int kOpusDefaultMaxPTime;
86extern const int kOpusDefaultPTime;
87extern const int kOpusDefaultMinPTime;
88extern const int kOpusDefaultSPropStereo;
89extern const int kOpusDefaultStereo;
90extern const int kOpusDefaultUseInbandFec;
Minyue Li7100dcd2015-03-27 05:05:59 +010091extern const int kOpusDefaultUseDtx;
buildbot@webrtc.org5d639b32014-09-10 07:57:12 +000092extern const int kOpusDefaultMaxPlaybackRate;
93
henrike@webrtc.org28e20752013-07-10 00:45:36 +000094// 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.
98extern const int kPreferredMaxPTime;
99extern const int kPreferredMinPTime;
100extern const int kPreferredSPropStereo;
101extern const int kPreferredStereo;
102extern const int kPreferredUseInbandFec;
103
104// rtcp-fb messages according to RFC 4585
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000105extern const char kRtcpFbParamNack[];
henrika@webrtc.orgaebb1ad2014-01-14 10:00:58 +0000106extern const char kRtcpFbNackParamPli[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000107// rtcp-fb messages according to
108// http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000109extern const char kRtcpFbParamRemb[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000110// ccm submessages according to RFC 5104
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000111extern const char kRtcpFbParamCcm[];
112extern const char kRtcpFbCcmParamFir[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000113// Google specific parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000114extern const char kCodecParamMaxBitrate[];
115extern const char kCodecParamMinBitrate[];
buildbot@webrtc.orged97bb02014-05-07 11:15:20 +0000116extern const char kCodecParamStartBitrate[];
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000117extern const char kCodecParamMaxQuantization[];
118extern const char kCodecParamPort[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000119
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.
123extern const int kGoogleRtpDataCodecId;
124extern 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.
129extern const int kGoogleSctpDataCodecId;
130extern const char kGoogleSctpDataCodecName[];
131
132extern const char kComfortNoiseCodecName[];
133
guoweis@webrtc.orgfdd10572015-03-12 20:50:57 +0000134// Header extension for audio levels, as defined in
henrike@webrtc.org79047f92014-03-06 23:46:59 +0000135// http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03
136extern const int kRtpAudioLevelHeaderExtensionDefaultId;
137extern const char kRtpAudioLevelHeaderExtension[];
138
guoweis@webrtc.orgfdd10572015-03-12 20:50:57 +0000139// Header extension for RTP timestamp offset, see RFC 5450 for details:
henrike@webrtc.org79047f92014-03-06 23:46:59 +0000140// http://tools.ietf.org/html/rfc5450
141extern const int kRtpTimestampOffsetHeaderExtensionDefaultId;
142extern const char kRtpTimestampOffsetHeaderExtension[];
143
guoweis@webrtc.orgfdd10572015-03-12 20:50:57 +0000144// Header extension for absolute send time, see url for details:
henrike@webrtc.orgd43aa9d2014-02-21 23:43:24 +0000145// http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
henrike@webrtc.org79047f92014-03-06 23:46:59 +0000146extern const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId;
147extern const char kRtpAbsoluteSenderTimeHeaderExtension[];
henrike@webrtc.orgd43aa9d2014-02-21 23:43:24 +0000148
guoweis@webrtc.orgfdd10572015-03-12 20:50:57 +0000149// 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
152extern const int kRtpVideoRotationHeaderExtensionDefaultId;
153extern const char kRtpVideoRotationHeaderExtension[];
154// We don't support 6 bit CVO. Added here for testing purpose.
155extern const char kRtpVideoRotation6BitsHeaderExtensionForTesting[];
156
henrike@webrtc.org704bf9e2014-02-27 17:52:04 +0000157extern const int kNumDefaultUnsignalledVideoRecvStreams;
Shao Changbine62202f2015-04-21 20:24:50 +0800158
159extern const char kVp8CodecName[];
160extern const char kVp9CodecName[];
161
162extern const int kDefaultVp8PlType;
163extern const int kDefaultVp9PlType;
164extern const int kDefaultRedPlType;
165extern const int kDefaultUlpfecType;
166extern const int kDefaultRtxVp8PlType;
167
168extern const int kDefaultVideoMaxWidth;
169extern const int kDefaultVideoMaxHeight;
170extern const int kDefaultVideoMaxFramerate;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000171} // namespace cricket
172
173#endif // TALK_MEDIA_BASE_CONSTANTS_H_
henrike@webrtc.org704bf9e2014-02-27 17:52:04 +0000174