• 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 
48 // Codec parameters
49 extern const int kWildcardPayloadType;
50 extern const char kCodecParamAssociatedPayloadType[];
51 
52 extern const char kOpusCodecName[];
53 
54 // Attribute parameters
55 extern const char kCodecParamPTime[];
56 extern const char kCodecParamMaxPTime[];
57 // fmtp parameters
58 extern const char kCodecParamMinPTime[];
59 extern const char kCodecParamSPropStereo[];
60 extern const char kCodecParamStereo[];
61 extern const char kCodecParamUseInbandFec[];
62 extern const char kCodecParamMaxAverageBitrate[];
63 extern const char kCodecParamSctpProtocol[];
64 extern const char kCodecParamSctpStreams[];
65 
66 extern const char kParamValueTrue[];
67 // Parameters are stored as parameter/value pairs. For parameters who do not
68 // have a value, |kParamValueEmpty| should be used as value.
69 extern const char kParamValueEmpty[];
70 
71 // opus parameters.
72 // Default value for maxptime according to
73 // http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
74 extern const int kOpusDefaultMaxPTime;
75 extern const int kOpusDefaultPTime;
76 extern const int kOpusDefaultMinPTime;
77 extern const int kOpusDefaultSPropStereo;
78 extern const int kOpusDefaultStereo;
79 extern const int kOpusDefaultUseInbandFec;
80 // Prefered values in this code base. Note that they may differ from the default
81 // values in http://tools.ietf.org/html/draft-spittka-payload-rtp-opus-03
82 // Only frames larger or equal to 10 ms are currently supported in this code
83 // base.
84 extern const int kPreferredMaxPTime;
85 extern const int kPreferredMinPTime;
86 extern const int kPreferredSPropStereo;
87 extern const int kPreferredStereo;
88 extern const int kPreferredUseInbandFec;
89 
90 // rtcp-fb messages according to RFC 4585
91 extern const char kRtcpFbParamNack[];
92 // rtcp-fb messages according to
93 // http://tools.ietf.org/html/draft-alvestrand-rmcat-remb-00
94 extern const char kRtcpFbParamRemb[];
95 // ccm submessages according to RFC 5104
96 extern const char kRtcpFbParamCcm[];
97 extern const char kRtcpFbCcmParamFir[];
98 // Google specific parameters
99 extern const char kCodecParamMaxBitrate[];
100 extern const char kCodecParamMinBitrate[];
101 extern const char kCodecParamMaxQuantization[];
102 extern const char kCodecParamPort[];
103 
104 // We put the data codec names here so callers of
105 // DataEngine::CreateChannel don't have to import rtpdataengine.h or
106 // sctpdataengine.h to get the codec names they want to pass in.
107 extern const int kGoogleRtpDataCodecId;
108 extern const char kGoogleRtpDataCodecName[];
109 
110 // TODO(pthatcher): Find an id that won't conflict with anything.  On
111 // the other hand, it really shouldn't matter since the id won't be
112 // used on the wire.
113 extern const int kGoogleSctpDataCodecId;
114 extern const char kGoogleSctpDataCodecName[];
115 
116 extern const char kComfortNoiseCodecName[];
117 
118 }  // namespace cricket
119 
120 #endif  // TALK_MEDIA_BASE_CONSTANTS_H_
121