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

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

Issue 445933002: Cast: Move retransmission to the transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: IPC Created 6 years, 4 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: media/cast/sender/video_sender.cc
diff --git a/media/cast/sender/video_sender.cc b/media/cast/sender/video_sender.cc
index 598e0d3a98906e7234d0fba149a165522df5caf0..ed98963b7536c698180b60390ef3629bbf9a76c2 100644
--- a/media/cast/sender/video_sender.cc
+++ b/media/cast/sender/video_sender.cc
@@ -282,10 +282,6 @@ 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, true, rtt);
}
base::TimeTicks now = cast_environment_->Clock()->NowTicks();
@@ -306,14 +302,12 @@ void VideoSender::OnReceivedCastFeedback(const RtcpCastMessage& cast_feedback) {
<< " for frame " << cast_feedback.ack_frame_id;
if (!is_acked_out_of_order) {
// Cancel resends of acked frames.
- MissingFramesAndPacketsMap missing_frames_and_packets;
- PacketIdSet missing;
+ std::set<uint32> cancel_sending_frames;
hubbe 2014/08/11 19:11:50 Seems like a vector would be sufficient here.
while (latest_acked_frame_id_ != cast_feedback.ack_frame_id) {
latest_acked_frame_id_++;
- missing_frames_and_packets[latest_acked_frame_id_] = missing;
+ cancel_sending_frames.insert(latest_acked_frame_id_);
}
- transport_sender_->ResendPackets(
- false, missing_frames_and_packets, true, rtt);
+ transport_sender_->CancelSendingFrames(ssrc_, cancel_sending_frames);
latest_acked_frame_id_ = cast_feedback.ack_frame_id;
}
}
@@ -337,20 +331,8 @@ void VideoSender::ResendForKickstart() {
DCHECK(!last_send_time_.is_null());
VLOG(1) << "Resending last packet of frame " << last_sent_frame_id_
<< " to kick-start.";
- // Send the first packet of the last encoded frame to kick start
- // retransmission. This gives enough information to the receiver what
- // packets and frames are missing.
- MissingFramesAndPacketsMap missing_frames_and_packets;
- PacketIdSet missing;
- missing.insert(kRtcpCastLastPacket);
- missing_frames_and_packets.insert(
- std::make_pair(last_sent_frame_id_, missing));
last_send_time_ = cast_environment_->Clock()->NowTicks();
-
- // 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, rtt_);
+ transport_sender_->ResendFrameForKickstart(ssrc_, last_sent_frame_id_);
}
} // namespace cast

Powered by Google App Engine
This is Rietveld 408576698