Bug 1352319. P2 - rename variables and fix comments. draft
authorJW Wang <jwwang@mozilla.com>
Tue, 28 Mar 2017 14:58:03 +0800
changeset 553978 f4396b988b8682ddf54173fa7f09b10c2bd475a1
parent 553977 055259e5d55f456ab63cf425503dcc53a827f4e7
child 553979 4a063e79a380e0ee1a5dde8f0b9166dc8c57a3f3
child 554252 f5f0102eddaaa44852868c184c718831edf946d7
push id51855
push userjwwang@mozilla.com
push dateFri, 31 Mar 2017 05:49:16 +0000
bugs1352319
milestone55.0a1
Bug 1352319. P2 - rename variables and fix comments. MozReview-Commit-ID: G7II28F00Qp
dom/media/MediaDecoderStateMachine.cpp
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -121,28 +121,28 @@ static const int AUDIO_DURATION_USECS = 
 // If we increase our "low audio threshold" (see LOW_AUDIO_THRESHOLD above), we
 // use this as a factor in all our calculations. Increasing this will cause
 // us to be more likely to increase our low audio threshold, and to
 // increase it by more.
 static const int THRESHOLD_FACTOR = 2;
 
 namespace detail {
 
-// If we have less than this much undecoded data available, we'll consider
-// ourselves to be running low on undecoded data. We determine how much
-// undecoded data we have remaining using the reader's GetBuffered()
+// If we have less than this much buffered data available, we'll consider
+// ourselves to be running low on buffered data. We determine how much
+// buffered data we have remaining using the reader's GetBuffered()
 // implementation.
-static const int64_t LOW_DATA_THRESHOLD_USECS = 5000000;
-
-static constexpr auto LOW_BUFFER_THRESHOLD = TimeUnit::FromMicroseconds(LOW_DATA_THRESHOLD_USECS);
-
-// LOW_DATA_THRESHOLD_USECS needs to be greater than AMPLE_AUDIO_USECS, otherwise
+static const int64_t LOW_BUFFER_THRESHOLD_USECS = 5000000;
+
+static constexpr auto LOW_BUFFER_THRESHOLD = TimeUnit::FromMicroseconds(LOW_BUFFER_THRESHOLD_USECS);
+
+// LOW_BUFFER_THRESHOLD_USECS needs to be greater than AMPLE_AUDIO_USECS, otherwise
 // the skip-to-keyframe logic can activate when we're running low on data.
-static_assert(LOW_DATA_THRESHOLD_USECS > AMPLE_AUDIO_USECS,
-              "LOW_DATA_THRESHOLD_USECS is too small");
+static_assert(LOW_BUFFER_THRESHOLD_USECS > AMPLE_AUDIO_USECS,
+              "LOW_BUFFER_THRESHOLD_USECS is too small");
 
 } // namespace detail
 
 // Amount of excess usecs of data to add in to the "should we buffer" calculation.
 static const uint32_t EXHAUSTED_DATA_MARGIN_USECS = 100000;
 
 static int64_t DurationToUsecs(TimeDuration aDuration)
 {