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

Unified Diff: webrtc/modules/congestion_controller/transport_feedback_adapter.cc

Issue 2589743002: Make OverheadObserver::OnOverheadChanged count RTP headers only (Closed)
Patch Set: Add explicit cast. 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/congestion_controller/transport_feedback_adapter.cc
diff --git a/webrtc/modules/congestion_controller/transport_feedback_adapter.cc b/webrtc/modules/congestion_controller/transport_feedback_adapter.cc
index 7756fee365da2dd872be36bf028e525480b5abe3..7ffbe8d2da0f783b75cac8b5721b8dbfc76da258 100644
--- a/webrtc/modules/congestion_controller/transport_feedback_adapter.cc
+++ b/webrtc/modules/congestion_controller/transport_feedback_adapter.cc
@@ -19,6 +19,7 @@
#include "webrtc/modules/congestion_controller/delay_based_bwe.h"
#include "webrtc/modules/rtp_rtcp/source/rtcp_packet/transport_feedback.h"
#include "webrtc/modules/utility/include/process_thread.h"
+#include "webrtc/system_wrappers/include/field_trial.h"
namespace webrtc {
@@ -59,6 +60,10 @@ void TransportFeedbackAdapter::AddPacket(uint16_t sequence_number,
size_t length,
int probe_cluster_id) {
rtc::CritScope cs(&lock_);
+ if (webrtc::field_trial::FindFullName("WebRTC-SendSideBwe-WithOverhead") ==
+ "Enabled") {
+ length += transport_overhead_bytes_per_packet_;
+ }
send_time_history_.AddAndRemoveOld(sequence_number, length, probe_cluster_id);
}
@@ -73,6 +78,12 @@ void TransportFeedbackAdapter::SetMinBitrate(int min_bitrate_bps) {
delay_based_bwe_->SetMinBitrate(min_bitrate_bps);
}
+void TransportFeedbackAdapter::SetTransportOverhead(
+ int transport_overhead_bytes_per_packet) {
+ rtc::CritScope cs(&lock_);
+ transport_overhead_bytes_per_packet_ = transport_overhead_bytes_per_packet;
+}
+
int64_t TransportFeedbackAdapter::GetProbingIntervalMs() const {
rtc::CritScope cs(&bwe_lock_);
return delay_based_bwe_->GetProbingIntervalMs();
« no previous file with comments | « webrtc/modules/congestion_controller/transport_feedback_adapter.h ('k') | webrtc/modules/rtp_rtcp/include/rtp_rtcp.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698