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

Unified Diff: media/cast/net/rtp/rtp_sender.cc

Issue 445933002: Cast: Move retransmission to the transport (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: comments 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
« no previous file with comments | « media/cast/net/rtp/rtp_sender.h ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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.
« no previous file with comments | « media/cast/net/rtp/rtp_sender.h ('k') | media/cast/sender/audio_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698