Index: media/cast/net/rtp/rtp_sender.cc |
diff --git a/media/cast/net/rtp/rtp_sender.cc b/media/cast/net/rtp/rtp_sender.cc |
index 0f88c444eccc05b70a6206f4bc92e7ad4c901f0a..019f30c8759d0cbdd465ffe20bf8ec1d9e6cb8d4 100644 |
--- a/media/cast/net/rtp/rtp_sender.cc |
+++ b/media/cast/net/rtp/rtp_sender.cc |
@@ -117,6 +117,32 @@ void RtpSender::ResendPackets( |
} |
} |
+void RtpSender::CancelSendingFrames(const std::set<uint32>& frame_ids) { |
+ // Cancel resends of acked frames. |
+ MissingFramesAndPacketsMap missing_frames_and_packets; |
+ PacketIdSet missing; |
+ for (std::set<uint32>::const_iterator it = frame_ids.begin(); |
+ it != frame_ids.end(); ++it) { |
+ missing_frames_and_packets[*it] = missing; |
+ } |
+ ResendPackets(missing_frames_and_packets, true, base::TimeDelta()); |
hubbe
2014/08/12 18:24:11
Why go through ResendPackets()?
Seems like you jus
Alpha Left Google
2014/08/12 23:57:39
Done.
|
+} |
+ |
+void RtpSender::ResendFrameForKickstart(uint32 frame_id, |
+ base::TimeDelta dedupe_window) { |
+ // Send the last packet of the 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(frame_id, missing)); |
+ |
+ // Sending this extra packet is to kick-start the session. There is |
+ // no need to optimize re-transmission for this case. |
+ ResendPackets(missing_frames_and_packets, false, dedupe_window); |
+} |
+ |
void RtpSender::UpdateSequenceNumber(Packet* packet) { |
// TODO(miu): This is an abstraction violation. This needs to be a part of |
// the overall packet (de)serialization consolidation. |