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

Side by Side Diff: webrtc/video/video_send_stream.cc

Issue 2782273002: Fixing some case-sensitive codec name comparisons. (Closed)
Patch Set: Created 3 years, 8 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
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2013 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 #include "webrtc/video/video_send_stream.h" 10 #include "webrtc/video/video_send_stream.h"
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 ss << "max_ext_seq: " << rtcp_stats.extended_max_sequence_number << ", "; 256 ss << "max_ext_seq: " << rtcp_stats.extended_max_sequence_number << ", ";
257 ss << "nack: " << rtcp_packet_type_counts.nack_packets << ", "; 257 ss << "nack: " << rtcp_packet_type_counts.nack_packets << ", ";
258 ss << "fir: " << rtcp_packet_type_counts.fir_packets << ", "; 258 ss << "fir: " << rtcp_packet_type_counts.fir_packets << ", ";
259 ss << "pli: " << rtcp_packet_type_counts.pli_packets; 259 ss << "pli: " << rtcp_packet_type_counts.pli_packets;
260 return ss.str(); 260 return ss.str();
261 } 261 }
262 262
263 namespace { 263 namespace {
264 264
265 bool PayloadTypeSupportsSkippingFecPackets(const std::string& payload_name) { 265 bool PayloadTypeSupportsSkippingFecPackets(const std::string& payload_name) {
266 if (payload_name == "VP8" || payload_name == "VP9") 266 rtc::Optional<VideoCodecType> codecType =
267 PayloadNameToCodecType(payload_name);
268 if (codecType &&
269 (*codecType == kVideoCodecVP8 || *codecType == kVideoCodecVP9)) {
267 return true; 270 return true;
268 RTC_DCHECK(payload_name == "H264" || payload_name == "FAKE") 271 }
272 RTC_DCHECK((codecType && *codecType == kVideoCodecH264) ||
273 payload_name == "FAKE")
269 << "unknown payload_name " << payload_name; 274 << "unknown payload_name " << payload_name;
270 return false; 275 return false;
271 } 276 }
272 277
273 int CalculateMaxPadBitrateBps(std::vector<VideoStream> streams, 278 int CalculateMaxPadBitrateBps(std::vector<VideoStream> streams,
274 int min_transmit_bitrate_bps, 279 int min_transmit_bitrate_bps,
275 bool pad_to_min_bitrate) { 280 bool pad_to_min_bitrate) {
276 int pad_up_to_bitrate_bps = 0; 281 int pad_up_to_bitrate_bps = 0;
277 // Calculate max padding bitrate for a multi layer codec. 282 // Calculate max padding bitrate for a multi layer codec.
278 if (streams.size() > 1) { 283 if (streams.size() > 1) {
(...skipping 1054 matching lines...) Expand 10 before | Expand all | Expand 10 after
1333 std::min(config_->rtp.max_packet_size, 1338 std::min(config_->rtp.max_packet_size,
1334 kPathMTU - transport_overhead_bytes_per_packet_); 1339 kPathMTU - transport_overhead_bytes_per_packet_);
1335 1340
1336 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) { 1341 for (RtpRtcp* rtp_rtcp : rtp_rtcp_modules_) {
1337 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size); 1342 rtp_rtcp->SetMaxRtpPacketSize(rtp_packet_size);
1338 } 1343 }
1339 } 1344 }
1340 1345
1341 } // namespace internal 1346 } // namespace internal
1342 } // namespace webrtc 1347 } // namespace webrtc
OLDNEW
« webrtc/video/video_receive_stream.cc ('K') | « webrtc/video/video_receive_stream.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698