Bug 1143575. Push all available frames to the compositor. r=cpearce

This commit is contained in:
Robert O'Callahan 2015-06-15 15:24:57 +12:00
parent 13870490fd
commit f0207c4251
2 changed files with 10 additions and 1 deletions

View File

@ -171,9 +171,11 @@ static int64_t DurationToUsecs(TimeDuration aDuration) {
static const uint32_t MIN_VIDEO_QUEUE_SIZE = 3;
static const uint32_t MAX_VIDEO_QUEUE_SIZE = 10;
static const uint32_t SCARCE_VIDEO_QUEUE_SIZE = 1;
static const uint32_t VIDEO_QUEUE_SEND_TO_COMPOSITOR_SIZE = 9999;
static uint32_t sVideoQueueDefaultSize = MAX_VIDEO_QUEUE_SIZE;
static uint32_t sVideoQueueHWAccelSize = MIN_VIDEO_QUEUE_SIZE;
static uint32_t sVideoQueueSendToCompositorSize = VIDEO_QUEUE_SEND_TO_COMPOSITOR_SIZE;
MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
MediaDecoderReader* aReader,
@ -260,6 +262,9 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
Preferences::AddUintVarCache(&sVideoQueueHWAccelSize,
"media.video-queue.hw-accel-size",
MIN_VIDEO_QUEUE_SIZE);
Preferences::AddUintVarCache(&sVideoQueueSendToCompositorSize,
"media.video-queue.send-to-compositor-size",
VIDEO_QUEUE_SEND_TO_COMPOSITOR_SIZE);
}
mBufferingWait = IsRealTime() ? 0 : 15;
@ -2694,7 +2699,7 @@ void MediaDecoderStateMachine::UpdateRenderedVideoFrames()
}
}
RenderVideoFrames(1, clockTime, nowTime);
RenderVideoFrames(sVideoQueueSendToCompositorSize, clockTime, nowTime);
// Check to see if we don't have enough data to play up to the next frame.
// If we don't, switch to buffering mode.

View File

@ -490,6 +490,10 @@ pref("media.autoplay.enabled", true);
// MediaDecoderReader's mVideoQueue.
pref("media.video-queue.default-size", 10);
// The maximum number of queued frames to send to the compositor.
// By default, send all of them.
pref("media.video-queue.send-to-compositor-size", 9999);
// Whether to disable the video stats to prevent fingerprinting
pref("media.video_stats.enabled", true);