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

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: bugfix 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
« no previous file with comments | « media/cast/transport/pacing/mock_paced_packet_sender.h ('k') | media/cast/transport/pacing/paced_sender.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..9fc0c8b8b8582dcef7e239a213cd84879882c5fc 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 dedupe_window) = 0;
virtual bool SendRtcpPacket(uint32 ssrc, PacketRef packet) = 0;
virtual void CancelSendingPacket(const PacketKey& packet_key) = 0;
@@ -72,14 +73,15 @@ 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 dedupe_window) OVERRIDE;
virtual bool SendRtcpPacket(uint32 ssrc, PacketRef packet) OVERRIDE;
virtual void CancelSendingPacket(const PacketKey& packet_key) OVERRIDE;
private:
// Actually sends the packets to the transport.
void SendStoredPackets();
- void LogPacketEvent(const Packet& packet, bool retransmit);
+ void LogPacketEvent(const Packet& packet, CastLoggingEvent event);
enum PacketType {
PacketType_RTCP,
@@ -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,8 @@ 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_;
+ std::map<PacketKey, base::TimeTicks> sent_time_buffer_;
// Maximum burst size for the next three bursts.
size_t max_burst_size_;
« no previous file with comments | « media/cast/transport/pacing/mock_paced_packet_sender.h ('k') | media/cast/transport/pacing/paced_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698