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

Side by Side Diff: webrtc/modules/remote_bitrate_estimator/test/bwe.h

Issue 1235143002: Fix simulator issue where chokes didn't apply to non-congested packets. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Comments addressed. Created 5 years, 5 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 unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698