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

Unified Diff: media/cast/transport/pacing/paced_sender.h

Issue 343523005: Cast: Avoid retransmit if we sent the same packet recently (less than RTT) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: got 500 responses when uploading, uploading 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
Index: media/cast/transport/pacing/paced_sender.h
diff --git a/media/cast/transport/pacing/paced_sender.h b/media/cast/transport/pacing/paced_sender.h
index 2373fb59664d0a91f2747792b58860302ce3497f..1fe1392b957d2b9ffe559beb94a9112f2cddfab6 100644
--- a/media/cast/transport/pacing/paced_sender.h
+++ b/media/cast/transport/pacing/paced_sender.h
@@ -41,7 +41,8 @@ typedef std::vector<std::pair<PacketKey, PacketRef> > SendPacketVector;
class PacedPacketSender {
public:
virtual bool SendPackets(const SendPacketVector& packets) = 0;
- virtual bool ResendPackets(const SendPacketVector& packets) = 0;
+ virtual bool ResendPackets(const SendPacketVector& packets,
+ base::TimeDelta rtt) = 0;
virtual bool SendRtcpPacket(uint32 ssrc, PacketRef packet) = 0;
virtual void CancelSendingPacket(const PacketKey& packet_key) = 0;
@@ -72,7 +73,8 @@ class PacedSender : public PacedPacketSender,
// PacedPacketSender implementation.
virtual bool SendPackets(const SendPacketVector& packets) OVERRIDE;
- virtual bool ResendPackets(const SendPacketVector& packets) OVERRIDE;
+ virtual bool ResendPackets(const SendPacketVector& packets,
+ base::TimeDelta rtt) OVERRIDE;
virtual bool SendRtcpPacket(uint32 ssrc, PacketRef packet) OVERRIDE;
virtual void CancelSendingPacket(const PacketKey& packet_key) OVERRIDE;
@@ -108,7 +110,8 @@ class PacedSender : public PacedPacketSender,
// Returns the next packet to send. RTCP packets have highest priority,
// resend packets have second highest priority and then comes everything
// else.
- PacketRef GetNextPacket(PacketType* packet_type);
+ PacketRef GetNextPacket(PacketType* packet_type,
+ PacketKey* packet_key);
base::TickClock* const clock_; // Not owned by this class.
LoggingImpl* const logging_; // Not owned by this class.
@@ -117,6 +120,9 @@ class PacedSender : public PacedPacketSender,
uint32 audio_ssrc_;
uint32 video_ssrc_;
std::map<PacketKey, std::pair<PacketType, PacketRef> > packet_list_;
+ std::map<PacketKey, base::TimeTicks> sent_time_;
Alpha Left Google 2014/06/18 01:43:32 nit: There should be a typedef.
hubbe 2014/06/18 20:22:28 Why?
Alpha Left Google 2014/06/18 20:39:15 There's once place that does "std::map<PacketKey,
+ std::map<PacketKey, base::TimeTicks> sent_time_buffer_;
+ PacketKey in_progress_packet_key_;
// Maximum burst size for the next three bursts.
size_t max_burst_size_;

Powered by Google App Engine
This is Rietveld 408576698