934 Commits

Author SHA1 Message Date
Andreas Huber
52c7832e35 Increase cache size and low-watermark threshold, also
MediaPlayer now sends out MEDIA_INFO,MEDIA_INFO_VIDEO_TRACK_LAGGING messages
to the JAVA client informing it how much (if at all) the video lags behind
audio (arg2 is the media delay in ms).

Change-Id: I6933f573d8597a35112e4b5ee0fcb826a7f6ddd1
related-to-bug: 3335220
2011-01-11 15:05:28 -08:00
Eric Laurent
a60e212d0d Fix issue 3261656.
The problem can occur if a sample is started at the same time as the last AudioTrack callback
for a playing sample is called. At this time, allocateChannel() can be called concurrently with moveToFront()
which can cause an entry in mChannels being used by moveToFront() to be erased temporarily by allocateChannel().

The fix consists in making sure that the SoundPool mutex is held whenever play(), stop() or done() are called.

In addition, other potential weaknesses have been removed by making sure that the channel mutex is held while
starting, stopping and processing the AudioTrack call back.

To that purpose, a mechanism similar to the channel restart method is implemented to avoid stopping channels
from the AudioTrack call back but do it from the restart thread instead.

The sound effects SounPool management in AudioService has also been improved to make sure that the samples have
been loaded when a playback request is received and also to immediately release the SoundPool when the effects are
unloaded without waiting for the GC to occur.
The SoundPool.java class was modified to allow the use of a looper attached to the thread in which the sample
loaded listener is running and not to the thread in which the SoundPool is created.

The maximum number of samples that can be loaded in a SoundPool lifetime as been increased from 255 to 65535.

Change-Id: I368a3bdfda4239f807f857c3e97b70f6b31b0af3
2011-01-07 17:17:10 -08:00
Marco Nelissen
ee35aff744 Add support for the "compilation" tag in mp3, mp4 and ogg, and also add
support for two common ways of specifying album artist in ogg files.
b/3311831

(cherry-picked from GB because of weird automerger failure)

Change-Id: Ibf12a3d6bc8bbc2ac5ea815de6b33414b8f53f0f
2011-01-07 12:42:07 -08:00
Marco Nelissen
2888208b0b am f13d4501: Send "compilation" tag when inserting into the database. It\'s not actually inserted into the database, but the media provider uses it for disambiguating albums. b/3311831
* commit 'f13d4501396aa1679004ad07d440f65ced3ecc2b':
  Send "compilation" tag when inserting into the database. It's not actually inserted into the database, but the media provider uses it for disambiguating albums. b/3311831
2011-01-07 09:22:57 -08:00
Marco Nelissen
d1da80a4b3 am ba77a3f9: Add support for the "compilation" tag in mp3, mp4 and ogg, and also add support for two common ways of specifying album artist in ogg files. b/3311831
* commit 'ba77a3f9cb1d68b2ed4813aaae856444578e3a75':
  Add support for the "compilation" tag in mp3, mp4 and ogg, and also add support for two common ways of specifying album artist in ogg files. b/3311831
2011-01-06 20:29:11 -08:00
Marco Nelissen
f13d450139 Send "compilation" tag when inserting into the database.
It's not actually inserted into the database, but the media provider uses it
for disambiguating albums.
b/3311831

Change-Id: Idb630866e960338ce2795dcc128cafaf6c9c27f2
2011-01-06 16:37:03 -08:00
Marco Nelissen
ba77a3f9cb Add support for the "compilation" tag in mp3, mp4 and ogg, and also add
support for two common ways of specifying album artist in ogg files.
b/3311831

Change-Id: Iba1152013b7577168af71f947d7249560419fa05
2011-01-06 15:05:06 -08:00
Mike Lockwood
27480cd494 Remove support for obsolete PTP content provider
This will be replaced by a new PTP host API in an upcoming commit.

Change-Id: Ib914194e332b5c090cb8e34ed35bd691bc9f85d1
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-06 11:47:56 -05:00
Joe Onorato
c7fcba4b7b Make the volume keys adjust the media volume by default if the device is not "voice capable."
Change-Id: Ide396f8940a075c0b00b7c983c1769c1cc0f17bf
2011-01-05 16:53:11 -08:00
James Dong
df9b349b96 Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java
Change-Id: I34dfc1daa3bed1f334f3f266cbe70d1e3d7924f6
2011-01-04 15:03:48 -08:00
James Dong
6e77de71ac Remove captureFrame from MediaMetadataRetriever.java class
It has been replaced by getFrameAtTime() method

Change-Id: I9ed762e10e61dbc188e2a740e489a3e2ef9a6bb2
2011-01-04 12:13:44 -08:00
Mike Lockwood
0cd0136d44 Move MTP Java classes to android.mtp.* package.
Change-Id: Ib18bcaabf314241a95e517d0b93be5845d988e2c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-30 11:54:33 -05:00
James Dong
2116dc91e9 Expose AMRNB/WB and AAC encoder and related file output formats
Cherry-picked from GB

bug - 3305667

Change-Id: I116ba908666d712495a1bd2bcc47c35f274c7fae
2010-12-22 13:42:36 -08:00
James Dong
27d4ad2a57 am 2bf89b21: Merge "Expose AMRNB/WB and AAC encoder and related file output formats - do not merge" into gingerbread
* commit '2bf89b2197674ccc414ea60a61199562df9dc52b':
  Expose AMRNB/WB and AAC encoder and related file output formats - do not merge
2010-12-22 12:40:57 -08:00
James Dong
d609ca7f6a Expose AMRNB/WB and AAC encoder and related file output formats - do not merge
bug - 3305667

Change-Id: I8f137af7f87cb010f75cae1777b9ec6b6af8214f
2010-12-22 12:12:12 -08:00
Mike Lockwood
fbc4939d2b MediaScanner: Fix handling of .nomedia files in directories
In particular, fix the code that prevents the database triggers from deleting
files when a .nomedia file is added to a directory

Change-Id: Ie913223f3b1bbf9122842a675b96d4baac3b1c6f
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-17 12:27:47 -08:00
Mike Lockwood
076e05b488 MediaScanner: Add support for scanning empty directories
Currently the media scanner does not create database entries for directories
unless they contain a file that is scanned.
Fixing this so we provide a consistent view of the world to MTP.

Change-Id: Ia776acfeae23192183e7192d63cdc34d830ea889
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-16 15:35:36 -08:00
Chih-Chung Chang
c32dd5f2d1 Fix 3274309: Returns correctly sized thumbnails for MINI_KIND video thumbnails.
Change-Id: I88b293e44430eebe780dfb9eb06d80f8ce89483f
2010-12-16 17:44:30 +08:00
Eric Laurent
2c61bee2b0 Change audio routing policy for HDMI
HDMI device should have a higher priority than analog dock audio but a lower priority
than wired headsets.
Also modified AudioService so that HDMI is mapped to DEVICE_OUT_AUX_DIGITAL device and not
DEVICE_OUT_DGTL_DOCK_HEADSET as before to enable discrimination between SPDIF going to
digital dock and SPIDF going to HDMI.

Change-Id: I887d0c73479784dd2edaf41ce1a7d8d0bdcbb4bd
2010-12-15 11:01:48 -08:00
Mike Lockwood
55f808cff9 MTP: Make recursive delete more efficient
Change-Id: Iec9df8ac910f5257236b59c95b0ee3d7d05f367c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-14 14:16:44 -08:00
Mike Lockwood
bafca214ea MTP: check for replacing existing files via the database instead of the file system
Change-Id: I283dab48f24d2836e48fab8e49764a9cdf13de55
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-13 21:50:09 -08:00
Mike Lockwood
eb46d0601e MediaScanner: No longer delete playlist files that have no valid entries
When copying files from MTP we must keep the file in the database, even
if we cannot find any of the playlist entries (or even if it is not a valid playlist file)

BUG: 3260341

Change-Id: I4b39027ee25ffae6778224cf74830a4b1ca3fecb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-13 12:10:45 -08:00
Jean-Michel Trivi
b6a0dfb0f1 Merge "Fix bug 3275151 Request and abandon audio focus with audio mode changes" 2010-12-13 09:01:34 -08:00
Mike Lockwood
7f36b19b6b MTP: Add support for reserve storage setting to avoid low storage situations.
Set resource config_mtpReserveSpaceMegabytes to number of megabytes to reserve.
If MTP has dedicated storage this value should be zero, but if MTP is
sharing storage with the rest of the system, set this to a positive value
to ensure that MTP activity does not result in the storage being
too close to full.

BUG: 3250924

Change-Id: I881c87240da268bad1ea1b99ad03673ab85ffdbf
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-12 12:17:43 -08:00
Jean-Michel Trivi
2ade576148 Fix bug 3275151 Request and abandon audio focus with audio mode changes
Before the introduction of the MODE_IN_COMMUNICATION audio mode,
 "calls" were only made through telephony and the PhoneStateListener
 was used to request and abandon audio focus as calls where started
 and ended. VoIP applications do not cause phone state events to
 be broadcast, and set the audio mode to MODE_IN_COMMUNICATION
 directly. This change monitors mode changes to automatically
 grab and abandon audio focus.

Change-Id: Ie9a4193e35ba8447764fac66a988959a93c4909f
2010-12-11 13:55:58 -08:00
Mike Lockwood
51f56cbd30 Merge "MTP: Improve argument checking in SendObjectInfo" 2010-12-08 17:15:22 -08:00
Mike Lockwood
365e03e494 MTP: Improve argument checking in SendObjectInfo
In particular, make sure the parent is a folder and make sure file
does not already exist.

Change-Id: Ifa870faba3285f03a92025d9e82f93fed78a761c
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-08 16:09:37 -08:00
Eric Laurent
7b2029be0b Merge "Fix issue 3159946." 2010-12-08 11:05:28 -08:00
Eric Laurent
62ef767b15 Fix issue 3159946.
AudioService now uses SCO virtual calls instead of voice recognition to
implement startBluetoothSco() method.
Also make sure that a virtual call is not started when SCO audio is active
due to in call audio or voice recognition.

Change-Id: I93ed119afbc57250a4433201156714e35f70fea4
2010-12-07 15:24:58 -08:00
Mike Lockwood
ea93fa16b1 MTP: Implement MTP_DEVICE_PROPERTY_IMAGE_SIZE device property.
Return screen size as preferred maximum image size.

Change-Id: I8dc4afb0e49fe45f6925a35aa443d3fc30211453
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-07 10:41:35 -08:00
James Dong
f6bd1ea0c7 Replace MediaMetadataRetriever.captureFrame() with MediaMetadataRetriever.getFrameAtTime()
as part of the preparation for publishing MediaMetadataRetriever as public Java API

bug - 2433195

Change-Id: I6e8a771347e3d89bfe359ae403ebfe3205ea6313
2010-12-03 17:14:25 -08:00
James Dong
faf09ba940 Prepare for publishing MediaMetadataRetriever as public API
step one:
o replaced captureFrame with getFrameAtTime
o removed getMode

bug - 2433195

Change-Id: I38a8cecef29014692f0b08b8818326e3ebb40a12
2010-12-03 15:32:47 -08:00
Gil Dobjanschi
f3332a1d87 Merge "Remove the VideoEditorTestImpl" 2010-12-02 14:55:48 -08:00
Andreas Huber
0a218eab61 Merge "Squashed commit of the following:" 2010-12-02 14:04:55 -08:00
Gil Dobjanschi
731e46575a Remove the VideoEditorTestImpl
Change-Id: I16302716f4aa32f69f48c9f4cc5732b421c1a675
2010-12-02 13:50:49 -08:00
Gil Dobjanschi
cd023f98fa Merge "Added a callback interface to the generatePreview method." 2010-12-02 13:39:06 -08:00
Andreas Huber
b5c6afc208 Squashed commit of the following:
commit de99ae4a523ff5ec40b47071f22fdde1a4b2a0bf
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 2 13:18:40 2010 -0800

    Scan for sync words to find H.264 frame/AAC frame boundaries if PES packets do not start with them.

    Change-Id: If2861982ecb3006fac806105dbfcd1d43c2a4205

commit be23791ff0d037aa7073589cdc8bfc362e1c281d
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 2 13:12:39 2010 -0800

    Properly expand relative key URLs and strip surrounding quotes in the M3UParser.

    Change-Id: I013a6d83a64f095d090e5c7730298bdac7d03ab4

commit 0f1d8f65effe0cc42a265dd91d8b91dce6534325
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 2 13:11:27 2010 -0800

    Ugly hack that assumes that any http url containing "m3u8" refers to an httplive stream.

    Change-Id: I05d7bbc5dab0f9822558122b5b9dc2a109ed8518

commit 255f0d5cdb1072ecd66b47ee614bf574f1388e5a
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 2 13:10:56 2010 -0800

    Add one more mimetype "application/x-mpegurl" to identify httplive playlists.

    Change-Id: I63fd3b8c2539c9ee23c077df533157af78b10863

Change-Id: I135687383009dbe32d690c9ba8dea60159adc616
2010-12-02 13:27:47 -08:00
Gil Dobjanschi
786ecf849c Added a callback interface to the generatePreview method.
Change-Id: I7ba678aba47f232e1c320bb36decf59f80f3755d
2010-12-02 13:13:15 -08:00
Mike Lockwood
f45853af50 MediaScanner: Fix path mismatch in code that check for missing files in postScan()
BUG: 3213640

Change-Id: I102d6c9ae95adadb855e2199380117808ccaa1ee
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-02 10:35:49 -05:00
Mike Lockwood
7d7fb63071 MTP: Add support for multiple properties in GetObjectPropList command
Change-Id: Ib469a6c8141937aaa3e811345056195117abb4b2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-02 08:16:12 -05:00
Eric Laurent
938f2577e6 am 371ed722: am 688f4c58: Merge "Update java doc for visualizer FFT capture." into gingerbread
* commit '371ed72216789505acadfac3f2e905dafb04f6e0':
  Update java doc for visualizer FFT capture.
2010-12-01 03:37:07 -08:00
Eric Laurent
371ed72216 am 688f4c58: Merge "Update java doc for visualizer FFT capture." into gingerbread
* commit '688f4c58d4a7590ad47c219af3a5b8479d3a084d':
  Update java doc for visualizer FFT capture.
2010-11-30 11:56:00 -08:00
Eric Laurent
688f4c58d4 Merge "Update java doc for visualizer FFT capture." into gingerbread 2010-11-30 11:50:25 -08:00
Mike Lockwood
84e3916720 Merge "MTP: Don't fail in playlist transfer if not all playlist items can be found." 2010-11-30 09:22:00 -08:00
Mike Lockwood
7adfd1896c MTP: Don't fail in playlist transfer if not all playlist items can be found.
Change-Id: I8275c4e5eca34e193a3cedcba16442bf388e74eb
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-30 12:19:50 -05:00
Shyam Pallapothu
ca3c639cc4 Merge "Added new bitrate values" 2010-11-24 14:14:28 -08:00
Gil Dobjanschi
83cd9dcf98 Added new bitrate values
Change-Id: I2e6ab51d9a845beca02f84cefc66663fbf89aabf
2010-11-24 11:16:38 -08:00
Mike Lockwood
c0b8b321d5 Rename MtpClient and MtpCursor to PtpClient and PtpCursor
Change-Id: I26fce3bf32c8e9c8d592106af7ab4c35b19e0996
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-23 10:30:31 -05:00
Mike Lockwood
a31560598a Rename android.provider.Mtp to android.provider.Ptp
We are only supporting the PTP subset of MTP in host mode and have
no plans for full MTP, so calling it Mtp was misleading.

Also moved ACTION_MTP_SESSION_END Intent name to android.provider.MediaStore
and added it to the public API.

Change-Id: Ie35d15864d5972e65a39b982aa51316ecca3725a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-11-23 10:30:31 -05:00
Gil Dobjanschi
e45674e284 Merge "Begin transition was invalidated when the image duration was changed." 2010-11-22 16:38:38 -08:00