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

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

Issue 1350163005: Avoid circular dependency rtp_rtcp <-> paced_sender (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years, 3 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/BUILD.gn ('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 <cstddef> 14 #include <cstddef>
15 #include <list> 15 #include <list>
16 16
17 #include "webrtc/typedefs.h" 17 #include "webrtc/typedefs.h"
18 18
19 namespace webrtc { 19 namespace webrtc {
20 20
21 // Note that this class isn't thread-safe by itself and therefore relies 21 // Note that this class isn't thread-safe by itself and therefore relies
22 // on being protected by the caller. 22 // on being protected by the caller.
23 class BitrateProber { 23 class BitrateProber {
24 public: 24 public:
25 static const size_t kMinProbePacketSize;
26
27 BitrateProber(); 25 BitrateProber();
28 26
29 void SetEnabled(bool enable); 27 void SetEnabled(bool enable);
30 28
31 // Returns true if the prober is in a probing session, i.e., it currently 29 // Returns true if the prober is in a probing session, i.e., it currently
32 // wants packets to be sent out according to the time returned by 30 // wants packets to be sent out according to the time returned by
33 // TimeUntilNextProbe(). 31 // TimeUntilNextProbe().
34 bool IsProbing() const; 32 bool IsProbing() const;
35 33
36 // Initializes a new probing session if the prober is allowed to probe. 34 // Initializes a new probing session if the prober is allowed to probe.
(...skipping 17 matching lines...) Expand all
54 ProbingState probing_state_; 52 ProbingState probing_state_;
55 // Probe bitrate per packet. These are used to compute the delta relative to 53 // Probe bitrate per packet. These are used to compute the delta relative to
56 // the previous probe packet based on the size and time when that packet was 54 // the previous probe packet based on the size and time when that packet was
57 // sent. 55 // sent.
58 std::list<int> probe_bitrates_; 56 std::list<int> probe_bitrates_;
59 size_t packet_size_last_send_; 57 size_t packet_size_last_send_;
60 int64_t time_last_send_ms_; 58 int64_t time_last_send_ms_;
61 }; 59 };
62 } // namespace webrtc 60 } // namespace webrtc
63 #endif // WEBRTC_MODULES_PACING_BITRATE_PROBER_H_ 61 #endif // WEBRTC_MODULES_PACING_BITRATE_PROBER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/pacing/BUILD.gn ('k') | webrtc/modules/pacing/bitrate_prober.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698