зеркало из https://github.com/mozilla/gecko-dev.git
Bug 760336 - Set nsBuiltinDecoderStateMachine::mBufferingWait to be seconds instead of milliseconds r=chris.double
This commit is contained in:
Родитель
54b22ecf27
Коммит
b0f37bebdc
|
@ -30,10 +30,10 @@ extern PRLogModuleInfo* gBuiltinDecoderLog;
|
||||||
#define LOG(type, msg)
|
#define LOG(type, msg)
|
||||||
#endif
|
#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
|
// as best as we can if the required amount of data hasn't been
|
||||||
// retrieved.
|
// 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
|
// 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
|
// 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)
|
if (Preferences::GetBool("media.realtime_decoder.enabled", false) == false)
|
||||||
mRealTime = false;
|
mRealTime = false;
|
||||||
|
|
||||||
mBufferingWait = mRealTime ? 0 : BUFFERING_WAIT;
|
mBufferingWait = mRealTime ? 0 : BUFFERING_WAIT_S;
|
||||||
mLowDataThresholdUsecs = mRealTime ? 0 : LOW_DATA_THRESHOLD_USECS;
|
mLowDataThresholdUsecs = mRealTime ? 0 : LOW_DATA_THRESHOLD_USECS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -647,6 +647,8 @@ protected:
|
||||||
// created. Synchronized by the decoder monitor.
|
// created. Synchronized by the decoder monitor.
|
||||||
bool mRequestedNewDecodeThread;
|
bool mRequestedNewDecodeThread;
|
||||||
|
|
||||||
|
// The maximum number of second we spend buffering when we are short on
|
||||||
|
// unbuffered data.
|
||||||
PRUint32 mBufferingWait;
|
PRUint32 mBufferingWait;
|
||||||
PRInt64 mLowDataThresholdUsecs;
|
PRInt64 mLowDataThresholdUsecs;
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче