315 Commits

Author SHA1 Message Date
Nick Pelly
bd022f423a Bluetooth: API change.
Split BluetoothDevice into BluetoothDevice and BluetoothAdapter.

BluetoothAdapter: Represents the local BT adapter. Operations on the local
                  adapter (start a scan, etc).
BluetoothDevice: Represents a remote BT device. Operations on remote devices
                 (pair, connect, etc).

IBluetoothDevice.aidl -> Bluetooth.aidl
BluetoothDeviceService.java -> BluetoothDeviceService.java

TODO:
Javadoc
2009-08-18 08:24:22 -07:00
Andreas Huber
2f10ae08d4 Support for marshalling pointers / intptr_t in Parcel.
Some refactoring to eliminate code duplication in Parcel implementation.
2009-08-17 15:31:25 -07:00
Andreas Huber
be06d26cdc Squashed commit of the following:
commit 5bb012f0065f7ffaaeb4f569d71f0e3a8d6b19c3
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 14 10:40:08 2009 -0700

    An attempt at fixing export using the qcom encoders. More quirks.

commit 0690e76bfa48118a68287ccf1bbfa82febaa620c
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 14 09:08:28 2009 -0700

    Callbacks are now dispatched from a separate thread in OMX.

commit c6571a039526df29b6343f9a1971dbc019088c61
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 13 15:42:25 2009 -0700

    Massive API changes throughout stagefright, smart pointers everywhere.

commit 900612af6a0555664d9ba195112cd859491265f4
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 13 13:33:12 2009 -0700

    OMXCodecs now properly shutdown.

commit 96732f05e1b0603dcd1b11f16a23512592eeb4f5
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 13 12:04:04 2009 -0700

    More work on JPEG decoding using the hardware OMX component.

commit 63839a073ac393e3a130434ba467969053b694ad
Author: Andreas Huber <andih@google.com>
Date:   Wed Aug 12 13:13:31 2009 -0700

    An attempt to drive the JPEG decoder OMX node.

commit 3ac2fe5ab2926eda81b2123610b2434c645294ff
Author: Andreas Huber <andih@google.com>
Date:   Tue Aug 11 16:38:21 2009 -0700

    Renamed StateMachine to OMXCodec and put it in its proper place.

commit 247da75a96bf8881956413023dd49a84d5b4f5b2
Author: Andreas Huber <andih@google.com>
Date:   Tue Aug 11 16:06:19 2009 -0700

    Statemachine is now a full-fledged MediaSource.

commit 045244f6771fa0b9b329495c953afda900a84b71
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 7 09:16:54 2009 -0700

    Properly setup the input format when exporting to AMR audio.

commit 271b984cb32c5cd9e46e3f90ae121f334e4b8da9
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 6 09:59:38 2009 -0700

    Added some code to test audio encoding to the OMX harness.

commit 79af4748e4af33bd66d3fbac606e332a69741cf4
Author: Andreas Huber <andih@google.com>
Date:   Wed Aug 5 14:36:22 2009 -0700

    Merge the old OMXDecoder and the new, shiny, StateMachine code.

commit 91cf5dd77a8762bc10a0b2ffce35e3bbeb262231
Author: Andreas Huber <andih@google.com>
Date:   Tue Aug 4 17:41:43 2009 -0700

    A new harness to test OMX node compliance (and quirks).
2009-08-17 10:24:50 -07:00
Chih-Chung Chang
099397cbd0 Fix 1860351: Put datetime in jpeg exif to datetaken field. 2009-08-17 19:43:24 +08:00
Sahil Sachdeva
c9706f0262 DO NOT MERGE, ALready merged to master.
1440173 [NJ-1331] MetaData utility parse the wrong m4a meta data. Changes to Java, application side.
2009-08-14 14:52:23 -07:00
Jared Suttles
5982013cfc Change the number of volume steps from 6 to 7 per Verizon Requirements
Submitted on behalf of Helen Tran <Helen.Tran@motorola.com>
Signed-off-by: Jared Suttles <jared.suttles@motorola.com>
2009-08-13 21:27:55 -07:00
Mike Lockwood
e840928a33 libdrm: "==" should be an assignment.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-08-12 11:32:36 -04:00
Wu-cheng Li
2ac8c27988 am cb2b2378: Merge change 20729 into donut
Merge commit 'cb2b2378c735e687c15e2af7f908c68ffae5fe90'

* commit 'cb2b2378c735e687c15e2af7f908c68ffae5fe90':
  Fix the bug that EXIF attributes are always cached.
2009-08-11 18:12:00 -07:00
Eric Laurent
c4e58c0f31 Fix issue 2045983 ToneGenerator: fix void statement.
There is a void statement at line 917 of ToneGenerator.cpp: mState == TONE_IDLE;
This problem is harmless as in current code this execution path is never taken; it can only happen if a "new" operator fails in prepareWave() which is a case we usually consider as unlikely in android audio framework.
2009-08-11 09:57:45 -07:00
Wu-cheng Li
b826bf9182 Fix the bug that EXIF attributes are always cached.
b2039501
2009-08-11 23:37:01 +08:00
Andreas Huber
ccf8b94169 Expose a variation of the createRenderer API that works on a plain Surface. 2009-08-10 12:58:05 -07:00
Andreas Huber
e9ec12c47e Deprecate/remove now unused socketpair ipc communication in favour of exclusive binder use. 2009-08-10 10:29:40 -07:00
Android (Google) Code Review
03a9746200 Merge change 20422
* changes:
  Build the stagefright library by default.
2009-08-07 11:09:44 -07:00
Andreas Huber
0d596d4724 Build the stagefright library by default. 2009-08-07 10:40:34 -07:00
Eric Laurent
d5603c126a AudioService now differentiates BT headsets and car kits.
The BT headset detection now makes the difference between car kits and headsets, which can be used by audio policy manager.
The headset connection is also detected earlier, that is when the headset is connected and not when the SCO socket is connected as it was the case before. This allows the audio policy manager to suspend A2DP output while ringing if a SCO headset is connected.
2009-08-07 10:31:53 -07:00
Android (Google) Code Review
1420bf3ec6 Merge change 9674
* changes:
  Fix problem in AudioTrack with 8 bit PCM and direct output.
2009-08-07 09:10:15 -07:00
Eric Laurent
ddb78e7753 Fix issue 2001214: AudioFlinger and AudioPolicyService interfaces should not use pointers as handles to inputs and outputs.
Use integers instead of void* as input/output handles at IAudioFlinger and IAudioPolicyService interfaces.
AudioFlinger maintains an always increasing count of opened inputs or outputs as unique ID.
2009-08-07 00:27:19 -07:00
Yu Shan Emily Lau
6874e3df0e am 3397f169: Capture the start and end memory usage in the output file. Move the start memory catpure after 10 loops.
Merge commit '3397f16949d2e86442c32f3b82d5ee3ace99ba82'

* commit '3397f16949d2e86442c32f3b82d5ee3ace99ba82':
  Capture the start and end memory usage in the output file. Move the start memory catpure after 10 loops.
2009-08-06 18:14:39 -07:00
Yu Shan Emily Lau
3397f16949 Capture the start and end memory usage in the output file. Move the start memory catpure after 10 loops. 2009-08-06 17:42:29 -07:00
Andreas Huber
6e1584ccd3 The mp3 decoder now correctly uses microseconds to measure time. One less quirk. 2009-08-06 15:52:12 -07:00
Chia-chi Yeh
64e69e8ab8 libdrm1: Use libcrypto instead of libaes.
It seems that libdrm1 was the only user of libaes.
Now libaes is no longer required and removing it saves 36 kilobytes.
2009-08-05 22:01:28 -04:00
Yu Shan Emily Lau
859c37548f am bd014e07: Remove the memory capture in the first run and make it the same as the cupcake test case.
Merge commit 'bd014e07e2e95d4ac706c6863e2587bd96daa51e'

* commit 'bd014e07e2e95d4ac706c6863e2587bd96daa51e':
  Remove the memory capture in the first run and make it the same as the cupcake test case.
2009-08-05 12:16:18 -07:00
Yu Shan Emily Lau
bd014e07e2 Remove the memory capture in the first run and make it the same as the cupcake test case. 2009-08-05 11:44:51 -07:00
Andreas Huber
ea03f4af10 Recording/Export to .mp4/h.263 somewhat works on TI hardware. 2009-08-05 09:46:40 -07:00
Eric Laurent
28ad42b58c Fix problem in AudioTrack with 8 bit PCM and direct output.
Do not perform 8 to 16 bit conversion in AudioTrack write() and processAudioBuffer() if direct output flag is set.
2009-08-04 10:42:26 -07:00
Android (Google) Code Review
5192dda143 Merge change 9517
* changes:
  We don't need libopencore_author and libcutils in libmedia_jni
2009-08-03 12:52:53 -07:00
Marco Nelissen
831fbc1c20 We don't need libopencore_author and libcutils in libmedia_jni 2009-08-03 12:11:43 -07:00
Android (Google) Code Review
20b153bffc am 5fd26775: Merge change 9390 into donut
Merge commit '5fd26775bdd14b15058521c82e34b562e0c1e327'

* commit '5fd26775bdd14b15058521c82e34b562e0c1e327':
  Name unknown albums after the folder they're in, similar to how songs
2009-08-03 11:54:18 -07:00
Marco Nelissen
4935d05eaa Untangle MediaPlayer, MediaRecorder, MediaScanner and MediaMetadataRetriever JNI
code, so that creating one of those doesn't initialize all the others. Shaves
a hundred milliseconds or so off music app startup time.
2009-08-03 11:32:30 -07:00
Marco Nelissen
c3c08ba5d6 Name unknown albums after the folder they're in, similar to how songs
with no title metadata are named after the file. Only files that are
in the root of the card will still belong to the "Unknown Album"
2009-07-31 15:02:25 -07:00
Andreas Huber
1de13168a9 The IOMX interface now instantiates IOMXRenderers to hide the details of hardware accelerated blitting. 2009-07-31 12:48:53 -07:00
Android (Google) Code Review
1b0efec347 am 17c195c8: Merge change 9340 into donut
Merge commit '17c195c8da3470b2e69880e206342f0c2d85f938'

* commit '17c195c8da3470b2e69880e206342f0c2d85f938':
  Fix issue 2025872: Deadlock in SoundPool.stop
2009-07-31 08:55:51 -07:00
Android (Google) Code Review
17c195c8da Merge change 9340 into donut
* changes:
  Fix issue 2025872: Deadlock in SoundPool.stop
2009-07-31 08:50:45 -07:00
Android (Google) Code Review
ed95840681 am dccfaefd: Merge change 9285 into donut
Merge commit 'dccfaefd681a3895f6d4f9eedd106be817e1555d'

* commit 'dccfaefd681a3895f6d4f9eedd106be817e1555d':
  Clear singleton reference during JetPlayer.release()
2009-07-31 07:15:30 -07:00
Eric Laurent
fd8c0e1ff8 Fix issue 2025872: Deadlock in SoundPool.stop
There were 2 problems in SoundPool:

1 If not using the shared memory buffer mode, there was a problem when a sound channel was stolen. The new channel could sometimes not be added to the restart
list if the AudioTrack callback thread was stopped before the underrun callback was called.

The SoundChannel::play() method is modified so that SoundPool::done() is called immediately after stopping the channel. There is a possibility that done() is called a second time by the callback; in this case it will be added 2 times to the restart list but the second start request will be ignored as the first one will have reset the next chennel ID when processed.

2 There was a deadlock on SoundPool::mLock if SoundPool::stop() was called while a channel restart was pending:
 SoundPool::stop() lock mLock -> SoundChannel::stop() -> SoundPool::done() -> SoundPool::addToRestartList() -> try to lock mLock == deadlock

A second mutex mRestartLock is added to protect the restart list mRestart. mLock is still used to protect mChannels list but mRestart is now used to
protect access to mRestart by restart thread and client thread.
2009-07-31 06:29:13 -07:00
Phil Dubach
176e650931 Clear singleton reference during JetPlayer.release()
Only one JetPlayer instance is supported at a time. A singleton reference is
created and returned in JetPlayer.getInstance(). When calling release() on the
instance, the corresponding native player is finalized.  Therefore, release()
must also clear the singleton reference, so that any subsequent call to
getInstance() re-initializes the native player.
2009-07-30 17:59:02 -07:00
James Dong
cbe7c5441c Remove hardcoded maximum frame rate limit from the framework
bug 1993400
2009-07-30 11:16:11 -07:00
Eric Laurent
c42ac9d4d0 Fix issue 2019031: Volume changes have no effect.
Send initStreamVolume() for each stream when media server restarts.
Also added restoring of phone state, device connection state and forced device for communications.
2009-07-29 08:53:03 -07:00
Android (Google) Code Review
e406906e16 Merge change 8878
* changes:
  Support for selection of silent ringtone from the ringtone picker. This doesn't actually enable that, but adds the necessary code to make it work when enabled, and cleans up some ringtone related code.
2009-07-28 16:26:40 -07:00
Marco Nelissen
69f593ccb7 Support for selection of silent ringtone from the ringtone picker.
This doesn't actually enable that, but adds the necessary code to make it work when enabled, and cleans up some ringtone related code.
2009-07-28 16:06:38 -07:00
Andreas Huber
970764d14b While other OMX nodes appear to now have switched to using microseconds to timestamp buffers, at least the TI AAC and MP3 decoders still use milliseconds. 2009-07-28 13:05:27 -07:00
Andreas Huber
8a432776d0 Squashed commit of the following:
commit 374ea382ee3a9e3ce17e4c6357fc40d02e362810
Author: Andreas Huber <andih@google.com>
Date:   Tue Jul 28 09:54:13 2009 -0700

    PV's OMX implementation now uses (spec-compliant) microseconds instead of milliseconds in buffer timestamps.

commit 8d02f8ab5d7b022ad4ad34db2a9bdeea6ce2acfe
Author: Andreas Huber <andih@google.com>
Date:   Mon Jul 27 14:24:26 2009 -0700

    Support for using an overlay for video playback on TI hardware.

    Appears to be currently constrained to CbYCrY 16-bit colorspace.

commit d17f321cb4b15c1fea378f33a7ef5998f23dd0fc
Author: Andreas Huber <andih@google.com>
Date:   Mon Jul 27 09:45:38 2009 -0700

    Added '--audio-only' commandline option to stagefright tool.

commit d8beef6be5c668c46451446d87e622933371cd75
Author: Andreas Huber <andih@google.com>
Date:   Fri Jul 24 13:35:00 2009 -0700

    Generalize the various workarounds for OMX nodes with their own unique interpretation of the spec.

commit c7dfd53eeadf8ed5a39bf2b19b014dcd62f3324d
Author: Andreas Huber <andih@google.com>
Date:   Thu Jul 23 16:06:36 2009 -0700

    Fixed erroneous TI AAC decoder behaviour wrt shutdown.

    The AAC decoder appears to not return out buffers on an Executing->Idle transition, implemented a workaround that does a flush on all ports followed by the Executing->Idle. Oh, and flush with OMX_ALL doesn't properly work either. Fun.

commit d6377282e75060881336578f166f9c7feacf3f8f
Author: Andreas Huber <andih@google.com>
Date:   Thu Jul 23 14:06:50 2009 -0700

    Apparently the "channels" parameter in AudioTrack's constructor no longer counts channels but is a bitmask of enabled destinations, update the code accordingly.

commit ff698c79e851a2e57d362e9c3a09828af4048087
Author: Andreas Huber <andih@google.com>
Date:   Wed Jul 22 16:54:44 2009 -0700

    Fix MPEG4 decoding using TI's hardware decoder that I broke earlier...

commit 2ef78bb87cd856eb7f0b3d7dd68782a8650c12bf
Author: Andreas Huber <andih@google.com>
Date:   Wed Jul 22 15:43:18 2009 -0700

    Now that the qcom decoder properly advertises its own custom colorspace, update dependent code to reflect this fact.

commit bbaec96910727080fd7c8a6907c04facb9f5220f
Author: Andreas Huber <andih@google.com>
Date:   Wed Jul 22 14:32:03 2009 -0700

    Finishing up previous, incomplete change.

commit 76f14a1ae816b6f434771f8d12bdad81196f351e
Author: Andreas Huber <andih@google.com>
Date:   Wed Jul 22 14:25:17 2009 -0700

    The TI video decoder now properly decoder AVC/H.264 content.

commit e106130d8c100d5c94603e43864a7a93cca10252
Author: Andreas Huber <andih@google.com>
Date:   Wed Jul 22 08:56:04 2009 -0700

    Experimental support for the TI H.264 decoder, various modifications to OMXDecoder, non-functional still.

commit 241c3062dec3447db1a1ee74558cb4b9098fc404
Author: Andreas Huber <andih@google.com>
Date:   Tue Jul 21 12:13:09 2009 -0700

    Enable TI hardware OMX decoders (except for AVC/H.264 which still has issues).

    This particular set of OMX nodes does not appear to properly return our buffers when sending the "disable" command on a port. Rather it reqires manually flushing that port and _then_ disabling it instead.

commit 1c34506a46e32ce25f2a86f3b4250dcfc037356a
Author: Andreas Huber <andih@google.com>
Date:   Tue Jul 21 08:51:35 2009 -0700

    Make it simpler to switch between the stagefright player and PVPlayer.

commit 249c6de05671d403f8dd51f095d49bf190430c9c
Author: Andreas Huber <andih@google.com>
Date:   Mon Jul 20 14:38:15 2009 -0700

    Prepare to use soon-to-be-available hardware decoders in the OMX decoder.
2009-07-28 11:28:14 -07:00
Eric Laurent
3026a023b8 Fix issue 2001517: AudioTrack compatibility issue.
Modified enum values in AudioFormat.java and AudioSystem.h.
Added code for backward compatibility in AudioTrack.java and AudioRecord.java.
2009-07-27 12:21:29 -07:00
Eric Laurent
d25ae67ca8 Fix issue 2004738: Settings Backup Agent consistently throws ArrayIndexOutOfBoundsException during restore.
Use stream alias when accessing VOLUME_SETTINGS array.
2009-07-27 02:12:30 -07:00
Ravi K Yenduri
974ff946d1 Add support for .aac and .asf extensions. 2009-07-24 11:26:30 -07:00
Eric Laurent
a553c25b33 Fix issue 1795088 Improve audio routing code
Initial commit for review.
Integrated comments after patch set 1 review.
Fixed lockup in AudioFlinger::ThreadBase::exit()
Fixed lockup when playing tone with AudioPlocyService startTone()
2009-07-23 06:03:39 -07:00
niko
bc72692780 Added native metadata support.
Metadata.java:
Fixed typo 8k != 8092. The comment was correct though.

In Metadata.h, the new Metadata class is declared in the ns android::media
to limit the chances of conflict with other packages.

The MetadataType in MediaPlayerInterface is gone and moved to Metadata as
an inner typedef.

Similarly the SortedVector<MetadataType> instance have been replace by a
new type Metadata::Filter.

All the keys declared in the java counterpart are also in Metadata.h.

Metadata.cpp:
Contains the implementation of the native metadata packing.

There an associated change in the opencore package that should go in
at the same time as this one.
2009-07-22 15:03:22 -07:00
Android (Google) Code Review
c7bebd1537 am 5f2b05ea: Merge change 8220 into donut
Merge commit '5f2b05ea3dfdaf63088ea3776af43b79c5698f09'

* commit '5f2b05ea3dfdaf63088ea3776af43b79c5698f09':
  Fix issue 1996218: Disable use of shared memory buffer by SoundPool.
2009-07-22 13:20:05 -07:00
Eric Laurent
45fce58ca1 Fix issue 1996218: Disable use of shared memory buffer by SoundPool.
Disabled USE_SHARED_MEM_BUFFER compilation switch in SoundPool.cpp.
2009-07-22 11:12:31 -07:00
niko
6fa41bbb56 Minor cleanup in Metadata.java
Use a constant to express the size of a 32bits int.

In MediaPlayerMetadataParserTest, removed unused kTocken constant.
2009-07-20 13:53:29 -07:00