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

Unified Diff: media/cast/sender/frame_sender.h

Issue 532373003: [Cast] RTT clean-up to the max! (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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: media/cast/sender/frame_sender.h
diff --git a/media/cast/sender/frame_sender.h b/media/cast/sender/frame_sender.h
index 6cf02f563be0925a380b2ec6ae1627261695b290..4e38be0b210e44ecbd5479b41edb37d61adc9ae1 100644
--- a/media/cast/sender/frame_sender.h
+++ b/media/cast/sender/frame_sender.h
@@ -43,12 +43,15 @@ class FrameSender {
void ScheduleNextRtcpReport();
void SendRtcpReport(bool schedule_future_reports);
- void OnReceivedRtt(base::TimeDelta rtt,
- base::TimeDelta avg_rtt,
- base::TimeDelta min_rtt,
- base::TimeDelta max_rtt);
+ void OnMeasuredRoundTripTime(base::TimeDelta rtt);
- bool is_rtt_available() const { return rtt_available_; }
+ bool is_rtt_available() const {
+ return current_round_trip_time_ > base::TimeDelta();
+ }
+
+ base::TimeDelta current_round_trip_time() const {
+ return current_round_trip_time_;
+ }
const scoped_refptr<CastEnvironment> cast_environment_;
@@ -61,12 +64,6 @@ class FrameSender {
const uint32 ssrc_;
- // RTT information from RTCP.
- bool rtt_available_;
- base::TimeDelta rtt_;
- base::TimeDelta avg_rtt_;
- base::TimeDelta min_rtt_;
- base::TimeDelta max_rtt_;
protected:
// Schedule and execute periodic checks for re-sending packets. If no
@@ -147,6 +144,9 @@ class FrameSender {
base::TimeTicks frame_reference_times_[256];
RtpTimestamp frame_rtp_timestamps_[256];
+ // The most recently measured round trip time.
+ base::TimeDelta current_round_trip_time_;
+
// NOTE: Weak pointers must be invalidated before all other member variables.
base::WeakPtrFactory<FrameSender> weak_factory_;

Powered by Google App Engine
This is Rietveld 408576698