Bug 784019 - Reduce mAmpleVideoFrames on Android so we don't starve libstagefright of gralloc buffers r=doublec

This commit is contained in:
Edwin Flores 2012-12-03 15:41:06 +13:00
parent 5d9050d369
commit e7de57f05e

View File

@ -401,11 +401,12 @@ MediaDecoderStateMachine::MediaDecoderStateMachine(MediaDecoder* aDecoder,
// If we've got more than mAmpleVideoFrames 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.
#ifdef MOZ_WIDGET_GONK
// On B2G this is decided by a similar value which varies for each OMX decoder
// |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This number must be less
// than the OMX equivalent or gecko will think it is chronically starved of
// video frames. All decoders seen so far have a value of at least 4.
#if defined(MOZ_WIDGET_GONK) || defined(MOZ_MEDIA_PLUGINS)
// On B2G and Android this is decided by a similar value which varies for
// each OMX decoder |OMX_PARAM_PORTDEFINITIONTYPE::nBufferCountMin|. This
// number must be less than the OMX equivalent or gecko will think it is
// chronically starved of video frames. All decoders seen so far have a value
// of at least 4.
mAmpleVideoFrames = Preferences::GetUint("media.video-queue.default-size", 3);
#else
mAmpleVideoFrames = Preferences::GetUint("media.video-queue.default-size", 10);