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

Side by Side Diff: webrtc/modules/rtp_rtcp/source/forward_error_correction.cc

Issue 2534683002: RTC_[D]CHECK_op: Remove superfluous casts (Closed)
Patch Set: test Created 4 years 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) 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 uint8_t protection_factor, 98 uint8_t protection_factor,
99 int num_important_packets, 99 int num_important_packets,
100 bool use_unequal_protection, 100 bool use_unequal_protection,
101 FecMaskType fec_mask_type, 101 FecMaskType fec_mask_type,
102 std::list<Packet*>* fec_packets) { 102 std::list<Packet*>* fec_packets) {
103 const size_t num_media_packets = media_packets.size(); 103 const size_t num_media_packets = media_packets.size();
104 104
105 // Sanity check arguments. 105 // Sanity check arguments.
106 RTC_DCHECK_GT(num_media_packets, 0); 106 RTC_DCHECK_GT(num_media_packets, 0);
107 RTC_DCHECK_GE(num_important_packets, 0); 107 RTC_DCHECK_GE(num_important_packets, 0);
108 RTC_DCHECK_LE(static_cast<size_t>(num_important_packets), num_media_packets); 108 RTC_DCHECK_LE(num_important_packets, num_media_packets);
109 RTC_DCHECK(fec_packets->empty()); 109 RTC_DCHECK(fec_packets->empty());
110 const size_t max_media_packets = fec_header_writer_->MaxMediaPackets(); 110 const size_t max_media_packets = fec_header_writer_->MaxMediaPackets();
111 if (num_media_packets > max_media_packets) { 111 if (num_media_packets > max_media_packets) {
112 LOG(LS_WARNING) << "Can't protect " << num_media_packets 112 LOG(LS_WARNING) << "Can't protect " << num_media_packets
113 << " media packets per frame. Max is " << max_media_packets 113 << " media packets per frame. Max is " << max_media_packets
114 << "."; 114 << ".";
115 return -1; 115 return -1;
116 } 116 }
117 117
118 // Error check the media packets. 118 // Error check the media packets.
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 736
737 size_t FecHeaderWriter::MaxFecPackets() const { 737 size_t FecHeaderWriter::MaxFecPackets() const {
738 return max_fec_packets_; 738 return max_fec_packets_;
739 } 739 }
740 740
741 size_t FecHeaderWriter::MaxPacketOverhead() const { 741 size_t FecHeaderWriter::MaxPacketOverhead() const {
742 return max_packet_overhead_; 742 return max_packet_overhead_;
743 } 743 }
744 744
745 } // namespace webrtc 745 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698