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

Unified Diff: webrtc/modules/pacing/bbr_paced_sender.h

Issue 2999073002: Tweaked version of BBR for WebRTC. (Closed)
Patch Set: Fixed compilation errors. Created 3 years, 4 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/pacing/bbr_paced_sender.h
diff --git a/webrtc/modules/pacing/bbr_paced_sender.h b/webrtc/modules/pacing/bbr_paced_sender.h
new file mode 100644
index 0000000000000000000000000000000000000000..f5296038a71ec3ae05b97faa9c0bdeca62c04ced
--- /dev/null
+++ b/webrtc/modules/pacing/bbr_paced_sender.h
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved.
+ *
+ * Use of this source code is governed by a BSD-style license
+ * that can be found in the LICENSE file in the root of the source
+ * tree. An additional intellectual property rights grant can be found
+ * in the file PATENTS. All contributing project authors may
+ * be found in the AUTHORS file in the root of the source tree.
+ */
+
+#ifndef WEBRTC_MODULES_PACING_BBR_PACED_SENDER_H_
philipel 2017/08/17 12:52:26 This file should be moved. I think webrtc/modules/
gnish1 2017/08/17 15:37:48 Done.
+#define WEBRTC_MODULES_PACING_BBR_PACED_SENDER_H_
+
+#include <list>
+#include <memory>
+
+#include "webrtc/modules/pacing/paced_sender.h"
+#include "webrtc/modules/pacing/pacer.h"
+
+namespace webrtc {
+class Clock;
+class RtcEventLog;
+namespace bbr_paced_sender {
+struct Packet;
+} // namespace bbr_paced_sender
+class BbrPacedSender : public Pacer {
+ public:
+ BbrPacedSender(const Clock* clock,
+ PacedSender::PacketSender* packet_sender,
+ RtcEventLog* event_log);
+ ~BbrPacedSender() override;
+ void SetEstimatedBitrateAndCongestionWindow(
+ uint32_t bitrate_bps,
+ bool in_probe_rtt,
+ uint64_t congestion_window) override;
+ void SetMinBitrate(int min_send_bitrate_bps);
+ void InsertPacket(RtpPacketSender::Priority priority,
+ uint32_t ssrc,
+ uint16_t sequence_number,
+ int64_t capture_time_ms,
+ size_t bytes,
+ bool retransmission) override;
+ int64_t TimeUntilNextProcess() override;
+ void OnBytesAcked(size_t bytes) override;
+ void Process() override;
+ bool TryToSendPacket(bbr_paced_sender::Packet* packet);
+
+ private:
+ const Clock* const clock_;
+ PacedSender::PacketSender* const packet_sender_;
+ uint32_t estimated_bitrate_bps_;
+ uint32_t min_send_bitrate_kbps_;
+ uint32_t pacing_bitrate_kbps_;
+ int64_t time_last_update_us_;
+ int64_t time_last_update_ms_;
+ int64_t next_packet_send_time_;
+ float extra_time_;
philipel 2017/08/17 12:52:26 Could you come up with a better name than |extra_t
gnish1 2017/08/17 15:37:48 Done.
+ std::list<bbr_paced_sender::Packet*> packets_;
+ size_t data_inflight_;
+ size_t congestion_window_;
philipel 2017/08/17 12:52:26 Use the already existing congestion window class i
gnish1 2017/08/17 15:37:48 Done.
+ bool in_probe_rtt_;
+};
+} // namespace webrtc
+#endif // WEBRTC_MODULES_PACING_BBR_PACED_SENDER_H_

Powered by Google App Engine
This is Rietveld 408576698