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

Side by Side Diff: webrtc/modules/pacing/bitrate_prober.h

Issue 2779893004: Reland of Log created probe clusters to RtcEventLog. (Closed)
Patch Set: Dependency fix. Created 3 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 unified diff | Download patch
« no previous file with comments | « webrtc/modules/pacing/DEPS ('k') | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2014 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2014 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
11 #ifndef WEBRTC_MODULES_PACING_BITRATE_PROBER_H_ 11 #ifndef WEBRTC_MODULES_PACING_BITRATE_PROBER_H_
12 #define WEBRTC_MODULES_PACING_BITRATE_PROBER_H_ 12 #define WEBRTC_MODULES_PACING_BITRATE_PROBER_H_
13 13
14 #include <queue> 14 #include <queue>
15 15
16 #include "webrtc/base/basictypes.h" 16 #include "webrtc/base/basictypes.h"
17 #include "webrtc/modules/include/module_common_types.h" 17 #include "webrtc/modules/include/module_common_types.h"
18 #include "webrtc/typedefs.h" 18 #include "webrtc/typedefs.h"
19 19
20 namespace webrtc { 20 namespace webrtc {
21 class RtcEventLog;
21 22
22 // Note that this class isn't thread-safe by itself and therefore relies 23 // Note that this class isn't thread-safe by itself and therefore relies
23 // on being protected by the caller. 24 // on being protected by the caller.
24 class BitrateProber { 25 class BitrateProber {
25 public: 26 public:
26 BitrateProber(); 27 BitrateProber();
28 explicit BitrateProber(RtcEventLog* event_log);
27 29
28 void SetEnabled(bool enable); 30 void SetEnabled(bool enable);
29 31
30 // Returns true if the prober is in a probing session, i.e., it currently 32 // Returns true if the prober is in a probing session, i.e., it currently
31 // wants packets to be sent out according to the time returned by 33 // wants packets to be sent out according to the time returned by
32 // TimeUntilNextProbe(). 34 // TimeUntilNextProbe().
33 bool IsProbing() const; 35 bool IsProbing() const;
34 36
35 // Initializes a new probing session if the prober is allowed to probe. Does 37 // Initializes a new probing session if the prober is allowed to probe. Does
36 // not initialize the prober unless the packet size is large enough to probe 38 // not initialize the prober unless the packet size is large enough to probe
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 95
94 // Probe bitrate per packet. These are used to compute the delta relative to 96 // Probe bitrate per packet. These are used to compute the delta relative to
95 // the previous probe packet based on the size and time when that packet was 97 // the previous probe packet based on the size and time when that packet was
96 // sent. 98 // sent.
97 std::queue<ProbeCluster> clusters_; 99 std::queue<ProbeCluster> clusters_;
98 100
99 // Time the next probe should be sent when in kActive state. 101 // Time the next probe should be sent when in kActive state.
100 int64_t next_probe_time_ms_; 102 int64_t next_probe_time_ms_;
101 103
102 int next_cluster_id_; 104 int next_cluster_id_;
105 RtcEventLog* const event_log_;
103 }; 106 };
104 107
105 } // namespace webrtc 108 } // namespace webrtc
106 109
107 #endif // WEBRTC_MODULES_PACING_BITRATE_PROBER_H_ 110 #endif // WEBRTC_MODULES_PACING_BITRATE_PROBER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/pacing/DEPS ('k') | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698