OLD | NEW |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2004 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 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 | 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 | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 Codec(); | 74 Codec(); |
75 Codec(const Codec& c); | 75 Codec(const Codec& c); |
76 virtual ~Codec(); | 76 virtual ~Codec(); |
77 | 77 |
78 // Indicates if this codec is compatible with the specified codec. | 78 // Indicates if this codec is compatible with the specified codec. |
79 bool Matches(const Codec& codec) const; | 79 bool Matches(const Codec& codec) const; |
80 | 80 |
81 // Find the parameter for |name| and write the value to |out|. | 81 // Find the parameter for |name| and write the value to |out|. |
82 bool GetParam(const std::string& name, std::string* out) const; | 82 bool GetParam(const std::string& name, std::string* out) const; |
83 bool GetParam(const std::string& name, int* out) const; | 83 bool GetParam(const std::string& name, int* out) const; |
84 // Return the contained value for |name| if available, and |default_value| | |
85 // otherwise. | |
86 std::string GetParam(const std::string& name, | |
87 const std::string& default_value) const; | |
hta-webrtc
2016/09/19 06:38:36
Suggest not having this function. I've had this pa
magjed_webrtc
2016/09/19 12:40:30
Ok, I removed it from the public interface and mad
| |
84 | 88 |
85 void SetParam(const std::string& name, const std::string& value); | 89 void SetParam(const std::string& name, const std::string& value); |
86 void SetParam(const std::string& name, int value); | 90 void SetParam(const std::string& name, int value); |
87 | 91 |
88 // It is safe to input a non-existent parameter. | 92 // It is safe to input a non-existent parameter. |
89 // Returns true if the parameter existed, false if it did not exist. | 93 // Returns true if the parameter existed, false if it did not exist. |
90 bool RemoveParam(const std::string& name); | 94 bool RemoveParam(const std::string& name); |
91 | 95 |
92 bool HasFeedbackParam(const FeedbackParam& param) const; | 96 bool HasFeedbackParam(const FeedbackParam& param) const; |
93 void AddFeedbackParam(const FeedbackParam& param); | 97 void AddFeedbackParam(const FeedbackParam& param); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
148 const std::string& name, | 152 const std::string& name, |
149 int width, | 153 int width, |
150 int height, | 154 int height, |
151 int framerate); | 155 int framerate); |
152 VideoCodec(int id, const std::string& name); | 156 VideoCodec(int id, const std::string& name); |
153 // Creates an empty codec. | 157 // Creates an empty codec. |
154 VideoCodec(); | 158 VideoCodec(); |
155 VideoCodec(const VideoCodec& c); | 159 VideoCodec(const VideoCodec& c); |
156 virtual ~VideoCodec() = default; | 160 virtual ~VideoCodec() = default; |
157 | 161 |
162 // Indicates if this codec is compatible with the specified codec. | |
163 bool Matches(const VideoCodec& codec) const; | |
164 | |
158 std::string ToString() const; | 165 std::string ToString() const; |
159 | 166 |
160 VideoCodec& operator=(const VideoCodec& c); | 167 VideoCodec& operator=(const VideoCodec& c); |
161 | 168 |
162 bool operator==(const VideoCodec& c) const; | 169 bool operator==(const VideoCodec& c) const; |
163 | 170 |
164 bool operator!=(const VideoCodec& c) const { | 171 bool operator!=(const VideoCodec& c) const { |
165 return !(*this == c); | 172 return !(*this == c); |
166 } | 173 } |
167 | 174 |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
209 } | 216 } |
210 | 217 |
211 bool CodecNamesEq(const std::string& name1, const std::string& name2); | 218 bool CodecNamesEq(const std::string& name1, const std::string& name2); |
212 bool HasNack(const Codec& codec); | 219 bool HasNack(const Codec& codec); |
213 bool HasRemb(const Codec& codec); | 220 bool HasRemb(const Codec& codec); |
214 bool HasTransportCc(const Codec& codec); | 221 bool HasTransportCc(const Codec& codec); |
215 | 222 |
216 } // namespace cricket | 223 } // namespace cricket |
217 | 224 |
218 #endif // WEBRTC_MEDIA_BASE_CODEC_H_ | 225 #endif // WEBRTC_MEDIA_BASE_CODEC_H_ |
OLD | NEW |