OSDN Git Service

Fix issues in GenericPlayer destruction
authorJean-Michel Trivi <jmtrivi@google.com>
Tue, 28 Jun 2011 00:37:58 +0000 (17:37 -0700)
committerJean-Michel Trivi <jmtrivi@google.com>
Thu, 30 Jun 2011 17:21:53 +0000 (10:21 -0700)
commit1209c173a13a62d0f7d9f1d605e3665a5818fa90
tree46d8595a9f943e49879aadebd9b577a5bc900bbf
parentd8c101550ed4a1829aff07164da0d65615c4a88c
Fix issues in GenericPlayer destruction

Added a preDestroy() mechanism for the subclasses of
 GenericPlayer.
Added a lock around the update and use of the callback
 GenericPlayer is using for notifications to the
 OpenSL ES framework. This prevents notifications after
 the GenericPlayer is flagged for destruction.
Added a lock to protect the update of the audio source
 running state, so it doesn't get used after the
 AudioSfDecoder is flagged for destruction.
Before stopping the audio source of an AudioSfDecoder
 object, release the code buffer if necessary, to
 ensure proper teardown of the audio source (OMXCodec)

Change-Id: I6cf08d169a6da622552dda5101dbc61e663ce6aa
wilhelm/src/android/AudioPlayer_to_android.cpp
wilhelm/src/android/android_AudioSfDecoder.cpp
wilhelm/src/android/android_AudioSfDecoder.h
wilhelm/src/android/android_AudioToCbRenderer.cpp
wilhelm/src/android/android_GenericPlayer.cpp
wilhelm/src/android/android_GenericPlayer.h