Bug 760336 - Set nsBuiltinDecoderStateMachine::mBufferingWait to be seconds instead of milliseconds r=chris.double

This commit is contained in:
Paul Adenot 2012-06-07 11:43:25 +12:00
Родитель 54b22ecf27
Коммит b0f37bebdc
2 изменённых файлов: 5 добавлений и 3 удалений

Просмотреть файл

@ -30,10 +30,10 @@ extern PRLogModuleInfo* gBuiltinDecoderLog;
#define LOG(type, msg)
#endif
// Wait this number of milliseconds when buffering, then leave and play
// Wait this number of seconds when buffering, then leave and play
// as best as we can if the required amount of data hasn't been
// retrieved.
static const PRUint32 BUFFERING_WAIT = 30000;
static const PRUint32 BUFFERING_WAIT_S = 30;
// If audio queue has less than this many usecs of decoded audio, we won't risk
// trying to decode the video, we'll skip decoding video up to the next
@ -417,7 +417,7 @@ nsBuiltinDecoderStateMachine::nsBuiltinDecoderStateMachine(nsBuiltinDecoder* aDe
if (Preferences::GetBool("media.realtime_decoder.enabled", false) == false)
mRealTime = false;
mBufferingWait = mRealTime ? 0 : BUFFERING_WAIT;
mBufferingWait = mRealTime ? 0 : BUFFERING_WAIT_S;
mLowDataThresholdUsecs = mRealTime ? 0 : LOW_DATA_THRESHOLD_USECS;
}

Просмотреть файл

@ -647,6 +647,8 @@ protected:
// created. Synchronized by the decoder monitor.
bool mRequestedNewDecodeThread;
// The maximum number of second we spend buffering when we are short on
// unbuffered data.
PRUint32 mBufferingWait;
PRInt64 mLowDataThresholdUsecs;