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

Unified Diff: webrtc/modules/rtp_rtcp/source/forward_error_correction.cc

Issue 2267393002: Generalize FEC unit tests and rename GenerateFec. (pt. 3) (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@header_reader_writer-pt2-producer_fec_mini_fixes
Patch Set: Rebase after gyp deprecation. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
diff --git a/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc b/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
index b214f60c061ae802edcfed8e821fd8a9d3405910..a89b71bf94301eaf1a7d36d47bdacf52dec94fa3 100644
--- a/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
+++ b/webrtc/modules/rtp_rtcp/source/forward_error_correction.cc
@@ -94,19 +94,18 @@ ForwardErrorCorrection::~ForwardErrorCorrection() {}
// | |
// +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
//
-// Note that any potential RED headers are added/removed before calling
-// GenerateFec() or DecodeFec().
-int ForwardErrorCorrection::GenerateFec(const PacketList& media_packets,
- uint8_t protection_factor,
- int num_important_packets,
- bool use_unequal_protection,
- FecMaskType fec_mask_type,
- std::list<Packet*>* fec_packets) {
- const uint16_t num_media_packets = media_packets.size();
+int ForwardErrorCorrection::EncodeFec(const PacketList& media_packets,
+ uint8_t protection_factor,
+ int num_important_packets,
+ bool use_unequal_protection,
+ FecMaskType fec_mask_type,
+ std::list<Packet*>* fec_packets) {
+ const size_t num_media_packets = media_packets.size();
+
// Sanity check arguments.
- RTC_DCHECK_GT(num_media_packets, 0);
+ RTC_DCHECK_GT(num_media_packets, 0u);
RTC_DCHECK_GE(num_important_packets, 0);
- RTC_DCHECK_LE(num_important_packets, num_media_packets);
+ RTC_DCHECK_LE(static_cast<size_t>(num_important_packets), num_media_packets);
RTC_DCHECK(fec_packets->empty());
if (num_media_packets > kMaxMediaPackets) {
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/forward_error_correction.h ('k') | webrtc/modules/rtp_rtcp/source/producer_fec.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698