290 Commits

Author SHA1 Message Date
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
niko
c39173be32 Fixed a bug in the parser.
When we parse the metadata we check that there is enough data in the parcel by checking
 the byte availables and the size in the header.
Since the size is in the header has been read, we should make sure than dataAvailable() >= size - 4

This bug was hidden by some test code which has been removed.
2009-07-20 13:10:01 -07:00
Andreas Huber
80b3ab3f2b Fixing the build: StagefrightPlayer now implements the newly introduced "getMetadata" pure virtual. 2009-07-20 10:23:09 -07:00
Android (Google) Code Review
3e664221b6 Merge change 7747
* changes:
  Added 3 metadata types for pause/seek forward/seek backward.
2009-07-20 08:26:22 -07:00
Android (Google) Code Review
b8b117e1e7 am a8d5644b: Merge change 7726 into donut
Merge commit 'a8d5644b548263d68e2c9bfff58958b29c3525ff'

* commit 'a8d5644b548263d68e2c9bfff58958b29c3525ff':
  Fix issue 1985479	lots of backup NPEs.
2009-07-19 21:14:40 -07:00
Android (Google) Code Review
a8d5644b54 Merge change 7726 into donut
* changes:
  Fix issue 1985479	lots of backup NPEs.
2009-07-18 02:12:02 -07:00
Android (Google) Code Review
ab6ee15f8c am 474b0f29: Merge change 7686 into donut
Merge commit '474b0f2941430b97b4f24f16f7173e5249ccc8f2'

* commit '474b0f2941430b97b4f24f16f7173e5249ccc8f2':
  MediaScanner: Add check for null object in empty title handling code.
2009-07-17 15:42:59 -07:00
Nicolas Catania
716383a686 Added 3 metadata types for pause/seek forward/seek backward. 2009-07-17 13:26:44 -07:00
Android (Google) Code Review
cf541ee116 Merge change 7617
* changes:
  Added method to get metadata out of the player.
2009-07-17 13:19:32 -07:00
Eric Laurent
fd6e4820c6 Fix issue 1985479 lots of backup NPEs.
Check that stream type is not STREAM_BLUETOOTH_SCO before writting to settings.
2009-07-17 12:27:43 -07:00
Android (Google) Code Review
da3785ae9f Merge change 7624
* changes:
  Impl. of the metadata getters.
2009-07-17 12:00:28 -07:00
niko
8994837f27 Added method to get metadata out of the player.
The method passes a list of metadata ids to be retrieved and
a parcel where the metadata records should be appended.

If the list of ids is empty, all the metadata should be returned.
2009-07-17 11:31:11 -07:00
Android (Google) Code Review
f211c095f2 Merge change 7701
* changes:
  Clean up MP3Extractor code and fixes a bug that miscalculated the position of the header by a few bytes whenever we read in more data.
2009-07-17 09:44:25 -07:00
Andreas Huber
2e337a4e4b Clean up MP3Extractor code and fixes a bug that miscalculated the position of the header by a few bytes whenever we read in more data. 2009-07-17 09:39:59 -07:00
Andreas Huber
84c0246012 stagefright: initialize more of the OMX_BUFFERHEADERTYPE structure as they are apparently not cleared by the OMX implementation. 2009-07-17 09:30:37 -07:00
Mike Lockwood
bdc0e82f9c MediaScanner: Add check for null object in empty title handling code.
Signed-off-by: Mike Lockwood <lockwood@android.com>
2009-07-17 08:17:45 -04:00
Android (Google) Code Review
9e1bd09c15 am 97a67cc2: Merge change 7544 into donut
Merge commit '97a67cc281805566d429d4ca6570348fcf6dabd9'

* commit '97a67cc281805566d429d4ca6570348fcf6dabd9':
  sdutil: Up the mount/unmount wait times to account for disk check + reaper time
2009-07-17 02:09:02 -07:00
Nicolas Catania
cb2e00eedc Impl. of the metadata getters.
In Metadata, implemented the method that unmarshall the data from
a metadata parcel an return java entities.

Add 2 new types of metadata (Boolean and Date) and fixed an issue
in TimedText: the w3c standard specify a duration as well as the
time to be played => added a duration field.

In MetadataParserTest.java:
Moved the util private methods at the bottom of the file.
Added new tests for the getters (GETTERS section)
2009-07-16 18:34:53 -07:00
Android (Google) Code Review
97a67cc281 Merge change 7544 into donut
* changes:
  sdutil: Up the mount/unmount wait times to account for disk check + reaper time
2009-07-16 18:10:24 -07:00
Android (Google) Code Review
5b3f457845 am 58d19d1f: Merge change 7581 into donut
Merge commit '58d19d1f6321161fdcd10140fe7b9d9053f80bd2'

* commit '58d19d1f6321161fdcd10140fe7b9d9053f80bd2':
  Fix bug that would cause files with blank title tags to not be shown in the music app.
2009-07-16 17:54:27 -07:00
Marco Nelissen
3a3ba05782 Another fix for building libstagefright for the simulator, plus whitespace adjustments. 2009-07-16 17:25:13 -07:00
Marco Nelissen
7013c8bb9e Fixes to make libstagefright build for the simulator. 2009-07-16 17:10:51 -07:00
Marco Nelissen
55973f1aad Fix bug that would cause files with blank title tags to not be shown in the music app. 2009-07-16 14:12:11 -07:00
Android (Google) Code Review
52e4ad89ad Merge change 7399
* changes:
  Partial implementation of the parsing of Parcel into Metadata.
2009-07-16 11:55:45 -07:00
Nicolas Catania
8f5fcab05f New test player stub to load mock native players.
Added a new class TestPlayerStub that takes a magic url in the setDataSource call.
Based on the value of the url, the stub is going to load a DL and create the concrete
player used during the test.
After these initialization steps TestPlayerStub is just a wrapper.

Added a new functional test MediaPlayerInvokeTest to demonstrate how a new
mock player to test the invoke method can be loaded.

Added a new mock player for the invoke test: invoke_mock_media_player.cpp.
2009-07-16 11:22:31 -07:00
San Mehat
9b0a5e57db sdutil: Up the mount/unmount wait times to account for disk check + reaper time
Signed-off-by: San Mehat <san@google.com>
2009-07-16 10:29:23 -07:00