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

Side by Side Diff: webrtc/modules/pacing/paced_sender.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/mock/mock_paced_sender.h ('k') | webrtc/modules/pacing/paced_sender.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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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_PACED_SENDER_H_ 11 #ifndef WEBRTC_MODULES_PACING_PACED_SENDER_H_
12 #define WEBRTC_MODULES_PACING_PACED_SENDER_H_ 12 #define WEBRTC_MODULES_PACING_PACED_SENDER_H_
13 13
14 #include <list> 14 #include <list>
15 #include <memory> 15 #include <memory>
16 #include <set> 16 #include <set>
17 17
18 #include "webrtc/base/optional.h" 18 #include "webrtc/base/optional.h"
19 #include "webrtc/base/thread_annotations.h" 19 #include "webrtc/base/thread_annotations.h"
20 #include "webrtc/modules/include/module.h" 20 #include "webrtc/modules/include/module.h"
21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h" 21 #include "webrtc/modules/rtp_rtcp/include/rtp_rtcp_defines.h"
22 #include "webrtc/typedefs.h" 22 #include "webrtc/typedefs.h"
23 23
24 namespace webrtc { 24 namespace webrtc {
25 class AlrDetector; 25 class AlrDetector;
26 class BitrateProber; 26 class BitrateProber;
27 class Clock; 27 class Clock;
28 class CriticalSectionWrapper; 28 class CriticalSectionWrapper;
29 class ProbeClusterCreatedObserver; 29 class ProbeClusterCreatedObserver;
30 class RtcEventLog;
30 31
31 namespace paced_sender { 32 namespace paced_sender {
32 class IntervalBudget; 33 class IntervalBudget;
33 struct Packet; 34 struct Packet;
34 class PacketQueue; 35 class PacketQueue;
35 } // namespace paced_sender 36 } // namespace paced_sender
36 37
37 class PacedSender : public Module, public RtpPacketSender { 38 class PacedSender : public Module, public RtpPacketSender {
38 public: 39 public:
39 class PacketSender { 40 class PacketSender {
(...skipping 21 matching lines...) Expand all
61 // encoding them). Bitrate sent may temporarily exceed target set by 62 // encoding them). Bitrate sent may temporarily exceed target set by
62 // UpdateBitrate() so that this limit will be upheld. 63 // UpdateBitrate() so that this limit will be upheld.
63 static const int64_t kMaxQueueLengthMs; 64 static const int64_t kMaxQueueLengthMs;
64 // Pacing-rate relative to our target send rate. 65 // Pacing-rate relative to our target send rate.
65 // Multiplicative factor that is applied to the target bitrate to calculate 66 // Multiplicative factor that is applied to the target bitrate to calculate
66 // the number of bytes that can be transmitted per interval. 67 // the number of bytes that can be transmitted per interval.
67 // Increasing this factor will result in lower delays in cases of bitrate 68 // Increasing this factor will result in lower delays in cases of bitrate
68 // overshoots from the encoder. 69 // overshoots from the encoder.
69 static const float kDefaultPaceMultiplier; 70 static const float kDefaultPaceMultiplier;
70 71
71 PacedSender(const Clock* clock, PacketSender* packet_sender); 72 PacedSender(const Clock* clock,
73 PacketSender* packet_sender,
74 RtcEventLog* event_log);
72 75
73 virtual ~PacedSender(); 76 virtual ~PacedSender();
74 77
75 virtual void CreateProbeCluster(int bitrate_bps); 78 virtual void CreateProbeCluster(int bitrate_bps);
76 79
77 // Temporarily pause all sending. 80 // Temporarily pause all sending.
78 void Pause(); 81 void Pause();
79 82
80 // Resume sending packets. 83 // Resume sending packets.
81 void Resume(); 84 void Resume();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); 184 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_);
182 185
183 int64_t time_last_update_us_ GUARDED_BY(critsect_); 186 int64_t time_last_update_us_ GUARDED_BY(critsect_);
184 187
185 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); 188 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
186 uint64_t packet_counter_; 189 uint64_t packet_counter_;
187 ProcessThread* process_thread_ = nullptr; 190 ProcessThread* process_thread_ = nullptr;
188 }; 191 };
189 } // namespace webrtc 192 } // namespace webrtc
190 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ 193 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_
OLDNEW
« no previous file with comments | « webrtc/modules/pacing/mock/mock_paced_sender.h ('k') | webrtc/modules/pacing/paced_sender.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698