blob: 0f940f40fb3eb3c8d4578bbe60c2f678386d29cf [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
Steve Anton10542f22019-01-11 09:11:00 -080011#ifndef MEDIA_BASE_MEDIA_CONSTANTS_H_
12#define MEDIA_BASE_MEDIA_CONSTANTS_H_
henrike@webrtc.org28e20752013-07-10 00:45:36 +000013
Yves Gerey3e707812018-11-28 16:47:49 +010014#include <stddef.h>
henrike@webrtc.org28e20752013-07-10 00:45:36 +000015
Mirko Bonadeid65d1792018-10-17 16:50:07 +020016#include "rtc_base/system/rtc_export.h"
17
henrike@webrtc.org28e20752013-07-10 00:45:36 +000018// This file contains constants related to media.
19
20namespace cricket {
21
22extern const int kVideoCodecClockrate;
23extern const int kDataCodecClockrate;
24extern const int kDataMaxBandwidth; // bps
25
26// Default CPU thresholds.
27extern const float kHighSystemCpuThreshold;
28extern const float kLowSystemCpuThreshold;
29extern const float kProcessCpuThreshold;
30
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000031extern const char kRtxCodecName[];
pbos@webrtc.orgb5a22b12014-05-13 11:07:01 +000032extern const char kRedCodecName[];
33extern const char kUlpfecCodecName[];
brandtr87d7d772016-11-07 03:03:41 -080034extern const char kFlexfecCodecName[];
Emircan Uysalerd7ae3c32018-01-25 13:01:09 -080035extern const char kMultiplexCodecName[];
brandtr87d7d772016-11-07 03:03:41 -080036
37extern const char kFlexfecFmtpRepairWindow[];
pbos@webrtc.orgb5a22b12014-05-13 11:07:01 +000038
henrike@webrtc.org28e20752013-07-10 00:45:36 +000039// Codec parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000040extern const char kCodecParamAssociatedPayloadType[];
Emircan Uysaler0a375472017-12-11 12:21:02 +053041extern const char kCodecParamAssociatedCodecName[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000042
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000043extern const char kOpusCodecName[];
Brave Yao5225dd82015-03-26 07:39:19 +080044extern const char kIsacCodecName[];
45extern const char kL16CodecName[];
46extern const char kG722CodecName[];
47extern const char kIlbcCodecName[];
48extern const char kPcmuCodecName[];
49extern const char kPcmaCodecName[];
50extern const char kCnCodecName[];
51extern const char kDtmfCodecName[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000052
53// Attribute parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000054extern const char kCodecParamPTime[];
55extern const char kCodecParamMaxPTime[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000056// fmtp parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000057extern const char kCodecParamMinPTime[];
58extern const char kCodecParamSPropStereo[];
59extern const char kCodecParamStereo[];
60extern const char kCodecParamUseInbandFec[];
Minyue Li7100dcd2015-03-27 05:05:59 +010061extern const char kCodecParamUseDtx[];
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000062extern const char kCodecParamMaxAverageBitrate[];
buildbot@webrtc.org5d639b32014-09-10 07:57:12 +000063extern const char kCodecParamMaxPlaybackRate[];
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000064extern const char kCodecParamSctpProtocol[];
65extern const char kCodecParamSctpStreams[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000066
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000067extern const char kParamValueTrue[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000068// Parameters are stored as parameter/value pairs. For parameters who do not
69// have a value, |kParamValueEmpty| should be used as value.
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000070extern const char kParamValueEmpty[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000071
72// opus parameters.
73// Default value for maxptime according to
74// http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
75extern const int kOpusDefaultMaxPTime;
76extern const int kOpusDefaultPTime;
77extern const int kOpusDefaultMinPTime;
78extern const int kOpusDefaultSPropStereo;
79extern const int kOpusDefaultStereo;
80extern const int kOpusDefaultUseInbandFec;
Minyue Li7100dcd2015-03-27 05:05:59 +010081extern const int kOpusDefaultUseDtx;
buildbot@webrtc.org5d639b32014-09-10 07:57:12 +000082extern const int kOpusDefaultMaxPlaybackRate;
83
henrike@webrtc.org28e20752013-07-10 00:45:36 +000084// Prefered values in this code base. Note that they may differ from the default
85// values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
86// Only frames larger or equal to 10 ms are currently supported in this code
87// base.
88extern const int kPreferredMaxPTime;
89extern const int kPreferredMinPTime;
90extern const int kPreferredSPropStereo;
91extern const int kPreferredStereo;
92extern const int kPreferredUseInbandFec;
93
94// rtcp-fb messages according to RFC 4585
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000095extern const char kRtcpFbParamNack[];
henrika@webrtc.orgaebb1ad2014-01-14 10:00:58 +000096extern const char kRtcpFbNackParamPli[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +000097// rtcp-fb messages according to
98// http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +000099extern const char kRtcpFbParamRemb[];
stefan43edf0f2015-11-20 18:05:48 -0800100// rtcp-fb messages according to
101// https://tools.ietf.org/html/draft-holmer-rmcat-transport-wide-cc-extensions-01
102extern const char kRtcpFbParamTransportCc[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000103// ccm submessages according to RFC 5104
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000104extern const char kRtcpFbParamCcm[];
105extern const char kRtcpFbCcmParamFir[];
Ilya Nikolaevskiy634a7772018-04-04 16:33:49 +0200106// Receiver reference time report
107// https://tools.ietf.org/html/rfc3611 section 4.4
108extern const char kRtcpFbParamRrtr[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000109// Google specific parameters
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000110extern const char kCodecParamMaxBitrate[];
111extern const char kCodecParamMinBitrate[];
buildbot@webrtc.orged97bb02014-05-07 11:15:20 +0000112extern const char kCodecParamStartBitrate[];
sergeyu@chromium.org32f485b2013-12-05 22:36:21 +0000113extern const char kCodecParamMaxQuantization[];
114extern const char kCodecParamPort[];
Harald Alvestrand48cce4d2019-04-11 10:41:24 +0200115extern const char kCodecParamMaxMessageSize[];
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000116
deadbeef953c2ce2017-01-09 14:53:41 -0800117// We put the data codec names here so callers of DataEngine::CreateChannel
118// don't have to import rtpdataengine.h to get the codec names they want to
119// pass in.
solenberg9fa49752016-10-08 13:02:44 -0700120extern const int kGoogleRtpDataCodecPlType;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000121extern const char kGoogleRtpDataCodecName[];
122
123// TODO(pthatcher): Find an id that won't conflict with anything. On
124// the other hand, it really shouldn't matter since the id won't be
125// used on the wire.
solenberg9fa49752016-10-08 13:02:44 -0700126extern const int kGoogleSctpDataCodecPlType;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000127extern const char kGoogleSctpDataCodecName[];
128
129extern const char kComfortNoiseCodecName[];
130
Mirko Bonadei66e76792019-04-02 11:33:59 +0200131RTC_EXPORT extern const char kVp8CodecName[];
132RTC_EXPORT extern const char kVp9CodecName[];
Mirko Bonadeid65d1792018-10-17 16:50:07 +0200133RTC_EXPORT extern const char kH264CodecName[];
Shao Changbine62202f2015-04-21 20:24:50 +0800134
htaa6b99442016-04-12 10:29:17 -0700135// RFC 6184 RTP Payload Format for H.264 video
Mirko Bonadeid65d1792018-10-17 16:50:07 +0200136RTC_EXPORT extern const char kH264FmtpProfileLevelId[];
137RTC_EXPORT extern const char kH264FmtpLevelAsymmetryAllowed[];
138RTC_EXPORT extern const char kH264FmtpPacketizationMode[];
magjed5dfac562016-11-25 03:56:37 -0800139extern const char kH264FmtpSpropParameterSets[];
htaa6b99442016-04-12 10:29:17 -0700140extern const char kH264ProfileLevelConstrainedBaseline[];
141
Shao Changbine62202f2015-04-21 20:24:50 +0800142extern const int kDefaultVideoMaxFramerate;
Sergey Silkinf18072e2018-03-14 10:35:35 +0100143
144extern const size_t kConferenceMaxNumSpatialLayers;
145extern const size_t kConferenceMaxNumTemporalLayers;
146extern const size_t kConferenceDefaultNumTemporalLayers;
henrike@webrtc.org28e20752013-07-10 00:45:36 +0000147} // namespace cricket
148
Steve Anton10542f22019-01-11 09:11:00 -0800149#endif // MEDIA_BASE_MEDIA_CONSTANTS_H_