Bug 1308066 - remove mLowDataThresholdUsecs.
MozReview-Commit-ID: ZM2v6rsX2U
--- a/dom/media/MediaDecoderStateMachine.cpp
+++ b/dom/media/MediaDecoderStateMachine.cpp
@@ -1192,18 +1192,16 @@ MediaDecoderStateMachine::MediaDecoderSt
INIT_CANONICAL(mPlaybackOffset, 0),
INIT_CANONICAL(mIsAudioDataAudible, false)
{
MOZ_COUNT_CTOR(MediaDecoderStateMachine);
NS_ASSERTION(NS_IsMainThread(), "Should be on main thread.");
InitVideoQueuePrefs();
- mLowDataThresholdUsecs = detail::LOW_DATA_THRESHOLD_USECS;
-
#ifdef XP_WIN
// Ensure high precision timers are enabled on Windows, otherwise the state
// machine isn't woken up at reliable intervals to set the next frame,
// and we drop frames while painting. Note that multiple calls to this
// function per-process is OK, provided each call is matched by a corresponding
// timeEndPeriod() call.
timeBeginPeriod(1);
#endif
@@ -2461,17 +2459,17 @@ bool MediaDecoderStateMachine::OutOfDeco
return IsAudioDecoding() && !AudioQueue().IsFinished() &&
AudioQueue().GetSize() == 0 &&
!mMediaSink->HasUnplayedFrames(TrackInfo::kAudioTrack);
}
bool MediaDecoderStateMachine::HasLowBufferedData()
{
MOZ_ASSERT(OnTaskQueue());
- return HasLowBufferedData(mLowDataThresholdUsecs);
+ return HasLowBufferedData(detail::LOW_DATA_THRESHOLD_USECS);
}
bool MediaDecoderStateMachine::HasLowBufferedData(int64_t aUsecs)
{
MOZ_ASSERT(OnTaskQueue());
MOZ_ASSERT(mState >= DECODER_STATE_DECODING,
"Must have loaded first frame for mBuffered to be valid");
--- a/dom/media/MediaDecoderStateMachine.h
+++ b/dom/media/MediaDecoderStateMachine.h
@@ -641,18 +641,16 @@ private:
// The end time of the last decoded video frame. Used to check if we are low
// on decoded video data.
int64_t mDecodedVideoEndTime;
// Playback rate. 1.0 : normal speed, 0.5 : two times slower.
double mPlaybackRate;
- int64_t mLowDataThresholdUsecs;
-
// If we've got more than this number of decoded video frames waiting in
// the video queue, we will not decode any more video frames until some have
// been consumed by the play state machine thread.
// Must hold monitor.
uint32_t GetAmpleVideoFrames() const;
// Low audio threshold. If we've decoded less than this much audio we
// consider our audio decode "behind", and we may skip video decoding