blob: 640c67e8938556f106b1092799445e8f702a6a11 [file] [log] [blame]
henrike@webrtc.org28e20752013-07-10 00:45:36 +00001/*
kjellander1afca732016-02-07 20:46:45 -08002 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00003 *
kjellander1afca732016-02-07 20:46:45 -08004 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
henrike@webrtc.org28e20752013-07-10 00:45:36 +00009 */
10
kjellanderf4752772016-03-02 05:42:30 -080011#include "webrtc/media/base/mediaconstants.h"
henrike@webrtc.org28e20752013-07-10 00:45:36 +000012
13#include <string>
14
15namespace cricket {
16
17const int kVideoCodecClockrate = 90000;
18const int kDataCodecClockrate = 90000;
19const int kDataMaxBandwidth = 30720; // bps
20
21const float kHighSystemCpuThreshold = 0.85f;
22const float kLowSystemCpuThreshold = 0.65f;
23const float kProcessCpuThreshold = 0.10f;
24
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000025const char kRtxCodecName[] = "rtx";
pbos@webrtc.orgb5a22b12014-05-13 11:07:01 +000026const char kRedCodecName[] = "red";
27const char kUlpfecCodecName[] = "ulpfec";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000028
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000029const char kCodecParamAssociatedPayloadType[] = "apt";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000030
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000031const char kOpusCodecName[] = "opus";
Brave Yao5225dd82015-03-26 07:39:19 +080032const char kIsacCodecName[] = "isac";
33const char kL16CodecName[] = "l16";
34const char kG722CodecName[] = "g722";
35const char kIlbcCodecName[] = "ilbc";
36const char kPcmuCodecName[] = "pcmu";
37const char kPcmaCodecName[] = "pcma";
38const char kCnCodecName[] = "cn";
39const char kDtmfCodecName[] = "telephone-event";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000040
henrike@webrtc.org1e09a712013-07-26 19:17:59 +000041// draft-spittka-payload-rtp-opus-03.txt
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000042const char kCodecParamPTime[] = "ptime";
43const char kCodecParamMaxPTime[] = "maxptime";
44const char kCodecParamMinPTime[] = "minptime";
45const char kCodecParamSPropStereo[] = "sprop-stereo";
46const char kCodecParamStereo[] = "stereo";
47const char kCodecParamUseInbandFec[] = "useinbandfec";
Minyue Li7100dcd2015-03-27 05:05:59 +010048const char kCodecParamUseDtx[] = "usedtx";
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000049const char kCodecParamMaxAverageBitrate[] = "maxaveragebitrate";
buildbot@webrtc.org5d639b32014-09-10 07:57:12 +000050const char kCodecParamMaxPlaybackRate[] = "maxplaybackrate";
henrike@webrtc.org1e09a712013-07-26 19:17:59 +000051
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000052const char kCodecParamSctpProtocol[] = "protocol";
53const char kCodecParamSctpStreams[] = "streams";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000054
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000055const char kParamValueTrue[] = "1";
56const char kParamValueEmpty[] = "";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000057
58const int kOpusDefaultMaxPTime = 120;
59const int kOpusDefaultPTime = 20;
60const int kOpusDefaultMinPTime = 3;
61const int kOpusDefaultSPropStereo = 0;
62const int kOpusDefaultStereo = 0;
63const int kOpusDefaultUseInbandFec = 0;
Minyue Li7100dcd2015-03-27 05:05:59 +010064const int kOpusDefaultUseDtx = 0;
buildbot@webrtc.org5d639b32014-09-10 07:57:12 +000065const int kOpusDefaultMaxPlaybackRate = 48000;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000066
minyuelb031a2e2016-05-10 15:35:21 +020067const int kPreferredMaxPTime = 120;
henrike@webrtc.org28e20752013-07-10 00:45:36 +000068const int kPreferredMinPTime = 10;
69const int kPreferredSPropStereo = 0;
70const int kPreferredStereo = 0;
71const int kPreferredUseInbandFec = 0;
72
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000073const char kRtcpFbParamNack[] = "nack";
henrika@webrtc.orgaebb1ad2014-01-14 10:00:58 +000074const char kRtcpFbNackParamPli[] = "pli";
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000075const char kRtcpFbParamRemb[] = "goog-remb";
stefan43edf0f2015-11-20 18:05:48 -080076const char kRtcpFbParamTransportCc[] = "transport-cc";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000077
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000078const char kRtcpFbParamCcm[] = "ccm";
79const char kRtcpFbCcmParamFir[] = "fir";
80const char kCodecParamMaxBitrate[] = "x-google-max-bitrate";
81const char kCodecParamMinBitrate[] = "x-google-min-bitrate";
buildbot@webrtc.orged97bb02014-05-07 11:15:20 +000082const char kCodecParamStartBitrate[] = "x-google-start-bitrate";
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000083const char kCodecParamMaxQuantization[] = "x-google-max-quantization";
84const char kCodecParamPort[] = "x-google-port";
henrike@webrtc.org28e20752013-07-10 00:45:36 +000085
86const int kGoogleRtpDataCodecId = 101;
87const char kGoogleRtpDataCodecName[] = "google-data";
88
89const int kGoogleSctpDataCodecId = 108;
90const char kGoogleSctpDataCodecName[] = "google-sctp-data";
91
92const char kComfortNoiseCodecName[] = "CN";
93
Shao Changbine62202f2015-04-21 20:24:50 +080094const char kVp8CodecName[] = "VP8";
95const char kVp9CodecName[] = "VP9";
Zeke Chin71f6f442015-06-29 14:34:58 -070096const char kH264CodecName[] = "H264";
henrike@webrtc.org704bf9e2014-02-27 17:52:04 +000097
htaa6b99442016-04-12 10:29:17 -070098// RFC 6184 RTP Payload Format for H.264 video
99const char kH264FmtpProfileLevelId[] = "profile-level-id";
magjed68979ab2016-10-06 02:15:49 -0700100// If no profile-level-id is present as a parameter, the Baseline Profile
101// without additional constraints at Level 1 is implied.
102const char kH264FmtpDefaultProfileLevelId[] = "42000a";
htaa6b99442016-04-12 10:29:17 -0700103const char kH264FmtpLevelAsymmetryAllowed[] = "level-asymmetry-allowed";
104const char kH264FmtpPacketizationMode[] = "packetization-mode";
105const char kH264ProfileLevelConstrainedBaseline[] = "42e01f";
106
Shao Changbine62202f2015-04-21 20:24:50 +0800107const int kDefaultVp8PlType = 100;
108const int kDefaultVp9PlType = 101;
Zeke Chin71f6f442015-06-29 14:34:58 -0700109const int kDefaultH264PlType = 107;
Shao Changbine62202f2015-04-21 20:24:50 +0800110const int kDefaultRedPlType = 116;
111const int kDefaultUlpfecType = 117;
112const int kDefaultRtxVp8PlType = 96;
Stefan Holmer10880012016-02-03 13:29:59 +0100113const int kDefaultRtxVp9PlType = 97;
114const int kDefaultRtxRedPlType = 98;
stefan1e016602016-02-11 04:13:54 -0800115const int kDefaultRtxH264PlType = 99;
Shao Changbine62202f2015-04-21 20:24:50 +0800116
117const int kDefaultVideoMaxWidth = 640;
118const int kDefaultVideoMaxHeight = 400;
119const int kDefaultVideoMaxFramerate = 30;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000120} // namespace cricket