OSDN Git Service

Bug 5249076 When starting to stream, have at least one buffer in shared mem
authorJean-Michel Trivi <jmtrivi@google.com>
Thu, 1 Sep 2011 23:32:42 +0000 (16:32 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Fri, 2 Sep 2011 00:05:52 +0000 (17:05 -0700)
commitc7c027f9ddbe3754388a0aea55c2958ea81e664d
treec379ea5ecd9bcea624eccd2c2570a52c2ff51918
parent0cf1f6df91fa81b2f4be8ba44c762253f8d76c72
Bug 5249076 When starting to stream, have at least one buffer in shared mem

StreamPlayer is receiving notifications from the MediaPlayer that
 a buffer in shared memory is available during playback, which
 causes StreamPlayer to consume data from the AndroidBufferQueue.
 If the shared memory is drained while the player is paused, there
 will be no new notification of a buffer in shared memory being
 available to start the cycle of consumption from the Android
 buffer queue.
This change causes StreamPlayer to consume from the buffer queue
 to fill one buffer in shared memory.
A subsequent change will change the logic to make sure the
 consumption from the buffer queue fills as much of the shared
 memory as possible.

Change-Id: I886832629dd5ef449719b77899ebdcc7ffc64330
wilhelm/src/android/android_StreamPlayer.cpp
wilhelm/src/android/android_StreamPlayer.h