1626 Commits

Author SHA1 Message Date
Christopher Tate
e2ed9562fc Revert "Binder linkage no longer depends on JNI objrefs as persistent tokens"
This reverts commit c2d55dd89743c8a38deb809f3cdf1ad2d1dbac2b.
2011-02-25 15:18:53 -08:00
Mathias Agopian
5af3d01005 Merge "Fix a wp<> bug where the owner ID would be wrong" 2011-02-24 18:27:40 -08:00
Mathias Agopian
49862c3630 Fix a wp<> bug where the owner ID would be wrong
this was introduced recently. we make sure to use
the correct owner id (the sp) instead of the wp.

Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
2011-02-24 18:12:34 -08:00
Mathias Agopian
ffbe826804 Merge "Fix some issues with RefBase debugging." 2011-02-24 16:23:51 -08:00
Christopher Tate
7e8a69ed5c Merge "Binder linkage no longer depends on JNI objrefs as persistent tokens" 2011-02-24 13:22:19 -08:00
Christopher Tate
c2d55dd897 Binder linkage no longer depends on JNI objrefs as persistent tokens
There are two areas that have changed to eliminate the assumption that
local jobject references are both canonical and persistent:

1. JavaBBinderHolder no longer holds onto and reuses it parent object
reference per se.  Since the underlying JavaBBinder object holds a
real global ref, this was redundant anyway.  Now, for purposes of its
transient need to perform JNI operations, it simply uses the current
jobject ref(s) passed during method invocation, and no longer attempts
to hold these refs beyond the scope of a single invocation.

2. Binder obituaries no longer assume that a jobject reference to a
recipient will always compare == as a 32-bit value with any future
reference to the same object.  The implementation now asks Dalvik
whether object references match.

Bug 2090115

Change-Id: If62edd554d0a9fbb2d2977b0cbf8ad7cc8e2e68d
2011-02-24 13:15:09 -08:00
Glenn Kasten
373ed6fc79 Merge "Bug 3438258 Add SurfaceTexture as MediaPlayer sink" 2011-02-24 12:37:02 -08:00
Glenn Kasten
6152bbc650 Merge "Bug 3362814 Fix SMP race in access to mRequestExit" 2011-02-24 10:01:31 -08:00
Wu-cheng Li
e857cc8175 Merge "Add YV12 preview format to camera parameter constants." 2011-02-24 02:51:17 -08:00
Wu-cheng Li
10a1b30dfb Add YV12 preview format to camera parameter constants.
bug:3463624
Change-Id: I8f2992dadfd3fb9e3c9d67743e52da7f3212827e
2011-02-24 18:19:48 +08:00
Mathias Agopian
ec122eb46b Fix some issues with RefBase debugging.
First slipt sp<> out of RefBase into StrongPointer.h so it can be reused
more easily and to make it clear that it doesn't require RefBase.

Note: the rest of the change only affects the system when DEBUG_REFS is enabled.

The main problem we fix here is that the owner id associated with each
reference could get out of date when a sp<> or wp<> was moved, for
instance when they're used in a Vector< >.

We fix this issue by calling into RefBase::moveReferences from
a template specialization for sp<TYPE> and wp<TYPE> of the
type helpers. RefBase::moveReferences() has then a chance to
update the owner ids.

There is a little bit of trickery to implement this generically in
RefBase, where we need to use a templatized functor that can turn
a sp<TYPE>* casted to a void* into a RefBase*.

Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS
currently set to 0 by default as there seem to be an issue
with sp<ANativeWindow> which trips the sanity checks.

Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
2011-02-23 22:21:41 -08:00
Glenn Kasten
c2b3cda097 Bug 3362814 Fix SMP race in access to mRequestExit
Also fix an unlikely SMP race in access to mHoldSelf on entry to _threadLoop.

Change-Id: I6cbc0b94739c7dd5e77e8a5ba0da22cdc0b1a4db
2011-02-23 17:49:59 -08:00
Mathias Agopian
7f97c4ef12 Merge "Remove RefBase.h dependency on TextOutput.h" 2011-02-23 15:23:13 -08:00
Glenn Kasten
cc562a3576 Bug 3438258 Add SurfaceTexture as MediaPlayer sink
This change enables the use of a SurfaceTexture in place of a Surface
as the video sink for an android.media.MediaPlayer. The new API
MediaPlayer.setTexture is currently hidden.

This includes:
 - New Java and C++ interfaces
 - C++ plumbing and implementation (JNI, Binder)
 - Stagefright AwesomePlayer and NuPlayer use ANativeWindow
   (either Surface or SurfaceTextureClient)

Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
2011-02-23 15:02:56 -08:00
James Dong
afc671fc5e Merge "Application-managed callback buffer support for raw image" 2011-02-23 10:38:21 -08:00
Gloria Wang
87e639bc15 Merge "- Add method in MediaPlayerService to collect and pull codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data" 2011-02-23 09:58:33 -08:00
Gloria Wang
d211f41f76 - Add method in MediaPlayerService to collect and pull
codec usage (duration) for the battery app
- Collect MediaPlayer decoding usage data

Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
2011-02-22 22:42:05 -08:00
James Dong
e00cab707d Application-managed callback buffer support for raw image
bug - 3292153

Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
2011-02-22 20:48:15 -08:00
Mathias Agopian
a688b574d2 Remove RefBase.h dependency on TextOutput.h
Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
2011-02-22 18:08:58 -08:00
Andreas Huber
8c7c6dc413 Support more MPEG4-LATM audio functionality.
related-to-bug: 3474610

Change-Id: I6dab40e8b465922c62be9ee7f168718822c6caac
Now skipping extra header that the spec claimed shouldn't be present in LATM...
2011-02-22 13:21:38 -08:00
Jeff Brown
6f2fba428c Add new axes for joysticks and mouse wheels.
Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
2011-02-19 05:23:10 -08:00
James Dong
5b025c4615 Merge "A/V synchronization at the beginning of a recording session" 2011-02-17 14:50:14 -08:00
James Dong
cbeebb194b A/V synchronization at the beginning of a recording session
o do not use edts/elst boxes since these optional boxes are ignored
o manipulate the first video/audio frame duration to make sure that the rest
  of the audio/video is in sync (ideally, we should only manipulate
  the vidoe frame duration, not the audio)
o reduce the initial audio mute/suppression period, which is used to
  eliminate the "recording" sound.

bug - 3405882 and 3362703

Change-Id: Ib0acfb4f3843b365157288951dc122b006299c18
2011-02-17 14:43:16 -08:00
Jeff Brown
ebbd5d14ad Fix a regression with MotionEvent parceling.
Also added some more unit tests.

Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
2011-02-17 13:01:34 -08:00
Jeff Brown
45708bf2f0 Merge "Add support for arbitrary axes in MotionEvents." 2011-02-16 20:00:21 -08:00
James Dong
d33a4ccb5c Decouple AudioRecord read and audio encoding
bug - 3313754

Change-Id: I951dd0e21e34aa1412c391f003bc32103d0424b0
2011-02-16 11:23:21 -08:00
Jeff Brown
91c69ab015 Add support for arbitrary axes in MotionEvents.
This change makes it possible to extend the set of axes that
are reported in MotionEvents by defining new axis constants.

The MotionEvent object is now backed by its C++ counterpart
to avoid having to maintain multiple representations of the
same data.

Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
2011-02-15 19:14:37 -08:00
Gloria Wang
94f4019994 Merge "Add AAC extractor" 2011-02-15 17:22:01 -08:00
Gloria Wang
c5b0abf900 Add AAC extractor
Change-Id: Iedb08525ac72e65ba98e5c791734da0720a0e3f6
2011-02-15 17:16:22 -08:00
James Dong
fe84cf13cd Make available h263 DSI information from MPEG4Extractor
bug - 3446863

Change-Id: Idbaf7a564d544784fdbc36ed0339c98a519adc88
2011-02-11 15:25:03 -08:00
Mathias Agopian
a11faf889e am c6c3e77d: am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb
* commit 'c6c3e77d4d5cd8de3b1a56bdffdfd42774849512':
  fix [3408713] Dialog window invisible sometimes
2011-02-10 15:46:15 -08:00
Mathias Agopian
c6c3e77d4d am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into honeycomb
* commit 'b66b7a2c183a1423ea629d4f73ed95f9b87d54b7':
  fix [3408713] Dialog window invisible sometimes
2011-02-10 15:08:33 -08:00
Glenn Kasten
8b4b97a14a Bug 3352047 Wrong message when adjusting volume
Add hidden AudioManager.getDevicesForStream and output device codes.

Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
2011-02-10 14:37:42 -08:00
Mathias Agopian
37c2a37501 fix [3408713] Dialog window invisible sometimes
weak pointer comparison operators were implemented wrong,
they were using the internal "unsafe" pointer. We could end up
with two "equal" weak pointer pointing to different objects.

this caused KeyedVector keyed by weak pointer to work incorrectly, in
turn causing a window that just got added to a list to be immediately
removed.

Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
2011-02-09 18:38:55 -08:00
James Dong
f6a2bff0c9 Reduce blocking time in file write
bug - 3418787

Change-Id: I4723662bf46ed07271be8468f84ae5d93cb793fa
2011-02-09 15:44:32 -08:00
Andreas Huber
5ed9a80571 Merge "Handle some edge cases when seeking while starting up OMXCodec" 2011-02-08 13:15:37 -08:00
Andreas Huber
b928983334 Handle some edge cases when seeking while starting up OMXCodec
These were exposed by the new preview-seekframe while paused code.
In particular, the codec may have been in state RECONFIGURING when attempting
to seek, or we may have initiated flushing of the output port and this may not
have completed yet by the time we want to reconfigure the output port.

Change-Id: Id7640ade11dbc7205a22f648ea0b5e3e9b49cf4b
related-to-bug: 3392259
2011-02-08 13:10:25 -08:00
Gloria Wang
c2dc4729e3 - Do not use global DrmManagerClient
- Release the DrmManagerClient and DecryptHandle in DataSource
Fix for bug 3429811

Change-Id: I549f72b75225751877eb0e630ce8098f8ec6316f
2011-02-07 15:10:33 -08:00
Andreas Huber
6760f9832d Improvements/fixes to ACodec.
- Make sure ACodec reverts its state when it's shutdown
- Defer "resume" to after handling the OutputPortSettingsChange

- If the OMX_EventPortSettingsChanged event comes in while we're flushing, defer it
  and make sure the output port can be disabled by deleting all buffers not already
  owned by the component.

Change-Id: I1f8cdffa71237b57d4275a48b834647a7b263e8b
2011-02-04 10:12:26 -08:00
Eric Laurent
2e8fbebff4 am 6f1bd261: am 9c0a1003: Merge "Fix issue 3371080" into honeycomb
* commit '6f1bd261b7fd86ac7817ca061dfb55b95150b836':
  Fix issue 3371080
2011-02-03 17:18:46 -08:00
Glenn Kasten
f9f223edb4 Bug 1804058 FLAC extractor
Note: dependent on external/flac for libFLAC

Implemented and tested:
 * FLAC container
 * mono and stereo
 * standard sample rates
 * standard bit depths
 * sniffer
 * media scanner
 * Vorbis comment metadata including album art
 * random access seeking with "torture test"
 * web browser integration for audio/flac (not audio/x-flac), but
   note that most web servers don't correctly report the MIME type

Not implemented:
 * 24-bit to 16-bit dither or noise shaping in AudioFlinger
 * 96 kHz to 44.1 or 48 kHz downsampling low pass filter in AudioFlinger
 * replay gain is better done in AudioFlinger
 * multi-channel, would need AudioFlinger support
 * Ogg container, does not seem to be very popular yet

Change-Id: I300873e8c0cfc2e95403d9adb5064d16a2923f17
2011-02-03 13:39:10 -08:00
Eric Laurent
6f1bd261b7 am 9c0a1003: Merge "Fix issue 3371080" into honeycomb
* commit '9c0a1003bd676121cf9b1c942ecebd5b486290d5':
  Fix issue 3371080
2011-02-03 10:28:24 -08:00
Eric Laurent
25101b0b9a Fix issue 3371080
Modified default volume control logic in AudioService:
1 IN_CALL volume if in video/audio chat
2 NOTIFICATION if notification is playing or was playing less than 5s ago.
3 MUSIC

Modified silent mode:
- now also affect MUSIC stream type
- entering silent mode when VOL- hard key is pressed once while selected
stream volume is already at 0 (except for VOICE_CALL stream).
- exiting silent mode when pressing VOL+ hard key while in silent mode

Play sound FX (audible selections, keyboard clicks) at a fixed volume.

Modified audio framework:
- isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger)
- iStreamActive() now specifies a time window during which the stream is considered
active after it actually stopped.

Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
2011-02-03 09:26:24 -08:00
Jamie Gennis
a257be1895 am 421d94c2: am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit '421d94c20321e1de528416b279bf148baba47b39':
  Pass the IGraphicBufferAlloc to SurfaceTextureClient.
2011-02-02 16:21:24 -08:00
Jamie Gennis
421d94c203 am ecb4b3f0: Merge "Pass the IGraphicBufferAlloc to SurfaceTextureClient." into honeycomb
* commit 'ecb4b3f02340e21eefabbea78559e85ec7ee0089':
  Pass the IGraphicBufferAlloc to SurfaceTextureClient.
2011-02-02 15:56:20 -08:00
Jamie Gennis
83bac216a7 Pass the IGraphicBufferAlloc to SurfaceTextureClient.
This change passes a reference to the IGraphicBufferAlloc binder object
to SurfaceTextureClient objects.  When STC objects are created they
query their associated ISurfaceTexture object for the
IGraphicBufferAlloc that the SurfaceTexture uses to allocate buffers.
Having the SurfaceTextureClient hold this reference prevents the
GraphicBufferAlloc in SurfaceFlinger from freeing the allocated buffers
before the SurfaceTextureClient is done with them.

Change-Id: Ib8e30e8b37fdd60438cbb4cb7e9174d0ba6d661c
related-bug: 3362519
2011-02-02 15:31:47 -08:00
Jamie Gennis
4453b1a5b6 am 09443aeb: am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb
* commit '09443aeb6470d66f5bc1938b70d74b3e2f9bbbb9':
  Reset ANativeWindow crop on buffer geometry changes.
2011-01-30 15:05:42 -08:00
Jamie Gennis
09443aeb64 am 62884505: Merge "Reset ANativeWindow crop on buffer geometry changes." into honeycomb
* commit '628845056282a0c5b1a212ce5aeeaac092b91ec8':
  Reset ANativeWindow crop on buffer geometry changes.
2011-01-30 15:03:03 -08:00
Dianne Hackborn
0e87a19bec am 371de969: am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit '371de9695508073fbbde8181eb230e99cb045206':
  Normalize output from aapt d
2011-01-29 23:10:33 -08:00
Dianne Hackborn
371de96955 am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"
* commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234':
  Normalize output from aapt d
2011-01-29 23:07:48 -08:00