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

Unified Diff: webrtc/video/rtp_stream_receiver.cc

Issue 2469093003: Remove RED/RTX workaround from sender/receiver and VideoEngine2. (Closed)
Patch Set: Fix warning message. 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/video/rtp_stream_receiver.h ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/rtp_stream_receiver.cc
diff --git a/webrtc/video/rtp_stream_receiver.cc b/webrtc/video/rtp_stream_receiver.cc
index 576543bef682d05aa6cabef4790da3bb44fb76b7..138ed845831a74216ddab63dd2c72d19634d67b3 100644
--- a/webrtc/video/rtp_stream_receiver.cc
+++ b/webrtc/video/rtp_stream_receiver.cc
@@ -152,22 +152,15 @@ RtpStreamReceiver::RtpStreamReceiver(
kv.first);
}
- // If set to true, the RTX payload type mapping supplied in
- // |SetRtxPayloadType| will be used when restoring RTX packets. Without it,
- // RTX packets will always be restored to the last non-RTX packet payload type
- // received.
- // TODO(holmer): When Chrome no longer depends on this being false by default,
- // always use the mapping and remove this whole codepath.
- rtp_payload_registry_.set_use_rtx_payload_mapping_on_restore(
- config_.rtp.use_rtx_payload_mapping_on_restore);
-
if (IsFecEnabled()) {
VideoCodec ulpfec_codec = {};
ulpfec_codec.codecType = kVideoCodecULPFEC;
strncpy(ulpfec_codec.plName, "ulpfec", sizeof(ulpfec_codec.plName));
ulpfec_codec.plType = config_.rtp.ulpfec.ulpfec_payload_type;
RTC_CHECK(SetReceiveCodec(ulpfec_codec));
+ }
+ if (IsRedEnabled()) {
VideoCodec red_codec = {};
red_codec.codecType = kVideoCodecRED;
strncpy(red_codec.plName, "red", sizeof(red_codec.plName));
@@ -178,11 +171,6 @@ RtpStreamReceiver::RtpStreamReceiver(
config_.rtp.ulpfec.red_rtx_payload_type,
config_.rtp.ulpfec.red_payload_type);
}
- // TODO(brandtr): It doesn't seem that |rtp_rtcp_| is used for sending any
- // RTP packets. Investigate if this is the case, and if so, remove this
- // call, since there are no RTP packets to protect with RED+ULPFEC.
- rtp_rtcp_->SetUlpfecConfig(config_.rtp.ulpfec.red_payload_type,
- config_.rtp.ulpfec.ulpfec_payload_type);
}
if (config_.rtp.rtcp_xr.receiver_reference_time_report)
@@ -339,8 +327,11 @@ int32_t RtpStreamReceiver::SliceLossIndicationRequest(
}
bool RtpStreamReceiver::IsFecEnabled() const {
- return config_.rtp.ulpfec.red_payload_type != -1 &&
- config_.rtp.ulpfec.ulpfec_payload_type != -1;
+ return config_.rtp.ulpfec.ulpfec_payload_type != -1;
+}
+
+bool RtpStreamReceiver::IsRedEnabled() const {
+ return config_.rtp.ulpfec.red_payload_type != -1;
}
bool RtpStreamReceiver::IsRetransmissionsEnabled() const {
« no previous file with comments | « webrtc/video/rtp_stream_receiver.h ('k') | webrtc/video/video_send_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698