This is work towards fixing bug 2228262
Specific issues fixed by this change:
+ GLThread names now include the thread id, making it easier to tell one
GLThread from another.
+ A private final static boolean LOG_THREADS can be set to true at compile
time to print out thread-related trace information, helpful for debugging
GLSurfaceView behavior. This static defaults to "false".
+ Changed calls to "notify" to "notifyAll" to make the code more
robust in case more than two threads are blocked on the same monitor.
+ Add a GLThreadManager to help manage the transition to
a new GLThread. Currently only one GLThread can be active in an address
space. When the second thread starts up, the GLThreadManager helps the old
GLThread to shut down,
+ Make sure we stop waiting for dead GLThreads. This is done by adding
checks for a variable mDone being true to our monitor wait loops. And
we use a "finally" clause at the end of GLThread.run() method to set mDone
and notifyAll any wait loops.
commit 08259dd3dc9026887f9bbfedaf45866eb56ea9bc
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 12:02:31 2009 -0800
DO NOT MERGE: Use PV for metadata extraction even if stagefright is used for playback.
commit 991832fe4dc012e51d3d9ed8d647c7f09991858f
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:24:11 2009 -0800
DO NOT MERGE: Do not assert if we encounter OMX_StateInvalid. All bets are off though.
commit cec45cf302d9218fe79956cbe8a462d7ca3a10bb
Author: Andreas Huber <andih@google.com>
Date: Mon Oct 26 16:11:54 2009 -0700
DO NOT MERGE: When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.
commit 34a1e885ef9113d68acbc26d36fcc47fdebbed84
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:10:49 2009 -0800
DO NOT MERGE: Fix heap corruptin in OMXNodeInstance.
commit 5a47f7439a1298b330541a7e4e647a8b44487388
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:08:19 2009 -0800
DO NOT MERGE: Fix seek-on-initial-read behaviour of OMXCodec.
commit 45bed64722501b9f411a2940aff5aff4cc4d2e98
Author: Andreas Huber <andih@google.com>
Date: Thu Nov 5 11:02:23 2009 -0800
DO NOT MERGE: Renaming string.h to stagefright_string.h to avoid conflicts.
commit 6738e306a50196f31a73d4fc7b7c45faff639903
Author: Andreas Huber <andih@google.com>
Date: Thu Oct 15 13:46:54 2009 -0700
DO NOT MERGE: Reimplement the OMX backend for stagefright.
Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.
Changed APIs to conform to the rest of the system.
Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error.
Do the same if start fails due to the same error after time out in obtainBuffer().
Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails.
This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash.
Same modifications for AudioRecord.
Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
Merge commit 'e33044eadfa9969e71e50d1aff165cbc436b13f3' into eclair
* commit 'e33044eadfa9969e71e50d1aff165cbc436b13f3':
Explicitly specify that online-sdk depends on framework-res. (do not merge)
The underlying issue is that ordinarily, the restore mechanism checks the
signature block of the package which uploaded the restore data against the
signature of the package on-device that will be handling the restore. This is
to ensure that the restore goes to the "same" application as the one that
uploaded it.
However, applications bundled on the system partition as part of the device
build are signed not with a permanent, app-identifying signature, but rather
with the device's signature block, which is different for each kind of device
and potentially between kinds of build for the same device. That renders the
stored backup data unusable when changing devices / builds / etc.
This change works around the problem by explicitly privileging applications that
reside on the system partition: they have been built into the device, and so
are trusted to be able to handle data that is marked as coming from its package
name.
Change-Id: I561011bce2b54cff3e695e82e7544b126b6ac31e