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

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

Issue 2460533002: Simplify {,Set}UlpfecConfig interface. (Closed)
Patch Set: git cl format. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/rtp_rtcp/source/rtp_sender.cc
diff --git a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
index f0e323a4b2869a1f0dd00b3767eb9e557e6ee494..a3593c604e1217682fec0f819933042ce9764e52 100644
--- a/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
+++ b/webrtc/modules/rtp_rtcp/source/rtp_sender.cc
@@ -789,10 +789,10 @@ bool RTPSender::IsFecPacket(const RtpPacketToSend& packet) const {
if (!video_) {
return false;
}
- bool fec_enabled;
int pt_red;
int pt_fec;
- video_->GetUlpfecConfig(&fec_enabled, &pt_red, &pt_fec);
+ video_->GetUlpfecConfig(&pt_red, &pt_fec);
+ const bool fec_enabled = (pt_fec != -1);
return fec_enabled && static_cast<int>(packet.PayloadType()) == pt_red &&
static_cast<int>(packet.payload()[0]) == pt_fec;
}
@@ -1131,11 +1131,9 @@ RtpVideoCodecTypes RTPSender::VideoCodecType() const {
return video_->VideoCodecType();
}
-void RTPSender::SetUlpfecConfig(bool enabled,
- int red_payload_type,
- int ulpfec_payload_type) {
+void RTPSender::SetUlpfecConfig(int red_payload_type, int ulpfec_payload_type) {
RTC_DCHECK(!audio_configured_);
- video_->SetUlpfecConfig(enabled, red_payload_type, ulpfec_payload_type);
+ video_->SetUlpfecConfig(red_payload_type, ulpfec_payload_type);
}
int32_t RTPSender::SetFecParameters(
« no previous file with comments | « webrtc/modules/rtp_rtcp/source/rtp_sender.h ('k') | webrtc/modules/rtp_rtcp/source/rtp_sender_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698