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

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

Issue 2609113003: BitrateProber::CreateProbeCluster now only accept one parameter (bitrate_bps). (Closed)
Patch Set: static_cast<int> + PacedSenderTest fix. Created 3 years, 11 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 30
30 namespace paced_sender { 31 namespace paced_sender {
31 class IntervalBudget; 32 class IntervalBudget;
32 struct Packet; 33 struct Packet;
33 class PacketQueue; 34 class PacketQueue;
34 } // namespace paced_sender 35 } // namespace paced_sender
35 36
36 class PacedSender : public Module, public RtpPacketSender { 37 class PacedSender : public Module, public RtpPacketSender {
37 public: 38 public:
38 class PacketSender { 39 class PacketSender {
(...skipping 22 matching lines...) Expand all
61 static const int64_t kMaxQueueLengthMs; 62 static const int64_t kMaxQueueLengthMs;
62 // Pacing-rate relative to our target send rate. 63 // Pacing-rate relative to our target send rate.
63 // Multiplicative factor that is applied to the target bitrate to calculate 64 // Multiplicative factor that is applied to the target bitrate to calculate
64 // the number of bytes that can be transmitted per interval. 65 // the number of bytes that can be transmitted per interval.
65 // Increasing this factor will result in lower delays in cases of bitrate 66 // Increasing this factor will result in lower delays in cases of bitrate
66 // overshoots from the encoder. 67 // overshoots from the encoder.
67 static const float kDefaultPaceMultiplier; 68 static const float kDefaultPaceMultiplier;
68 69
69 static const size_t kMinProbePacketSize = 200; 70 static const size_t kMinProbePacketSize = 200;
70 71
71 PacedSender(Clock* clock, 72 PacedSender(Clock* clock, PacketSender* packet_sender);
72 PacketSender* packet_sender);
73 73
74 virtual ~PacedSender(); 74 virtual ~PacedSender();
75 75
76 virtual void CreateProbeCluster(int bitrate_bps, int num_packets); 76 virtual void CreateProbeCluster(int bitrate_bps);
77 77
78 // Temporarily pause all sending. 78 // Temporarily pause all sending.
79 void Pause(); 79 void Pause();
80 80
81 // Resume sending packets. 81 // Resume sending packets.
82 void Resume(); 82 void Resume();
83 83
84 // Enable bitrate probing. Enabled by default, mostly here to simplify 84 // Enable bitrate probing. Enabled by default, mostly here to simplify
85 // testing. Must be called before any packets are being sent to have an 85 // testing. Must be called before any packets are being sent to have an
86 // effect. 86 // effect.
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); 176 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_);
177 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); 177 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_);
178 178
179 int64_t time_last_update_us_ GUARDED_BY(critsect_); 179 int64_t time_last_update_us_ GUARDED_BY(critsect_);
180 180
181 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); 181 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_);
182 uint64_t packet_counter_; 182 uint64_t packet_counter_;
183 }; 183 };
184 } // namespace webrtc 184 } // namespace webrtc
185 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ 185 #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