• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
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 
35 namespace cricket {
36 
37 extern const int kVideoCodecClockrate;
38 extern const int kDataCodecClockrate;
39 extern const int kDataMaxBandwidth;  // bps
40 
41 // Default CPU thresholds.
42 extern const float kHighSystemCpuThreshold;
43 extern const float kLowSystemCpuThreshold;
44 extern const float kProcessCpuThreshold;
45 
46 extern const char kRtxCodecName[];
47 extern const char kRedCodecName[];
48 extern const char kUlpfecCodecName[];
49 
50 
51 // Codec parameters
52 extern const int kWildcardPayloadType;
53 extern const char kCodecParamAssociatedPayloadType[];
54 
55 extern const char kOpusCodecName[];
56 
57 // Attribute parameters
58 extern const char kCodecParamPTime[];
59 extern const char kCodecParamMaxPTime[];
60 // fmtp parameters
61 extern const char kCodecParamMinPTime[];
62 extern const char kCodecParamSPropStereo[];
63 extern const char kCodecParamStereo[];
64 extern const char kCodecParamUseInbandFec[];
65 extern const char kCodecParamMaxAverageBitrate[];
66 extern const char kCodecParamSctpProtocol[];
67 extern const char kCodecParamSctpStreams[];
68 
69 extern const char kParamValueTrue[];
70 // Parameters are stored as parameter/value pairs. For parameters who do not
71 // have a value, |kParamValueEmpty| should be used as value.
72 extern const char kParamValueEmpty[];
73 
74 // opus parameters.
75 // Default value for maxptime according to
76 // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
77 extern const int kOpusDefaultMaxPTime;
78 extern const int kOpusDefaultPTime;
79 extern const int kOpusDefaultMinPTime;
80 extern const int kOpusDefaultSPropStereo;
81 extern const int kOpusDefaultStereo;
82 extern const int kOpusDefaultUseInbandFec;
83 // Prefered values in this code base. Note that they may differ from the default
84 // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
85 // Only frames larger or equal to 10 ms are currently supported in this code
86 // base.
87 extern const int kPreferredMaxPTime;
88 extern const int kPreferredMinPTime;
89 extern const int kPreferredSPropStereo;
90 extern const int kPreferredStereo;
91 extern const int kPreferredUseInbandFec;
92 
93 // rtcp-fb messages according to RFC 4585
94 extern const char kRtcpFbParamNack[];
95 extern const char kRtcpFbNackParamPli[];
96 // rtcp-fb messages according to
97 // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00
98 extern const char kRtcpFbParamRemb[];
99 // ccm submessages according to RFC 5104
100 extern const char kRtcpFbParamCcm[];
101 extern const char kRtcpFbCcmParamFir[];
102 // Google specific parameters
103 extern const char kCodecParamMaxBitrate[];
104 extern const char kCodecParamMinBitrate[];
105 extern const char kCodecParamStartBitrate[];
106 extern const char kCodecParamMaxQuantization[];
107 extern const char kCodecParamPort[];
108 
109 // We put the data codec names here so callers of
110 // DataEngine::CreateChannel don't have to import rtpdataengine.h or
111 // sctpdataengine.h to get the codec names they want to pass in.
112 extern const int kGoogleRtpDataCodecId;
113 extern const char kGoogleRtpDataCodecName[];
114 
115 // TODO(pthatcher): Find an id that won't conflict with anything.  On
116 // the other hand, it really shouldn't matter since the id won't be
117 // used on the wire.
118 extern const int kGoogleSctpDataCodecId;
119 extern const char kGoogleSctpDataCodecName[];
120 
121 extern const char kComfortNoiseCodecName[];
122 
123 // Extension header for audio levels, as defined in
124 // http://tools.ietf.org/html/draft-ietf-avtext-client-to-mixer-audio-level-03
125 extern const int kRtpAudioLevelHeaderExtensionDefaultId;
126 extern const char kRtpAudioLevelHeaderExtension[];
127 
128 // Extension header for RTP timestamp offset, see RFC 5450 for details:
129 // http://tools.ietf.org/html/rfc5450
130 extern const int kRtpTimestampOffsetHeaderExtensionDefaultId;
131 extern const char kRtpTimestampOffsetHeaderExtension[];
132 
133 // Extension header for absolute send time, see url for details:
134 // http://www.webrtc.org/experiments/rtp-hdrext/abs-send-time
135 extern const int kRtpAbsoluteSenderTimeHeaderExtensionDefaultId;
136 extern const char kRtpAbsoluteSenderTimeHeaderExtension[];
137 
138 extern const int kNumDefaultUnsignalledVideoRecvStreams;
139 }  // namespace cricket
140 
141 #endif  // TALK_MEDIA_BASE_CONSTANTS_H_
142 
143