| Index: webrtc/modules/pacing/paced_sender.cc
|
| diff --git a/webrtc/modules/pacing/paced_sender.cc b/webrtc/modules/pacing/paced_sender.cc
|
| index 7c24301b95f0d830af5effde988a9a182ac36d48..d497db7cde6121191ef1a63a96568a812775097a 100644
|
| --- a/webrtc/modules/pacing/paced_sender.cc
|
| +++ b/webrtc/modules/pacing/paced_sender.cc
|
| @@ -11,9 +11,7 @@
|
| #include "webrtc/modules/pacing/paced_sender.h"
|
|
|
| #include <algorithm>
|
| -#include <map>
|
| #include <queue>
|
| -#include <set>
|
| #include <vector>
|
|
|
| #include "webrtc/base/checks.h"
|
| @@ -99,9 +97,6 @@ class PacketQueue {
|
| virtual ~PacketQueue() {}
|
|
|
| void Push(const Packet& packet) {
|
| - if (!AddToDupeSet(packet))
|
| - return;
|
| -
|
| UpdateQueueTime(packet.enqueue_time_ms);
|
|
|
| // Store packet in list, use pointers in priority queue for cheaper moves.
|
| @@ -123,7 +118,6 @@ class PacketQueue {
|
| void CancelPop(const Packet& packet) { prio_queue_.push(&(*packet.this_it)); }
|
|
|
| void FinalizePop(const Packet& packet) {
|
| - RemoveFromDupeSet(packet);
|
| bytes_ -= packet.bytes;
|
| queue_time_sum_ -= (time_last_updated_ - packet.enqueue_time_ms);
|
| packet_list_.erase(packet.this_it);
|
| @@ -162,30 +156,7 @@ class PacketQueue {
|
| }
|
|
|
| private:
|
| - // Try to add a packet to the set of ssrc/seqno identifiers currently in the
|
| - // queue. Return true if inserted, false if this is a duplicate.
|
| - bool AddToDupeSet(const Packet& packet) {
|
| - SsrcSeqNoMap::iterator it = dupe_map_.find(packet.ssrc);
|
| - if (it == dupe_map_.end()) {
|
| - // First for this ssrc, just insert.
|
| - dupe_map_[packet.ssrc].insert(packet.sequence_number);
|
| - return true;
|
| - }
|
| -
|
| - // Insert returns a pair, where second is a bool set to true if new element.
|
| - return it->second.insert(packet.sequence_number).second;
|
| - }
|
| -
|
| - void RemoveFromDupeSet(const Packet& packet) {
|
| - SsrcSeqNoMap::iterator it = dupe_map_.find(packet.ssrc);
|
| - RTC_DCHECK(it != dupe_map_.end());
|
| - it->second.erase(packet.sequence_number);
|
| - if (it->second.empty()) {
|
| - dupe_map_.erase(it);
|
| - }
|
| - }
|
| -
|
| - // List of packets, in the order the were enqueued. Since dequeueing may
|
| + // List of packets, in the order they were enqueued. Since dequeueing may
|
| // occur out of order, use list instead of vector.
|
| std::list<Packet> packet_list_;
|
| // Priority queue of the packets, sorted according to Comparator.
|
| @@ -193,9 +164,6 @@ class PacketQueue {
|
| std::priority_queue<Packet*, std::vector<Packet*>, Comparator> prio_queue_;
|
| // Total number of bytes in the queue.
|
| uint64_t bytes_;
|
| - // Map<ssrc, std::set<seq_no> >, for checking duplicates.
|
| - typedef std::map<uint32_t, std::set<uint16_t> > SsrcSeqNoMap;
|
| - SsrcSeqNoMap dupe_map_;
|
| const Clock* const clock_;
|
| int64_t queue_time_sum_;
|
| int64_t time_last_updated_;
|
|
|