OSDN Git Service

android-x86/system-media.git
12 years agoMerge "Improved deadlock detection logs." into ics-mr0
Glenn Kasten [Fri, 14 Oct 2011 19:40:31 +0000 (12:40 -0700)]
Merge "Improved deadlock detection logs." into ics-mr0

12 years agoMerge "Bug 5267571 disable callbacks earlier" into ics-mr0
Glenn Kasten [Fri, 14 Oct 2011 19:40:28 +0000 (12:40 -0700)]
Merge "Bug 5267571 disable callbacks earlier" into ics-mr0

12 years agoBug 5383077: Add callback to finalize media when recording of video with effects...
Rodrigo Carceroni [Fri, 14 Oct 2011 00:32:28 +0000 (17:32 -0700)]
Bug 5383077: Add callback to finalize media when recording of video with effects is done.

Change-Id: Ib767195e0089abd03e3b34f95f40499ee3226a48

12 years agoBug 5267571 disable callbacks earlier
Glenn Kasten [Fri, 14 Oct 2011 17:06:23 +0000 (10:06 -0700)]
Bug 5267571 disable callbacks earlier

Change-Id: I0da3b85dcce93a8a250b8b225a998b80d92f436b

12 years agoMerge "Fixing crash in video capture intent with effects on" into ics-mr0
Pannag Sanketi [Fri, 14 Oct 2011 17:04:19 +0000 (10:04 -0700)]
Merge "Fixing crash in video capture intent with effects on" into ics-mr0

12 years agoFixing crash in video capture intent with effects on
Pannag Sanketi [Fri, 14 Oct 2011 00:04:48 +0000 (17:04 -0700)]
Fixing crash in video capture intent with effects on

The video capture intent sends an uri and not a filename. Adding
support in the MediaencoderFilter for uri. The filter
passes that on to the MediaRecorder.

Related to bug: 5441217

Change-Id: I95a12e94e3705c00c3bbc0d375eba7844dd300b5

12 years agoMerge "Fixing a bug in gl_env release surface" into ics-mr0
Pannag Sanketi [Thu, 13 Oct 2011 17:31:51 +0000 (10:31 -0700)]
Merge "Fixing a bug in gl_env release surface" into ics-mr0

12 years agoFixing a bug in gl_env release surface
Pannag Sanketi [Thu, 13 Oct 2011 01:06:41 +0000 (18:06 -0700)]
Fixing a bug in gl_env release surface

While recording in camera with the effects on, there was a bug in releasing
a surface. The possible memory corruption was due to erasing
the surface-window pair in the map before destroying the surface and its associated
window handle.
Also, fixed a bit of nomenclature in the related functions.

Related to bug: 5373197

Change-Id: Ie861e5ce87cde8909c5680897cdfddafeba5e507

12 years agoImproved deadlock detection logs.
Glenn Kasten [Fri, 29 Jul 2011 19:57:39 +0000 (12:57 -0700)]
Improved deadlock detection logs.

This should make it easier to debug the "object was locked by" logs.

Display tid and pthread_t of both the lock owner and the caller in the
"object was locked by" warning log about potential deadlocks.
This makes it easier to figure out what's going on with ps -t
which only shows the tid not the pthread_t.

Reduce false positives by using a generation counter to look for forward
progress, at the risk of increasing the chance of more false negatives.

Use lock with timeout to reduce chance of missing an "unlocked" window.

Change-Id: I15e158a20d7076624188110842a01c1bf2c5c8ae

12 years agoSupport for MediaRecorder stop exception in Camera
Pannag Sanketi [Tue, 11 Oct 2011 01:38:53 +0000 (18:38 -0700)]
Support for MediaRecorder stop exception in Camera

When the user of camera app presses "start" and "stop" very quickly with
the effects on, the MediaRecorder stop throws an exception since no
frames could be recorded before the user pressed stop. The
filterframework needs to take care of this issue separately as compared
to other RunTimeExceptions.

Related to bugs 5443546 and 5373197

Change-Id: I227fd1a81cbf9e48032e100111a896ffb691bf0c

12 years agoMerge "Multithread safety and code reduction"
Glenn Kasten [Tue, 11 Oct 2011 00:51:19 +0000 (17:51 -0700)]
Merge "Multithread safety and code reduction"

12 years agoMultithread safety and code reduction
Glenn Kasten [Fri, 30 Sep 2011 21:14:37 +0000 (14:14 -0700)]
Multithread safety and code reduction

Remove unsafe GenericPlayer::getSampleRate().  getSampleRate() was not
thread-safe as it accessed a member variable updated in the looper thread
without a lock.  If getSampleRate() is ever needed again, the sample rate
is available in the mPcmFormatValues array, which does have a lock.

Replace member variables mChannelMask, mChannelCount, and mSampleRateHz
by local variables for locality and performance.

Change-Id: Ibf92ed090430153d748ded4d0b835e429df47eea

12 years agoMerge "Khronos bug 8080 GetMarkerPosition"
Glenn Kasten [Tue, 11 Oct 2011 00:21:47 +0000 (17:21 -0700)]
Merge "Khronos bug 8080 GetMarkerPosition"

12 years agoMerge "Bug 5293383 ~StreamSourceAppProxy wasn't reached"
Glenn Kasten [Mon, 10 Oct 2011 23:50:51 +0000 (16:50 -0700)]
Merge "Bug 5293383 ~StreamSourceAppProxy wasn't reached"

12 years agoMerge "EnvironmentalReverb::SetDensity copy/paste"
Glenn Kasten [Mon, 10 Oct 2011 19:01:56 +0000 (12:01 -0700)]
Merge "EnvironmentalReverb::SetDensity copy/paste"

12 years agoMerge "AudioPlayer kEventPrepared"
Glenn Kasten [Mon, 10 Oct 2011 19:01:34 +0000 (12:01 -0700)]
Merge "AudioPlayer kEventPrepared"

12 years agoMerge "Khronos CT PresetReverb::GetPreset"
Glenn Kasten [Mon, 10 Oct 2011 19:01:02 +0000 (12:01 -0700)]
Merge "Khronos CT PresetReverb::GetPreset"

12 years agoBug 5293383 ~StreamSourceAppProxy wasn't reached
Glenn Kasten [Mon, 12 Sep 2011 14:26:34 +0000 (07:26 -0700)]
Bug 5293383 ~StreamSourceAppProxy wasn't reached

Fix bug where StreamSourceAppProxy destructor wasn't reached,
which caused all sorts of other problems later on.  To see this,
enable the logs StreamSourceAppProxy::~StreamSourceAppProxy and
StreamPlayer::~StreamPlayer.  You'll see that StreamPlayer was destroyed,
but not StreamSourceAppProxy.

As StreamSourceAppProxy is child of StreamPlayer, make the reference
from StreamSourceAppProxy to StreamPlayer a weak reference in case
StreamSourceAppProxy's lifetime exceeds StreamPlayer.  It is not supposed
to any more with this fix, but the wp<> provides extra safety.

StreamPlayer preDestroy no longer bypasses the preDestroy in
GenericMediaPlayer.

Do a full disconnect in GenericMediaPlayer::preDestroy.

Push decremented reference counts for strong pointer through binder
to workaround binder's "optimization".

Extra error-checking in setListener and setBuffers to verify
that mediaserver is calling them correctly.

Use mutex mLock consistently in StreamSourceAppProxy.

Add an explicit StreamSourceAppProxy::disconnect to break
a circular reference, and call it in StreamPlayer destructor.

Make methods private: receivedCmd_l and receivedBuffer_l.

Add explicit clear during preDestroy to give up references earlier.

Warning: setDataSource(NULL) is not supported by NuPlayer yet,
this depends on another change in frameworks/base, so it is
commented out for now.

Rename mPlayerPrepared to mPreparedPlayer to avoid confusion with the
enum mPlayerPrepared.

Change-Id: Ie5f554c206027d22204eb86edd15489c6281b512

12 years agoMerge "Fix typos in usage: requires local filename"
Glenn Kasten [Mon, 10 Oct 2011 18:44:43 +0000 (11:44 -0700)]
Merge "Fix typos in usage: requires local filename"

12 years agoMerge "Bug 5406664 workaround GetPosition for decode"
Glenn Kasten [Mon, 10 Oct 2011 18:36:41 +0000 (11:36 -0700)]
Merge "Bug 5406664 workaround GetPosition for decode"

12 years agoBug 5406664 workaround GetPosition for decode
Glenn Kasten [Mon, 3 Oct 2011 22:48:59 +0000 (15:48 -0700)]
Bug 5406664 workaround GetPosition for decode

Change-Id: I6158108a8ca192f704558caca2006bf704c80d6e

12 years agoKhronos bug 8080 GetMarkerPosition
Glenn Kasten [Fri, 30 Sep 2011 00:56:00 +0000 (17:56 -0700)]
Khronos bug 8080 GetMarkerPosition

Play::GetMarkerPosition returns SL_RESULT_PRECONDITIONS_VIOLATED
if no marker is set.  Play::SetMarkerPosition returns
SL_RESULT_PARAMETER_INVALID is parameter is SL_TIME_UNKNOWN.  Similar
changes for Record, and also bring in all the recent changes from Play.
Add missing curly brackets.

Change-Id: Ibcfdcab5d4342815fe8d0fb1174053e1599aaf5d

12 years agoMerge "Fix bug 5374629 Can't create AudioPlayer playing from MP2TS ABQ"
Jean-Michel Trivi [Mon, 10 Oct 2011 17:23:54 +0000 (10:23 -0700)]
Merge "Fix bug 5374629 Can't create AudioPlayer playing from MP2TS ABQ"

12 years agoMerge "Don't update prepare state more than once"
Glenn Kasten [Mon, 10 Oct 2011 16:44:54 +0000 (09:44 -0700)]
Merge "Don't update prepare state more than once"

12 years agoMerge "Reduce log spam from callback protectors"
Glenn Kasten [Mon, 10 Oct 2011 16:44:38 +0000 (09:44 -0700)]
Merge "Reduce log spam from callback protectors"

12 years agoEnvironmentalReverb::SetDensity copy/paste
Glenn Kasten [Thu, 6 Oct 2011 18:43:45 +0000 (11:43 -0700)]
EnvironmentalReverb::SetDensity copy/paste

There was a missing assignment to the density field

Change-Id: I0dc3332da04b0d3f569625781258df560a89f3b9

12 years agoKhronos CT PresetReverb::GetPreset
Glenn Kasten [Thu, 6 Oct 2011 18:55:56 +0000 (11:55 -0700)]
Khronos CT PresetReverb::GetPreset

OpenSL ES 1.0.1 spec and conformance test do not permit result to
be SL_RESULT_CONTROL_LOST.  They say that even if control is lost,
PresetReverb::GetPreset should return the last known preset value.

Change-Id: I11fa6434d35b8e32c660f13f6d96c1db5193bedf

12 years agoAudioPlayer kEventPrepared
Glenn Kasten [Fri, 30 Sep 2011 18:33:45 +0000 (11:33 -0700)]
AudioPlayer kEventPrepared

Combine execution paths for successful and unsucccessful paths of
android::GenericPlayer::kEventPrepared: for AudioPlayer to make it easier
to see the similarities and differences (and make some other changes soon).

Remove old asserts.

Change-Id: I59304d368a9b7611f2a16c1c687cf8d827526b58

12 years agoFix typos in usage: requires local filename
Glenn Kasten [Mon, 3 Oct 2011 19:53:34 +0000 (12:53 -0700)]
Fix typos in usage: requires local filename

Change-Id: I6061757f3919718fc2b4da9392e37ed2c795f8b5

12 years agoAdd input region support to MediaEncoderFilter.
Eino-Ville Talvala [Tue, 4 Oct 2011 22:24:15 +0000 (15:24 -0700)]
Add input region support to MediaEncoderFilter.

This allows the recording to use a different crop/flip/rotate of the
input video than the rest of the pipeline. Placed directly into the
filter for efficiency.

Bug: 5408479
Change-Id: Iac7fcba79a5c0e059f0add4d9e37815d27c1c973

12 years agoMerge "Bug 5385386 missing HEADATNEWPOS"
Glenn Kasten [Tue, 4 Oct 2011 19:11:59 +0000 (12:11 -0700)]
Merge "Bug 5385386 missing HEADATNEWPOS"

12 years agoMerge "Bug 5161265 Error recovery getting video codecs"
Glenn Kasten [Tue, 4 Oct 2011 19:11:37 +0000 (12:11 -0700)]
Merge "Bug 5161265 Error recovery getting video codecs"

12 years agoMerge "Updates to frame transform handling in several source filters."
Eino-Ville Talvala [Tue, 4 Oct 2011 18:32:32 +0000 (11:32 -0700)]
Merge "Updates to frame transform handling in several source filters."

12 years agoDon't update prepare state more than once
Glenn Kasten [Tue, 4 Oct 2011 00:19:50 +0000 (17:19 -0700)]
Don't update prepare state more than once

If a MEDIA_ERROR event is received during preparation, it indicates
that prepare has completed unsuccessfully.  However, MEDIA_ERROR can
also legitimately be sent after successful prepare. In that case, don't
update the prepare state.

Similarly, in the unlikely case that MEDIA_PREPARED is received after
prepare has already completed successfully or unsuccessfully, ignore it.
This probably indicates a buggy mediaserver, but we wouldn't want that
to take down the client also.

Change-Id: I2a92e98d13b70d1aa5ff6f440ad528f6896a2ead

12 years agoReduce log spam from callback protectors
Glenn Kasten [Mon, 3 Oct 2011 23:02:25 +0000 (16:02 -0700)]
Reduce log spam from callback protectors

Change-Id: I83f40370bf86878e6d8dcabfff3847cab2cbbd6c

12 years agoUpdates to frame transform handling in several source filters.
Eino-Ville Talvala [Sat, 1 Oct 2011 00:53:58 +0000 (17:53 -0700)]
Updates to frame transform handling in several source filters.

- Affects Camera, Media, and SurfaceTextureSource
- Pre-transform source rectangle instead of doing a fragment shader
  texture coordinate multiply for each pixel. Bug: 5318657
- Add output orientation port to MediaSource. Bug: 5355973

Change-Id: I446a1f0afd64f06638d17010d81c7fc838612feb

12 years agoMerge "make BlendFilter use alpha. Part of the fix to:"
Ruei-sung Lin [Mon, 3 Oct 2011 21:30:26 +0000 (14:30 -0700)]
Merge "make BlendFilter use alpha. Part of the fix to:"

12 years agomake BlendFilter use alpha.
Ruei-sung Lin [Mon, 3 Oct 2011 18:14:54 +0000 (11:14 -0700)]
make BlendFilter use alpha.
Part of the fix to:

bug: 5404277

Change-Id: Ie08f769e4b75770948b1d49a435caa8045b05df6

12 years agoMerge "Update the URI slow-down (playback rate) test"
Glenn Kasten [Mon, 3 Oct 2011 20:34:18 +0000 (13:34 -0700)]
Merge "Update the URI slow-down (playback rate) test"

12 years agoMerge "Additional fixes for bug 5357970: Handle exceptions in async runner."
Marius Renn [Mon, 3 Oct 2011 16:26:23 +0000 (09:26 -0700)]
Merge "Additional fixes for bug 5357970: Handle exceptions in async runner."

12 years agoMerge "Bug 5399251 notify on AAC decode prepare success"
Glenn Kasten [Mon, 3 Oct 2011 14:15:08 +0000 (07:15 -0700)]
Merge "Bug 5399251 notify on AAC decode prepare success"

12 years agoMerge "Remove dead code"
Glenn Kasten [Fri, 30 Sep 2011 22:56:10 +0000 (15:56 -0700)]
Merge "Remove dead code"

12 years agoBug 5399251 notify on AAC decode prepare success
Glenn Kasten [Fri, 30 Sep 2011 22:22:52 +0000 (15:22 -0700)]
Bug 5399251 notify on AAC decode prepare success

Change-Id: I35715be7812c6fe671f74afb7a92ebe60b4a6710

12 years agoFix bug 5374629 Can't create AudioPlayer playing from MP2TS ABQ
Jean-Michel Trivi [Fri, 30 Sep 2011 21:32:23 +0000 (14:32 -0700)]
Fix bug 5374629 Can't create AudioPlayer playing from MP2TS ABQ

An AudioPlayer playing audio coming from MP2TS data stored in an
 AndroidBufferQueue couldn't be created and realized anymore due
 to:
  - a regression that prevented an OutputMix to be used as the
    sink of an AudioPlayer that had an ABQ as a data source
  - a missing update when the Realize() method became fully
    locked on the object, android_audioPlayer_realize() was
    still trying to lock the already locked AudioPlayer.
Both issues are covered by a CTS test.

Also verify the SLSeekItf is not required when using an ABQ
 source.

Change-Id: Ibb1b753dcce59b7cf23ba118e287349e00e7fff4

12 years agoMerge "Bug 5334969 MediaPlayerNotificationClient safety"
Glenn Kasten [Fri, 30 Sep 2011 15:07:04 +0000 (08:07 -0700)]
Merge "Bug 5334969 MediaPlayerNotificationClient safety"

12 years agoBug 5161265 Error recovery getting video codecs
Glenn Kasten [Thu, 29 Sep 2011 22:24:46 +0000 (15:24 -0700)]
Bug 5161265 Error recovery getting video codecs

Retry if mediaserver happens to be down when asking for OMX codecs.
Use IMediaDeathNotifier::getMediaPlayerService which tries a few times.

Change-Id: Ibeb69c82303f35fbc9e5948997f568e816721328

12 years agoRemove dead code
Glenn Kasten [Wed, 28 Sep 2011 00:02:37 +0000 (17:02 -0700)]
Remove dead code

Change-Id: Ic68d4d7b942ef99120ad30ee3ef7ce48ff1d697a

12 years agoBug 5385386 missing HEADATNEWPOS
Glenn Kasten [Thu, 29 Sep 2011 21:34:13 +0000 (14:34 -0700)]
Bug 5385386 missing HEADATNEWPOS

Workaround for mediaserver bug where it does not send MEDIA_SEEK_COMPLETE
to the MediaPlayerNotifier after a discontinuity is processed.

Instead, we simulate a seek complete event in this case.
A short delay is applied to compensate for shared memory latency.

A longer-term fix will be to have mediaserver send the event.

Change-Id: Id0d01b842a145fa5762d44f03144741152f7b03f

12 years agoAdditional fixes for bug 5357970: Handle exceptions in async runner.
Marius Renn [Thu, 29 Sep 2011 16:41:52 +0000 (09:41 -0700)]
Additional fixes for bug 5357970: Handle exceptions in async runner.

The AsyncRunner now attempts to deactivate the GL context when an error
occurs.

Also, a minor patch to error reporting that has been causing some
confusion lately.

Change-Id: I1e18b5611cf5c048ef83a4659be221e02accd69f

12 years agoRelax format checking in BackDropperFilter.
Eino-Ville Talvala [Wed, 14 Sep 2011 19:09:38 +0000 (12:09 -0700)]
Relax format checking in BackDropperFilter.

This format check should restrict to GPUs, but to allow source filters with
initially unspecified targets to connect to the filter, relax the check to
be any target.

Bug: 5299669
Change-Id: I1a54be793c68ac81dd36b111daf8d463c7d1e486

12 years agoUpdate the URI slow-down (playback rate) test
Glenn Kasten [Wed, 3 Aug 2011 15:34:01 +0000 (08:34 -0700)]
Update the URI slow-down (playback rate) test

Use prefetch status callback to detect bad URI and signal to main thread.
Check return value of GetFillLevel and GetPrefetchStatus.
Display rate capabilities in a nicely formatted way.
Fix compile warnings.

Change-Id: I3f96ceb72a7a17ffe3dbcdcbda7053b3e736eb12

12 years agoRemove dead code
Glenn Kasten [Fri, 16 Sep 2011 22:36:21 +0000 (15:36 -0700)]
Remove dead code

AudioPlayback_Parameters fields trackcb and trackcbUser
audioTrack_callBack_uri
android_Player_androidBufferQueue_registerCallback_l
GenericPlayer field mLooperPriority
StreamPlayer::registerQueueCallback
CAudioPlayer::mpLock
AudioSfDecoder::startPrefetch_async
IAndroidBufferQueue does not support AudioRecorder object
android/BufferQueueSource.h #include

Change-Id: I9d7cef243167e10279df452e7c62e66d8f5fe3b6

12 years agoMerge "Use prefetch for error handling in mutesolo test"
Glenn Kasten [Tue, 27 Sep 2011 16:18:39 +0000 (09:18 -0700)]
Merge "Use prefetch for error handling in mutesolo test"

12 years agoMerge "AAC decoder test"
Glenn Kasten [Tue, 27 Sep 2011 16:06:17 +0000 (09:06 -0700)]
Merge "AAC decoder test"

12 years agoUse prefetch for error handling in mutesolo test
Glenn Kasten [Mon, 13 Jun 2011 18:28:45 +0000 (11:28 -0700)]
Use prefetch for error handling in mutesolo test

Change-Id: I526da804bd7f47b124d0aff3a47b1888fde3642f

12 years agoAAC decoder test
Glenn Kasten [Fri, 2 Sep 2011 20:06:57 +0000 (13:06 -0700)]
AAC decoder test

Record and display statistics on AAC frame sizes.
Record and display the number of buffer queue completions.
Make it optional whether to create a .raw file with PCM data.
Enable and display play events: HEADATMARKER and HEADATNEWPOS.
Add option to pause in middle of decoding.

Change-Id: Iaaa37337260cd061a13f942f6b5c07d7611b13a7

12 years agoMerge "Check result of GetFillLevel and GetPrefetchStatus"
Glenn Kasten [Tue, 27 Sep 2011 15:21:01 +0000 (08:21 -0700)]
Merge "Check result of GetFillLevel and GetPrefetchStatus"

12 years agoMerge "Return after prefetch error in get position test"
Glenn Kasten [Tue, 27 Sep 2011 14:59:03 +0000 (07:59 -0700)]
Merge "Return after prefetch error in get position test"

12 years agoMerge "Decode to buffer queue test updates"
Glenn Kasten [Tue, 27 Sep 2011 14:25:26 +0000 (07:25 -0700)]
Merge "Decode to buffer queue test updates"

12 years agoMerge "Bug 5365486 GetVideoDecoderCapabilities"
Glenn Kasten [Mon, 26 Sep 2011 18:25:11 +0000 (11:25 -0700)]
Merge "Bug 5365486 GetVideoDecoderCapabilities"

12 years agoBug 5369977 check required interface compatibility
Glenn Kasten [Wed, 21 Sep 2011 16:03:14 +0000 (09:03 -0700)]
Bug 5369977 check required interface compatibility

Use required not exposed in checkSourceSinkVsInterfacesCompatibility.

Change-Id: Ib71826b989ddef2e87dd60bec0306ca2a4021fe3

12 years agoCheck result of GetFillLevel and GetPrefetchStatus
Glenn Kasten [Mon, 22 Aug 2011 15:23:44 +0000 (08:23 -0700)]
Check result of GetFillLevel and GetPrefetchStatus

Change-Id: I07e962526215cbfe6ecf39bd8d0029e2b345bef3

12 years agoReturn after prefetch error in get position test
Glenn Kasten [Fri, 29 Jul 2011 19:56:08 +0000 (12:56 -0700)]
Return after prefetch error in get position test

Change-Id: I7de1ddd05e4d2115dc54215d62f8af76f6c352ff

12 years agoDecode to buffer queue test updates
Glenn Kasten [Fri, 2 Sep 2011 22:41:23 +0000 (15:41 -0700)]
Decode to buffer queue test updates

Decrease frequency of decoder PCM buffer queue callback;
  only display a line every 1000 PCM buffers.
Check result code returned by GetFillLevel and GetPrefetchStatus.
Share common call to GetPosition in DecProgressCallback for all HEAD* events.
Print error messages to stderr.

Change-Id: I088f7792c80693aa7742bfad36df1fada02fe1a4

12 years agoBug 5365486 GetVideoDecoderCapabilities
Glenn Kasten [Sat, 24 Sep 2011 00:26:19 +0000 (17:26 -0700)]
Bug 5365486 GetVideoDecoderCapabilities

If OMX IL implementation reports a codec with 0 profile/level
combinations, it should not be an error for the application to query
the number of profile/level combinations.

Change-Id: I6838ba1168da70a5c5e7d5a2832ec3ee1ee9aef3

12 years agoMerge "Fix for 5357970: Handle exceptions in AsyncRunner."
Marius Renn [Fri, 23 Sep 2011 20:52:29 +0000 (13:52 -0700)]
Merge "Fix for 5357970: Handle exceptions in AsyncRunner."

12 years agoBug 5267593 Workaround for crash at Destroy
Glenn Kasten [Thu, 22 Sep 2011 20:46:23 +0000 (13:46 -0700)]
Bug 5267593 Workaround for crash at Destroy

Call IMediaPlayer->stop() from ALooper thread for now, as NuPlayerDriver
does not currently support multi-threaded clients.  This fix should be
reverted after NuPlayerDriver is multi-thread safe.

Change-Id: I94dc91bdcc9f840f50c3ed831aa6e15e09a0f96e

12 years agoMerge "parameter change according to api"
Ruei-sung Lin [Thu, 22 Sep 2011 23:56:08 +0000 (16:56 -0700)]
Merge "parameter change according to api"

12 years agoFix for 5357970: Handle exceptions in AsyncRunner.
Marius Renn [Thu, 22 Sep 2011 19:28:47 +0000 (12:28 -0700)]
Fix for 5357970: Handle exceptions in AsyncRunner.

The AsyncRunner now stores exceptions that occurred during runtime, and
passes them back as part of the result. Applications can choose to throw
this exception or deal otherwise.

This affects all applications using AsyncRunners.

Change-Id: I2685e4cfc56d7984425a3c3a8a3ac8cfe83bc8d2

12 years agoMerge "Use async notify everywhere"
Glenn Kasten [Thu, 22 Sep 2011 18:44:30 +0000 (11:44 -0700)]
Merge "Use async notify everywhere"

12 years agoparameter change according to api
Ruei-sung Lin [Thu, 15 Sep 2011 09:26:58 +0000 (17:26 +0800)]
parameter change according to api

Change-Id: I189cca762b80ba45b5322121b57e8c13b82a4811

12 years agoBug 5090073 Callback protectors
Glenn Kasten [Mon, 12 Sep 2011 17:23:54 +0000 (10:23 -0700)]
Bug 5090073 Callback protectors

Add callback protector for decode to PCM usage cases.
Move callback protection up earlier for URI decode use case only.

Other:
Remove redundant mCallbackProtector field.
Optimization: on exit from callback protector, only broadcast if !mSafeToEnterCb,
    that is if destroy has requested callback protectors to finish up.
More callback protector logging.
Add callback protector requestCbExit() [no wait], not yet used.

Unrelated:
3rd parameter of adecoder_writeToBufferQueue is always CAudioPlayer * instead of void *.

Change-Id: I57a46acf0e5ecb213540b13ca08098177ad7ad6e

12 years agoMerge "Set mAndroidObjState to ANDROID_READY once"
Glenn Kasten [Wed, 21 Sep 2011 14:14:43 +0000 (07:14 -0700)]
Merge "Set mAndroidObjState to ANDROID_READY once"

12 years agoMerge "Fix typo"
Glenn Kasten [Sun, 18 Sep 2011 14:56:50 +0000 (07:56 -0700)]
Merge "Fix typo"

12 years agoMerge "Move macro definition to more appropriate place"
Glenn Kasten [Sun, 18 Sep 2011 14:56:37 +0000 (07:56 -0700)]
Merge "Move macro definition to more appropriate place"

12 years agoBug 5334969 MediaPlayerNotificationClient safety
Glenn Kasten [Fri, 16 Sep 2011 17:05:48 +0000 (10:05 -0700)]
Bug 5334969 MediaPlayerNotificationClient safety

Fixed race due to missing mutex around 2 updates to mPlayerPrepared.

MediaPlayerNotificationClient had a raw reference to GenericMediaPlayer;
if for some reason the binder thread out-lived the GenericMediaPlayer,
then it might reference a destroyed object.  Made it a weak reference,
and issue warning if the GenericMediaPlayer has been destroyed.
This has similar effect as a callback protector.

Minor related:
 - mHasVideo is read without mutex, safe since never changed but make it const
 - GenericMediaPlayer's reference to MediaPlayerNotificationClient is now const also

Change-Id: I67b50e861a055c73fd490fb537a3d6d23d25c3d2

12 years agoUse async notify everywhere
Glenn Kasten [Fri, 16 Sep 2011 23:24:16 +0000 (16:24 -0700)]
Use async notify everywhere

We use asynchronous notify in all places except PLAYEREVENT_PREPARED.
Since there doesn't seem to be a clear reason why this should be
different, make it be the same.

Change-Id: I0a83d4ac7a7e8e16e3404a25f081176701de01ae

12 years agoSet mAndroidObjState to ANDROID_READY once
Glenn Kasten [Fri, 16 Sep 2011 23:21:11 +0000 (16:21 -0700)]
Set mAndroidObjState to ANDROID_READY once

The mAndroidObjState field should only be set to ANDROID_READY once,
after prepare completes either successfully or unsuccessfully.
Remove a couple of redundant assignments.

Change-Id: I4b73bc94aea4f8d4afc1111d7fcdccce4bf8a92d

12 years agoMerge "Bug 5263052 play events for decoder use case"
Glenn Kasten [Fri, 16 Sep 2011 21:09:54 +0000 (14:09 -0700)]
Merge "Bug 5263052 play events for decoder use case"

12 years agoBug 5263052 play events for decoder use case
Glenn Kasten [Thu, 15 Sep 2011 17:54:36 +0000 (10:54 -0700)]
Bug 5263052 play events for decoder use case

This version should be more resilient to decode time vs. real time.

Miscellaneous:
 - comment about GetPosition accuracy
 - remove unused AudioSfDecoder::onRender implementation

Change-Id: I16a7726e0b1459ed1421fe50cb4d683d5c3bdd6b

12 years agoFix typo
Glenn Kasten [Mon, 12 Sep 2011 17:19:40 +0000 (10:19 -0700)]
Fix typo

Change-Id: I673830007c2533110006e88b2c344bca3adaf448

12 years agoMove macro definition to more appropriate place
Glenn Kasten [Fri, 26 Aug 2011 16:41:05 +0000 (09:41 -0700)]
Move macro definition to more appropriate place

When sles_allinclusive.h was split up into separate files, this hunk
ended up in the wrong file.  sles_allinclusive.h still needs some more
re-factoring, but that's a separate issue.

Change-Id: Iafa92c6b4d22f79b080db6ddf9078acc4296dd7b

12 years agoFix in MFF performance measurement
Pannag Sanketi [Thu, 15 Sep 2011 04:23:26 +0000 (21:23 -0700)]
Fix in MFF performance measurement

Change-Id: I7d2949132f8103ffef514e1510d113b56919cbf3

12 years agoClean-up and documentation of Photo Editor filters (bug 5287103).
Marius Renn [Thu, 15 Sep 2011 00:33:11 +0000 (17:33 -0700)]
Clean-up and documentation of Photo Editor filters (bug 5287103).

- Documentation for Photo Editor effects added.
- Default parameter values added to underlying filters.
- Minor clean-up of Photo Editor filter code.

Change-Id: Ibaa3a106155bf52a1848b62f067f94731cdc6d86

12 years agoMerge "Rename of DoodleEffect as part of cleanup (Bug 5287103)."
Marius Renn [Thu, 15 Sep 2011 00:13:29 +0000 (17:13 -0700)]
Merge "Rename of DoodleEffect as part of cleanup (Bug 5287103)."

12 years agoRename of DoodleEffect as part of cleanup (Bug 5287103).
Marius Renn [Wed, 14 Sep 2011 01:23:21 +0000 (18:23 -0700)]
Rename of DoodleEffect as part of cleanup (Bug 5287103).

The DoodleEffect semantics have been considerably simplified so that the
name no longer fits the effect outcome. Renamed to BitmapOverlayEffect
(EFFECT_BITMAPOVERLAY).

This is the necessary change to the constant in the EffectFactory.

Change-Id: I071a77b0cb2a2f3de549c2bd1bff40c5f29a4848

12 years agoBug 5287555 create StreamSourceAppProxy once
Glenn Kasten [Fri, 9 Sep 2011 14:41:45 +0000 (07:41 -0700)]
Bug 5287555 create StreamSourceAppProxy once

Create StreamSourceAppProxy once in the StreamPlayer constructor,
rather than dynamically in StreamPlayer::registerQueueCallback.
As StreamPlayer::registerQueueCallback can be called multiple times
(or even not at all), this guarantees we always have only one
StreamSourceAppProxy that never changes.

Also fix bug where we weren't using a stream protector for AudioPlayer
with MPEG-2 TS AndroidBufferQueue data source (we weren't calling
setCallbackProtector on it).

This has some unexpected side benefits of simplifying the code:
 - remove unused parameters and member variables
 - mAppProxyLock not needed since the callback protector is created early
 - remove GenericPlayer::setCallbackProtector
 - inline android_StreamPlayer_realize_l for the use case
   AUDIOPLAYER_FROM_TS_ANDROIDBUFFERQUEUE to be like MediaPlayer

Change-Id: I090c11cde9474285185481192dba2b5c01338a50

12 years agoMerge "Bug 5287473 realize locks"
Glenn Kasten [Mon, 12 Sep 2011 17:02:01 +0000 (10:02 -0700)]
Merge "Bug 5287473 realize locks"

12 years agoBug 5287473 realize locks
Glenn Kasten [Fri, 9 Sep 2011 23:22:30 +0000 (16:22 -0700)]
Bug 5287473 realize locks

Realize had inconsistent and partial locking.
Now realize runs completely locked by default.

Change-Id: If453cfc0ac874f32cf5a1fcfe7795d24bd2a48d4

12 years agoBug 5236913 Update sample app for PLAYEVENT_HEADATEND with MP2TS
Jean-Michel Trivi [Fri, 9 Sep 2011 22:17:01 +0000 (15:17 -0700)]
Bug 5236913 Update sample app for PLAYEVENT_HEADATEND with MP2TS

Update the sample application to receive the PLAYEVENT_HEADATEND
 event after EOS has been processed.
Remove dead code in the corresponding implementation (in class
 StreamPlayer).

Change-Id: Ibe484a8c0e9605c05cd47b154d6c0aff1e70d49e

12 years agoBug 5236913 Callback for MP2TS when EOS was processed
Jean-Michel Trivi [Fri, 9 Sep 2011 18:32:12 +0000 (11:32 -0700)]
Bug 5236913 Callback for MP2TS when EOS was processed

When the buffer containing the EOS item in the Android Buffer Queue
 gets processed, make sure the application callback gets called.

Change-Id: I7476a908419ec99c52c3d3f3938de3f86ab926c6

12 years agoMerge "Fix bug 5236913 EOS causes HEADATEND event in play callback"
Jean-Michel Trivi [Fri, 9 Sep 2011 02:33:46 +0000 (19:33 -0700)]
Merge "Fix bug 5236913 EOS causes HEADATEND event in play callback"

12 years agoMerge "Bug 5236913 Callback for AAC decode when EOS was processed"
Jean-Michel Trivi [Fri, 9 Sep 2011 02:33:18 +0000 (19:33 -0700)]
Merge "Bug 5236913 Callback for AAC decode when EOS was processed"

12 years agoFix bug 5236913 EOS causes HEADATEND event in play callback
Jean-Michel Trivi [Fri, 9 Sep 2011 01:19:41 +0000 (18:19 -0700)]
Fix bug 5236913 EOS causes HEADATEND event in play callback

In AAC decode through an Android Buffer Queue, after receiving
 an EOS command, prevent reading from the queue by returning
 a size of 0, which causes the decoder to signal an end of
 stream. This will cause the SL_PLAYEVENT_HEADATEND to be
 fired (from the same thread that sends the decoded data)
 if the event was part of the play event mask, and a callback
 had been registered.

Change-Id: I435e8a66dbe9bc37f24c9e1f1c13f0dbd670b395

12 years agoMerge "Optimize Backdropper mask generation"
Rodrigo Carceroni [Fri, 9 Sep 2011 01:53:10 +0000 (18:53 -0700)]
Merge "Optimize Backdropper mask generation"

12 years agoOptimize Backdropper mask generation
Rodrigo Carceroni [Fri, 9 Sep 2011 01:27:38 +0000 (18:27 -0700)]
Optimize Backdropper mask generation

Change-Id: I701e27928b9c729aeaee7eb83b0b6d99773f7acf

12 years agoMerge "Bug 5280072 decode AAC ADTS fails for CRC content"
Jean-Michel Trivi [Fri, 9 Sep 2011 00:18:54 +0000 (17:18 -0700)]
Merge "Bug 5280072 decode AAC ADTS fails for CRC content"

12 years agoBug 5280072 decode AAC ADTS fails for CRC content
Glenn Kasten [Thu, 8 Sep 2011 22:37:48 +0000 (15:37 -0700)]
Bug 5280072 decode AAC ADTS fails for CRC content

Also copy in the length check from Stagefright.

Change-Id: I6758dbe370dd3a7178061183bbb83d289e5c00c5

12 years agoMerge "Fixing disconnect issue within MFF encoding"
Pannag Sanketi [Thu, 8 Sep 2011 23:30:09 +0000 (16:30 -0700)]
Merge "Fixing disconnect issue within MFF encoding"

12 years agoBug 5236913 Callback for AAC decode when EOS was processed
Jean-Michel Trivi [Thu, 8 Sep 2011 22:30:04 +0000 (15:30 -0700)]
Bug 5236913 Callback for AAC decode when EOS was processed

When the buffer containing the EOS item in the Android Buffer Queue
 gets processed, make sure the application callback gets called.

Change-Id: I0c8dfb61404ea33322a5755afa7c44213e53ce02