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

Unified Diff: webrtc/modules/video_coding/sequence_number_util.h

Issue 2985283002: Unwrap picture ids in the RtpFrameReferencerFinder. (Closed)
Patch Set: Rebase Feedback Created 3 years, 4 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/video_coding/sequence_number_util.h
diff --git a/webrtc/modules/video_coding/sequence_number_util.h b/webrtc/modules/video_coding/sequence_number_util.h
index 008e5f1623681145f7714c4ea4cec54b09f2dfb6..d65be6c0ad987bc314d12f0d3411478c8c13420d 100644
--- a/webrtc/modules/video_coding/sequence_number_util.h
+++ b/webrtc/modules/video_coding/sequence_number_util.h
@@ -91,7 +91,12 @@ class SeqNumUnwrapper {
"Type unwrapped must be an unsigned integer smaller than uint64_t.");
public:
- SeqNumUnwrapper() : last_unwrapped_(0) {}
+ // The reason we use this as the default start value is because it the
+ // closest power of 10 to 2^63, and the reason we want to have a number
+ // that is a power of 10 is because it is more human readable.
stefan-webrtc 2017/09/01 07:25:09 Comment also on why we need a large start value, a
philipel 2017/09/01 08:55:46 Done.
+ static constexpr uint64_t kDefaultStartValue = 10000000000000000000UL;
+
+ SeqNumUnwrapper() : last_unwrapped_(kDefaultStartValue) {}
explicit SeqNumUnwrapper(uint64_t start_at) : last_unwrapped_(start_at) {}
uint64_t Unwrap(T value) {

Powered by Google App Engine
This is Rietveld 408576698