• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2012 The WebRTC project authors. All Rights Reserved.
3  *
4  *  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.
9  */
10 
11 #include "media/base/media_constants.h"
12 
13 namespace cricket {
14 
15 const int kVideoCodecClockrate = 90000;
16 const int kDataCodecClockrate = 90000;
17 const int kDataMaxBandwidth = 30720;  // bps
18 
19 const float kHighSystemCpuThreshold = 0.85f;
20 const float kLowSystemCpuThreshold = 0.65f;
21 const float kProcessCpuThreshold = 0.10f;
22 
23 const char kRtxCodecName[] = "rtx";
24 const char kRedCodecName[] = "red";
25 const char kUlpfecCodecName[] = "ulpfec";
26 const char kMultiplexCodecName[] = "multiplex";
27 
28 // TODO(brandtr): Change this to 'flexfec' when we are confident that the
29 // header format is not changing anymore.
30 const char kFlexfecCodecName[] = "flexfec-03";
31 
32 // draft-ietf-payload-flexible-fec-scheme-02.txt
33 const char kFlexfecFmtpRepairWindow[] = "repair-window";
34 
35 const char kCodecParamAssociatedPayloadType[] = "apt";
36 const char kCodecParamAssociatedCodecName[] = "acn";
37 
38 const char kOpusCodecName[] = "opus";
39 const char kIsacCodecName[] = "ISAC";
40 const char kL16CodecName[] = "L16";
41 const char kG722CodecName[] = "G722";
42 const char kIlbcCodecName[] = "ILBC";
43 const char kPcmuCodecName[] = "PCMU";
44 const char kPcmaCodecName[] = "PCMA";
45 const char kCnCodecName[] = "CN";
46 const char kDtmfCodecName[] = "telephone-event";
47 
48 // draft-spittka-payload-rtp-opus-03.txt
49 const char kCodecParamPTime[] = "ptime";
50 const char kCodecParamMaxPTime[] = "maxptime";
51 const char kCodecParamMinPTime[] = "minptime";
52 const char kCodecParamSPropStereo[] = "sprop-stereo";
53 const char kCodecParamStereo[] = "stereo";
54 const char kCodecParamUseInbandFec[] = "useinbandfec";
55 const char kCodecParamUseDtx[] = "usedtx";
56 const char kCodecParamMaxAverageBitrate[] = "maxaveragebitrate";
57 const char kCodecParamMaxPlaybackRate[] = "maxplaybackrate";
58 
59 const char kCodecParamSctpProtocol[] = "protocol";
60 const char kCodecParamSctpStreams[] = "streams";
61 
62 const char kParamValueTrue[] = "1";
63 const char kParamValueEmpty[] = "";
64 
65 const int kOpusDefaultMaxPTime = 120;
66 const int kOpusDefaultPTime = 20;
67 const int kOpusDefaultMinPTime = 3;
68 const int kOpusDefaultSPropStereo = 0;
69 const int kOpusDefaultStereo = 0;
70 const int kOpusDefaultUseInbandFec = 0;
71 const int kOpusDefaultUseDtx = 0;
72 const int kOpusDefaultMaxPlaybackRate = 48000;
73 
74 const int kPreferredMaxPTime = 120;
75 const int kPreferredMinPTime = 10;
76 const int kPreferredSPropStereo = 0;
77 const int kPreferredStereo = 0;
78 const int kPreferredUseInbandFec = 0;
79 
80 const char kPacketizationParamRaw[] = "raw";
81 
82 const char kRtcpFbParamLntf[] = "goog-lntf";
83 const char kRtcpFbParamNack[] = "nack";
84 const char kRtcpFbNackParamPli[] = "pli";
85 const char kRtcpFbParamRemb[] = "goog-remb";
86 const char kRtcpFbParamTransportCc[] = "transport-cc";
87 
88 const char kRtcpFbParamCcm[] = "ccm";
89 const char kRtcpFbCcmParamFir[] = "fir";
90 const char kRtcpFbParamRrtr[] = "rrtr";
91 const char kCodecParamMaxBitrate[] = "x-google-max-bitrate";
92 const char kCodecParamMinBitrate[] = "x-google-min-bitrate";
93 const char kCodecParamStartBitrate[] = "x-google-start-bitrate";
94 const char kCodecParamMaxQuantization[] = "x-google-max-quantization";
95 const char kCodecParamPort[] = "x-google-port";
96 const char kCodecParamMaxMessageSize[] = "x-google-max-message-size";
97 
98 const int kGoogleRtpDataCodecPlType = 109;
99 const char kGoogleRtpDataCodecName[] = "google-data";
100 
101 const char kComfortNoiseCodecName[] = "CN";
102 
103 const char kVp8CodecName[] = "VP8";
104 const char kVp9CodecName[] = "VP9";
105 const char kAv1CodecName[] = "AV1X";
106 const char kH264CodecName[] = "H264";
107 const char kHEVCCodecName[] = "H265X";
108 
109 // RFC 6184 RTP Payload Format for H.264 video
110 const char kH264FmtpProfileLevelId[] = "profile-level-id";
111 const char kH264FmtpLevelAsymmetryAllowed[] = "level-asymmetry-allowed";
112 const char kH264FmtpPacketizationMode[] = "packetization-mode";
113 const char kH264FmtpSpropParameterSets[] = "sprop-parameter-sets";
114 const char kH264ProfileLevelConstrainedBaseline[] = "42e01f";
115 const char kH264ProfileLevelConstrainedHigh[] = "640c1f";
116 
117 const int kDefaultVideoMaxFramerate = 60;
118 
119 const size_t kConferenceMaxNumSpatialLayers = 3;
120 const size_t kConferenceMaxNumTemporalLayers = 3;
121 const size_t kConferenceDefaultNumTemporalLayers = 3;
122 }  // namespace cricket
123