Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(493)

Side by Side Diff: webrtc/common_types.cc

Issue 3009583002: Remove deprecated CodecType methods. (Closed)
Patch Set: Created 3 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « webrtc/common_types.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 return kVideoCodecH264; 161 return kVideoCodecH264;
162 if (CodecNamesEq(name.c_str(), kPayloadNameI420)) 162 if (CodecNamesEq(name.c_str(), kPayloadNameI420))
163 return kVideoCodecI420; 163 return kVideoCodecI420;
164 if (CodecNamesEq(name.c_str(), kPayloadNameRED)) 164 if (CodecNamesEq(name.c_str(), kPayloadNameRED))
165 return kVideoCodecRED; 165 return kVideoCodecRED;
166 if (CodecNamesEq(name.c_str(), kPayloadNameULPFEC)) 166 if (CodecNamesEq(name.c_str(), kPayloadNameULPFEC))
167 return kVideoCodecULPFEC; 167 return kVideoCodecULPFEC;
168 return kVideoCodecGeneric; 168 return kVideoCodecGeneric;
169 } 169 }
170 170
171 // TODO(kthelgason): Remove these methods once upstream projects
172 // have been updated.
173 rtc::Optional<const char*> CodecTypeToPayloadName(VideoCodecType type) {
174 return rtc::Optional<const char*>(CodecTypeToPayloadString(type));
175 }
176
177 rtc::Optional<VideoCodecType> PayloadNameToCodecType(const std::string& name) {
178 return rtc::Optional<VideoCodecType>(PayloadStringToCodecType(name));
179 }
180
181 const uint32_t BitrateAllocation::kMaxBitrateBps = 171 const uint32_t BitrateAllocation::kMaxBitrateBps =
182 std::numeric_limits<uint32_t>::max(); 172 std::numeric_limits<uint32_t>::max();
183 173
184 BitrateAllocation::BitrateAllocation() : sum_(0), bitrates_{} {} 174 BitrateAllocation::BitrateAllocation() : sum_(0), bitrates_{} {}
185 175
186 bool BitrateAllocation::SetBitrate(size_t spatial_index, 176 bool BitrateAllocation::SetBitrate(size_t spatial_index,
187 size_t temporal_index, 177 size_t temporal_index,
188 uint32_t bitrate_bps) { 178 uint32_t bitrate_bps) {
189 RTC_CHECK_LT(spatial_index, kMaxSpatialLayers); 179 RTC_CHECK_LT(spatial_index, kMaxSpatialLayers);
190 RTC_CHECK_LT(temporal_index, kMaxTemporalStreams); 180 RTC_CHECK_LT(temporal_index, kMaxTemporalStreams);
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
259 oss << " ]"; 249 oss << " ]";
260 return oss.str(); 250 return oss.str();
261 } 251 }
262 252
263 std::ostream& BitrateAllocation::operator<<(std::ostream& os) const { 253 std::ostream& BitrateAllocation::operator<<(std::ostream& os) const {
264 os << ToString(); 254 os << ToString();
265 return os; 255 return os;
266 } 256 }
267 257
268 } // namespace webrtc 258 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/common_types.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698