OSDN Git Service

Various improvements to nuplayer playback
authorAndreas Huber <andih@google.com>
Thu, 15 Sep 2011 19:25:04 +0000 (12:25 -0700)
committerAndreas Huber <andih@google.com>
Fri, 16 Sep 2011 17:44:02 +0000 (10:44 -0700)
commit078cfcf7cce9185ec7559910d08b0bc02bfc88a3
treed4fb458318a3f0b3982b05e0c79a2cfc447dd732
parent5dc2812abddde309234edc786a541d251c4f820a
Various improvements to nuplayer playback

- Drastically cut down the number of times we supply the AudioSink with data
by estimating the time until the sink would run out of data and then scheduling
a refill in advance of that.

- Use a dedicated looper for video decoders since they are currently taking
too long to return from OMX_FillThisBuffer (bug 5325201)

- Revise thread priorities for the OMX dispatcher and software codecs, instead
of running them at ANDROID_PRIORITY_AUDIO, they now only run at
ANDROID_PRIORITY_FOREGROUND

- Since threads created by pthread_create inherit all of the parent threads
attributes including thread priority, briefly reset thread priority to
ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then
restore it.

Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
12 files changed:
media/libmediaplayerservice/nuplayer/NuPlayer.cpp
media/libmediaplayerservice/nuplayer/NuPlayer.h
media/libmediaplayerservice/nuplayer/NuPlayerDecoder.cpp
media/libmediaplayerservice/nuplayer/NuPlayerDecoder.h
media/libmediaplayerservice/nuplayer/NuPlayerRenderer.cpp
media/libmediaplayerservice/nuplayer/NuPlayerRenderer.h
media/libmediaplayerservice/nuplayer/StreamingSource.cpp
media/libstagefright/ACodec.cpp
media/libstagefright/chromium_http/support.cpp
media/libstagefright/foundation/AMessage.cpp
media/libstagefright/omx/OMX.cpp
media/libstagefright/omx/SimpleSoftOMXComponent.cpp