| Index: media/cast/sender/video_sender.cc
|
| diff --git a/media/cast/sender/video_sender.cc b/media/cast/sender/video_sender.cc
|
| index b9d359bbde83cd5c9e43da5991b75c14f77f0c79..664990f721af1609cab195c16fc43b426847e257 100644
|
| --- a/media/cast/sender/video_sender.cc
|
| +++ b/media/cast/sender/video_sender.cc
|
| @@ -308,10 +308,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();
|
| @@ -332,14 +328,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;
|
| 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;
|
| }
|
| }
|
| @@ -363,20 +357,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
|
|
|