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/mediaconstants.h"
12 
13 #include <string>
14 
15 namespace cricket {
16 
17 const int kVideoCodecClockrate = 90000;
18 const int kDataCodecClockrate = 90000;
19 const int kDataMaxBandwidth = 30720;  // bps
20 
21 const float kHighSystemCpuThreshold = 0.85f;
22 const float kLowSystemCpuThreshold = 0.65f;
23 const float kProcessCpuThreshold = 0.10f;
24 
25 const char kRtxCodecName[] = "rtx";
26 const char kRedCodecName[] = "red";
27 const char kUlpfecCodecName[] = "ulpfec";
28 
29 // TODO(brandtr): Change this to 'flexfec' when we are confident that the
30 // header format is not changing anymore.
31 const char kFlexfecCodecName[] = "flexfec-03";
32 
33 // draft-ietf-payload-flexible-fec-scheme-02.txt
34 const char kFlexfecFmtpRepairWindow[] = "repair-window";
35 
36 const char kCodecParamAssociatedPayloadType[] = "apt";
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 kRtcpFbParamNack[] = "nack";
81 const char kRtcpFbNackParamPli[] = "pli";
82 const char kRtcpFbParamRemb[] = "goog-remb";
83 const char kRtcpFbParamTransportCc[] = "transport-cc";
84 
85 const char kRtcpFbParamCcm[] = "ccm";
86 const char kRtcpFbCcmParamFir[] = "fir";
87 const char kCodecParamMaxBitrate[] = "x-google-max-bitrate";
88 const char kCodecParamMinBitrate[] = "x-google-min-bitrate";
89 const char kCodecParamStartBitrate[] = "x-google-start-bitrate";
90 const char kCodecParamMaxQuantization[] = "x-google-max-quantization";
91 const char kCodecParamPort[] = "x-google-port";
92 
93 const int kGoogleRtpDataCodecPlType = 109;
94 const char kGoogleRtpDataCodecName[] = "google-data";
95 
96 const int kGoogleSctpDataCodecPlType = 108;
97 const char kGoogleSctpDataCodecName[] = "google-sctp-data";
98 
99 const char kComfortNoiseCodecName[] = "CN";
100 
101 const char kVp8CodecName[] = "VP8";
102 const char kVp9CodecName[] = "VP9";
103 const char kH264CodecName[] = "H264";
104 
105 // RFC 6184 RTP Payload Format for H.264 video
106 const char kH264FmtpProfileLevelId[] = "profile-level-id";
107 const char kH264FmtpLevelAsymmetryAllowed[] = "level-asymmetry-allowed";
108 const char kH264FmtpPacketizationMode[] = "packetization-mode";
109 const char kH264FmtpSpropParameterSets[] = "sprop-parameter-sets";
110 const char kH264ProfileLevelConstrainedBaseline[] = "42e01f";
111 
112 const int kDefaultVideoMaxFramerate = 60;
113 }  // namespace cricket
114