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

Unified Diff: media/cast/transport/rtp_sender/packet_storage/packet_storage.h

Issue 252923007: Cast: Fix two video freezing problems (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: hide max outstanding frames from cast library users Created 6 years, 8 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/rtp_sender/packet_storage/packet_storage.h
diff --git a/media/cast/transport/rtp_sender/packet_storage/packet_storage.h b/media/cast/transport/rtp_sender/packet_storage/packet_storage.h
index b5981e858463e34a22dc40e971b250bdb6020268..fbe2396c5d987480f0242dbaec1715197c47b737 100644
--- a/media/cast/transport/rtp_sender/packet_storage/packet_storage.h
+++ b/media/cast/transport/rtp_sender/packet_storage/packet_storage.h
@@ -23,14 +23,13 @@ namespace cast {
namespace transport {
class StoredPacket;
-typedef std::map<uint32, std::pair<PacketKey, PacketRef> > PacketMap;
-typedef std::multimap<base::TimeTicks, uint32> TimeToPacketMap;
+
+typedef std::pair<uint32, uint16> StorageIndex;
Alpha Left Google 2014/04/29 00:55:05 Please document what these integers mean.
hubbe 2014/04/29 17:19:58 Done.
+typedef std::map<StorageIndex, std::pair<PacketKey, PacketRef> > PacketMap;
class PacketStorage {
public:
- static const unsigned int kMaxStoredPackets = 1000;
-
- PacketStorage(base::TickClock* clock, int max_time_stored_ms);
+ PacketStorage(int stored_frames);
Alpha Left Google 2014/04/29 00:55:05 uint32 to be consistent with |stored_frames_|.
hubbe 2014/04/29 17:19:58 It's an int in the rtp config.
virtual ~PacketStorage();
void StorePacket(uint32 frame_id,
@@ -44,15 +43,18 @@ class PacketStorage {
SendPacketVector* packets_to_resend);
// Copies packet into the packet list.
- bool GetPacket(uint8 frame_id, uint16 packet_id, SendPacketVector* packets);
+ bool GetPacket32(uint32 frame_id,
Alpha Left Google 2014/04/29 00:55:05 Please document the difference between GetPacket32
Alpha Left Google 2014/04/29 00:55:05 Also it seems like this should be a private method
hubbe 2014/04/29 17:19:58 Done.
hubbe 2014/04/29 17:19:58 Done.
+ uint16 packet_id,
+ SendPacketVector* packets);
+ bool GetPacket(uint8 frame_id_8bit,
+ uint16 packet_id,
+ SendPacketVector* packets);
private:
- void CleanupOldPackets(base::TimeTicks now);
+ void CleanupOldPackets(uint32 current_frame_id);
- base::TickClock* const clock_; // Not owned by this class.
- base::TimeDelta max_time_stored_;
PacketMap stored_packets_;
- TimeToPacketMap time_to_packet_map_;
+ uint32 stored_frames_;
DISALLOW_COPY_AND_ASSIGN(PacketStorage);
};

Powered by Google App Engine
This is Rietveld 408576698