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

Unified Diff: media/cast/video_sender/video_sender.cc

Issue 322953004: Cast: Don't cancel re-transmission for some cases (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merged again Created 6 years, 6 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
« no previous file with comments | « media/cast/transport/rtp_sender/rtp_sender.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/cast/video_sender/video_sender.cc
diff --git a/media/cast/video_sender/video_sender.cc b/media/cast/video_sender/video_sender.cc
index b88a3bdf51d73bc9a80abe1a68d638549cce37da..f5bc3cdc54e43d72797f9113fca75cc7de4923c1 100644
--- a/media/cast/video_sender/video_sender.cc
+++ b/media/cast/video_sender/video_sender.cc
@@ -318,8 +318,10 @@ void VideoSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
// Only count duplicated ACKs if there is no NACK request in between.
// This is to avoid aggresive resend.
duplicate_ack_counter_ = 0;
+
+ // A NACK is also used to cancel pending re-transmissions.
transport_sender_->ResendPackets(
- false, cast_feedback.missing_frames_and_packets_);
+ false, cast_feedback.missing_frames_and_packets_, true);
}
base::TimeTicks now = cast_environment_->Clock()->NowTicks();
@@ -370,7 +372,11 @@ void VideoSender::ResendForKickstart() {
missing_frames_and_packets.insert(
std::make_pair(last_sent_frame_id_, missing));
last_send_time_ = cast_environment_->Clock()->NowTicks();
- transport_sender_->ResendPackets(false, missing_frames_and_packets);
+
+ // Sending this extra packet is to kick-start the session. There is
+ // no need to optimize re-transmission for this case.
+ transport_sender_->ResendPackets(false, missing_frames_and_packets,
+ false);
}
} // namespace cast
« no previous file with comments | « media/cast/transport/rtp_sender/rtp_sender.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698