Chromium Code Reviews

Unified Diff: webrtc/modules/congestion_controller/include/congestion_controller.h

Issue 1972183004: Reland "Remove ViEEncoder::SetNetworkStatus" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Index: webrtc/modules/congestion_controller/include/congestion_controller.h
diff --git a/webrtc/modules/congestion_controller/include/congestion_controller.h b/webrtc/modules/congestion_controller/include/congestion_controller.h
index a3b672e3bc8887a203427f88a62edcb41390155a..84c18a4ae199c2a41b01f4863223e65e6a709318 100644
--- a/webrtc/modules/congestion_controller/include/congestion_controller.h
+++ b/webrtc/modules/congestion_controller/include/congestion_controller.h
@@ -95,10 +95,12 @@ class CongestionController : public CallStatsObserver, public Module {
private:
void Init();
void MaybeTriggerOnNetworkChanged();
- // Updates |send_queue_is_full_|. Returns true if |send_queue_is_full_|
- // has changed.
- bool UpdateSendQueueStatus(bool send_queue_is_full);
+ bool IsSendQueueFull() const;
+ bool IsNetworkDown() const;
+ bool HasNetworkParametersToReportChanged(uint32_t bitrate_bps,
+ uint8_t fraction_loss,
+ int64_t rtt);
Clock* const clock_;
Observer* const observer_;
const std::unique_ptr<PacketRouter> packet_router_;
@@ -109,7 +111,10 @@ class CongestionController : public CallStatsObserver, public Module {
TransportFeedbackAdapter transport_feedback_adapter_;
int min_bitrate_bps_;
rtc::CriticalSection critsect_;
- bool send_queue_is_full_ GUARDED_BY(critsect_);
+ uint32_t last_reported_bitrate_bps_ GUARDED_BY(critsect_);
+ uint8_t last_reported_fraction_loss_ GUARDED_BY(critsect_);
+ int64_t last_reported_rtt_ GUARDED_BY(critsect_);
+ NetworkState network_state_ GUARDED_BY(critsect_);
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(CongestionController);
};

Powered by Google App Engine