Index: webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h |
diff --git a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h |
index b0103b59eedca5f6b27428bbfc2cc482602296ea..766e6b7228a38c0c31f030bb6d3932e3970fcdc4 100644 |
--- a/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h |
+++ b/webrtc/modules/remote_bitrate_estimator/remote_bitrate_estimator_abs_send_time.h |
@@ -16,7 +16,9 @@ |
#include <vector> |
#include "webrtc/base/checks.h" |
+#include "webrtc/base/criticalsection.h" |
#include "webrtc/base/scoped_ptr.h" |
+#include "webrtc/base/thread_checker.h" |
#include "webrtc/modules/remote_bitrate_estimator/aimd_rate_control.h" |
#include "webrtc/modules/remote_bitrate_estimator/include/remote_bitrate_estimator.h" |
#include "webrtc/modules/remote_bitrate_estimator/inter_arrival.h" |
@@ -86,7 +88,6 @@ class RemoteBitrateEstimatorAbsSendTime : public RemoteBitrateEstimator { |
void RemoveStream(uint32_t ssrc) override; |
bool LatestEstimate(std::vector<uint32_t>* ssrcs, |
uint32_t* bitrate_bps) const override; |
- bool GetStats(ReceiveBandwidthEstimatorStats* output) const override; |
void SetMinBitrate(int min_bitrate_bps) override; |
private: |
@@ -105,46 +106,39 @@ class RemoteBitrateEstimatorAbsSendTime : public RemoteBitrateEstimator { |
uint32_t ssrc, |
bool was_paced); |
- bool IsProbe(int64_t send_time_ms, int payload_size) const |
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); |
- |
- // Triggers a new estimate calculation. |
- void UpdateEstimate(int64_t now_ms) |
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); |
- |
- void UpdateStats(int propagation_delta_ms, int64_t now_ms) |
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); |
+ void UpdateEstimate(int64_t now_ms); |
void ComputeClusters(std::list<Cluster>* clusters) const; |
std::list<Cluster>::const_iterator FindBestProbe( |
- const std::list<Cluster>& clusters) const |
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); |
+ const std::list<Cluster>& clusters) const; |
- void ProcessClusters(int64_t now_ms) |
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); |
+ // Returns true if a probe which changed the estimate was detected. |
+ bool ProcessClusters(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
bool IsBitrateImproving(int probe_bitrate_bps) const |
- EXCLUSIVE_LOCKS_REQUIRED(crit_sect_.get()); |
+ EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
+ |
+ void TimeoutStreams(int64_t now_ms) EXCLUSIVE_LOCKS_REQUIRED(&crit_); |
- rtc::scoped_ptr<CriticalSectionWrapper> crit_sect_; |
- RemoteBitrateObserver* observer_ GUARDED_BY(crit_sect_.get()); |
+ rtc::ThreadChecker network_thread_; |
pbos-webrtc
2016/02/16 13:44:34
Can you group the members that are only accessed f
stefan-webrtc
2016/02/16 14:57:16
Done.
|
+ rtc::ThreadChecker process_thread_; |
+ rtc::CriticalSection crit_; |
+ RemoteBitrateObserver* observer_; |
Clock* clock_; |
pbos-webrtc
2016/02/16 13:44:34
Clock* const
stefan-webrtc
2016/02/16 14:57:16
Done.
|
- Ssrcs ssrcs_ GUARDED_BY(crit_sect_.get()); |
- rtc::scoped_ptr<InterArrival> inter_arrival_ GUARDED_BY(crit_sect_.get()); |
- OveruseEstimator estimator_ GUARDED_BY(crit_sect_.get()); |
- OveruseDetector detector_ GUARDED_BY(crit_sect_.get()); |
- RateStatistics incoming_bitrate_ GUARDED_BY(crit_sect_.get()); |
- AimdRateControl remote_rate_ GUARDED_BY(crit_sect_.get()); |
- int64_t last_process_time_; |
- std::vector<int> recent_propagation_delta_ms_ GUARDED_BY(crit_sect_.get()); |
- std::vector<int64_t> recent_update_time_ms_ GUARDED_BY(crit_sect_.get()); |
- int64_t process_interval_ms_ GUARDED_BY(crit_sect_.get()); |
- int total_propagation_delta_ms_ GUARDED_BY(crit_sect_.get()); |
+ Ssrcs ssrcs_ GUARDED_BY(&crit_); |
+ rtc::scoped_ptr<InterArrival> inter_arrival_; |
+ OveruseEstimator estimator_; |
+ OveruseDetector detector_; |
+ RateStatistics incoming_bitrate_; |
+ AimdRateControl remote_rate_ GUARDED_BY(&crit_); |
+ std::vector<int> recent_propagation_delta_ms_; |
+ std::vector<int64_t> recent_update_time_ms_; |
std::list<Probe> probes_; |
size_t total_probes_received_; |
int64_t first_packet_time_ms_; |
+ int64_t last_update_ms_; |
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(RemoteBitrateEstimatorAbsSendTime); |
}; |