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

Unified Diff: webrtc/modules/remote_bitrate_estimator/inter_arrival.h

Issue 2126793002: Reset InterArrival if arrival time clock makes a jump. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Cleanup Created 4 years, 5 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/remote_bitrate_estimator/inter_arrival.h
diff --git a/webrtc/modules/remote_bitrate_estimator/inter_arrival.h b/webrtc/modules/remote_bitrate_estimator/inter_arrival.h
index 427bafcf96ffaedea1ce6ffca4ab8c56635b54f4..bb8d4d93d7b8e9493a68c62cbde90f58168326b5 100644
--- a/webrtc/modules/remote_bitrate_estimator/inter_arrival.h
+++ b/webrtc/modules/remote_bitrate_estimator/inter_arrival.h
@@ -40,6 +40,7 @@ class InterArrival {
// |packet_size_delta| (output) is the computed size delta.
bool ComputeDeltas(uint32_t timestamp,
int64_t arrival_time_ms,
+ int64_t system_time_ms,
size_t packet_size,
uint32_t* timestamp_delta,
int64_t* arrival_time_delta_ms,
@@ -61,6 +62,7 @@ class InterArrival {
uint32_t first_timestamp;
uint32_t timestamp;
int64_t complete_time_ms;
+ int64_t last_system_time_ms;
};
// Returns true if the packet with timestamp |timestamp| arrived in order.
@@ -72,11 +74,14 @@ class InterArrival {
bool BelongsToBurst(int64_t arrival_time_ms, uint32_t timestamp) const;
+ void Reset();
+
const uint32_t kTimestampGroupLengthTicks;
TimestampGroup current_timestamp_group_;
TimestampGroup prev_timestamp_group_;
double timestamp_to_ms_coeff_;
bool burst_grouping_;
+ int num_consecutive_reordered_packets_;
RTC_DISALLOW_IMPLICIT_CONSTRUCTORS(InterArrival);
};

Powered by Google App Engine
This is Rietveld 408576698