OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 }; | 39 }; |
40 | 40 |
41 typedef std::list<PacketIdentifierNode*>::iterator PacketNodeIt; | 41 typedef std::list<PacketIdentifierNode*>::iterator PacketNodeIt; |
42 | 42 |
43 // FIFO implementation for a limited capacity set. | 43 // FIFO implementation for a limited capacity set. |
44 // Used for keeping the latest arrived packets while avoiding duplicates. | 44 // Used for keeping the latest arrived packets while avoiding duplicates. |
45 // Allows efficient insertion, deletion and search. | 45 // Allows efficient insertion, deletion and search. |
46 class LinkedSet { | 46 class LinkedSet { |
47 public: | 47 public: |
48 explicit LinkedSet(int capacity) : capacity_(capacity) {} | 48 explicit LinkedSet(int capacity) : capacity_(capacity) {} |
| 49 ~LinkedSet(); |
49 | 50 |
50 // If the arriving packet (identified by its sequence number) is already | 51 // If the arriving packet (identified by its sequence number) is already |
51 // in the LinkedSet, move its Node to the head of the list. Else, create | 52 // in the LinkedSet, move its Node to the head of the list. Else, create |
52 // a PacketIdentifierNode n_ and then UpdateHead(n_), calling RemoveTail() | 53 // a PacketIdentifierNode n_ and then UpdateHead(n_), calling RemoveTail() |
53 // if the LinkedSet reached its maximum capacity. | 54 // if the LinkedSet reached its maximum capacity. |
54 void Insert(uint16_t sequence_number, | 55 void Insert(uint16_t sequence_number, |
55 int64_t send_time_ms, | 56 int64_t send_time_ms, |
56 int64_t arrival_time_ms, | 57 int64_t arrival_time_ms, |
57 size_t payload_size); | 58 size_t payload_size); |
58 | 59 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 BitrateObserver* observer, | 133 BitrateObserver* observer, |
133 Clock* clock); | 134 Clock* clock); |
134 | 135 |
135 BweReceiver* CreateBweReceiver(BandwidthEstimatorType type, | 136 BweReceiver* CreateBweReceiver(BandwidthEstimatorType type, |
136 int flow_id, | 137 int flow_id, |
137 bool plot); | 138 bool plot); |
138 } // namespace bwe | 139 } // namespace bwe |
139 } // namespace testing | 140 } // namespace testing |
140 } // namespace webrtc | 141 } // namespace webrtc |
141 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_H_ | 142 #endif // WEBRTC_MODULES_REMOTE_BITRATE_ESTIMATOR_TEST_BWE_H_ |
OLD | NEW |