OLD | NEW |
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 |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 // encoding them). Bitrate sent may temporarily exceed target set by | 60 // encoding them). Bitrate sent may temporarily exceed target set by |
61 // UpdateBitrate() so that this limit will be upheld. | 61 // UpdateBitrate() so that this limit will be upheld. |
62 static const int64_t kMaxQueueLengthMs; | 62 static const int64_t kMaxQueueLengthMs; |
63 // Pacing-rate relative to our target send rate. | 63 // Pacing-rate relative to our target send rate. |
64 // Multiplicative factor that is applied to the target bitrate to calculate | 64 // Multiplicative factor that is applied to the target bitrate to calculate |
65 // the number of bytes that can be transmitted per interval. | 65 // the number of bytes that can be transmitted per interval. |
66 // 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 |
67 // overshoots from the encoder. | 67 // overshoots from the encoder. |
68 static const float kDefaultPaceMultiplier; | 68 static const float kDefaultPaceMultiplier; |
69 | 69 |
70 static const size_t kMinProbePacketSize = 200; | |
71 | |
72 PacedSender(Clock* clock, PacketSender* packet_sender); | 70 PacedSender(Clock* clock, PacketSender* packet_sender); |
73 | 71 |
74 virtual ~PacedSender(); | 72 virtual ~PacedSender(); |
75 | 73 |
76 virtual void CreateProbeCluster(int bitrate_bps); | 74 virtual void CreateProbeCluster(int bitrate_bps); |
77 | 75 |
78 // Temporarily pause all sending. | 76 // Temporarily pause all sending. |
79 void Pause(); | 77 void Pause(); |
80 | 78 |
81 // Resume sending packets. | 79 // Resume sending packets. |
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); | 174 uint32_t max_padding_bitrate_kbps_ GUARDED_BY(critsect_); |
177 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); | 175 uint32_t pacing_bitrate_kbps_ GUARDED_BY(critsect_); |
178 | 176 |
179 int64_t time_last_update_us_ GUARDED_BY(critsect_); | 177 int64_t time_last_update_us_ GUARDED_BY(critsect_); |
180 | 178 |
181 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); | 179 std::unique_ptr<paced_sender::PacketQueue> packets_ GUARDED_BY(critsect_); |
182 uint64_t packet_counter_; | 180 uint64_t packet_counter_; |
183 }; | 181 }; |
184 } // namespace webrtc | 182 } // namespace webrtc |
185 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ | 183 #endif // WEBRTC_MODULES_PACING_PACED_SENDER_H_ |
OLD | NEW |