| 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;
|
| +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);
|
| 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,
|
| + 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);
|
| };
|
|
|