3503 Commits

Author SHA1 Message Date
James Dong
c14b10c306 Merge "Add audio encoding parameters check" into honeycomb 2011-01-13 10:21:28 -08:00
Marco Nelissen
f679ba7d94 Cherrypick from GB. Do Not Merge.
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: I67deb044800a6cb626c69bf3d54d51df4bf830f2
2011-01-13 07:17:20 -08:00
James Dong
54815a78af Add audio encoding parameters check
bug - 3345296

Change-Id: If3f33955f5473b0c5ad9c9b85f8b5cb21ddd7e65
2011-01-12 20:45:16 -08:00
James Dong
4507cef05e Remove legacy code that should not be used
Change-Id: I9209e3a32b64a30627848d2a425f32ed6b73e8a2
2011-01-12 16:38:45 -08:00
Marco Nelissen
a8a656b0c5 Fix scanning of modified files.
When a media file, particularly a music file, is updated, the media
scanner should use the correct Uri to update it, and not the generic
files Uri. Otherwise, things like artist and album name will not
be properly updated.

Change-Id: I576629c51282bfbeb61c23f1e43b072700084a6c
2011-01-12 14:46:49 -08:00
Andreas Huber
7928ca6f87 Merge "Fail to parse duration instead of asserting, if the server response cannot be parsed." into honeycomb 2011-01-12 14:33:51 -08:00
James Dong
068b41d5d4 Merge "Publish MediaMetadataRetriever.java as public API" into honeycomb 2011-01-12 14:31:34 -08:00
Mike Lockwood
0dd9f4de3e MediaScanner: Do not update the file path when updating records already in the database
The path should never change (media scanner treats renames as a delete and an insert)
and we want to preserve the mixed case paths in the database to avoid exposing the
lowercase squashing to MTP.

Change-Id: I79ef37e143c607242d438a4a0643d40191965b6a
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-12 17:27:37 -05:00
Mike Lockwood
a29464335a Merge "Media Provider and MTP now use emulated /mnt/sdcard instead of /data/media" into honeycomb 2011-01-12 14:25:13 -08:00
James Dong
11eab056dd Publish MediaMetadataRetriever.java as public API
o Removed setMode() methods and related mode constants
o Removed some of the unused the metadata keys
o Updated the javadoc

o part of a multi-project change.

bug - 2433195

Change-Id: I5ed167f1fd6a53cb143b7dc385b149431d434438
2011-01-12 14:14:11 -08:00
James Dong
cb0f6d0b42 Merge "Speed up MP3Extractor using cached reads" into honeycomb 2011-01-12 11:54:32 -08:00
Andreas Huber
4bca5e19d5 Fail to parse duration instead of asserting, if the server response cannot be parsed.
Change-Id: I42324468edca5ccce29486059091da8e64f36326
related-to-bug: 3338518
2011-01-12 10:31:04 -08:00
James Dong
31d8a03e44 Speed up MP3Extractor using cached reads
Change-Id: I53a5ed76bc2f76f0c184f3800b5448f677117ae3
2011-01-12 09:49:15 -08:00
Mike Lockwood
1c4e88d0b0 Media Provider and MTP now use emulated /mnt/sdcard instead of /data/media
This rips out some complicated code that was added since gingerbread
that is no longer necessary.

Change-Id: Iab5ecb7314c06221475ce01ef483f34f17003b06
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-12 12:48:13 -05:00
Glenn Kasten
4e26bc686b Fix race in buffer ref counting.
Change-Id: Id47c30469c3e3ec293ed2ef574a191275b5044d6
2011-01-12 09:22:07 -08:00
Andreas Huber
0827e697a9 Merge "Increase cache size and low-watermark threshold, also" into honeycomb 2011-01-11 15:20:39 -08:00
Andreas Huber
7f92be88e0 Merge "Properly parse Matroska lacing flags and extract all frames contained in a block." into honeycomb 2011-01-11 15:16:04 -08:00
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
Andreas Huber
6fe6b4c6f3 Properly parse Matroska lacing flags and extract all frames contained in a block.
Change-Id: I1aca46b2e28b9cad88bf4a296f675e81e66ee095
related-to-bug: 3331623
2011-01-11 13:05:36 -08:00
James Dong
530069031e Merge "Fix uninitialized rect structure for retrieving rect cropping information from decoder" into honeycomb 2011-01-11 11:23:47 -08:00
James Dong
545c22ffd2 Don't release the video recording frame after recording is stopped in CameraSourceTimeLapse.cpp
bug - 3334999

Change-Id: I1c83080713696221048da9b1a9f8c2ee48849ade
2011-01-10 20:43:33 -08:00
Andreas Huber
b736cb28ab Return a runtime error instead of asserting if the M4vH263Decoder fails in start()
Change-Id: Ie704a72685f749613fa0ed5fa6f461abc0406371
related-to-bug: 3328200
2011-01-10 11:57:30 -08:00
Andreas Huber
748ba9a951 Merge "NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications." into honeycomb 2011-01-10 11:26:38 -08:00
Andreas Huber
7caa130a98 NuPlayer now properly sends MEDIA_SET_VIDEOSIZE notifications.
Change-Id: I99b4223ad6ecfd8839a3c0e737fef3165565d76d
related-to-bug: 3336496
2011-01-10 10:38:31 -08:00
James Dong
681e89c082 Avoid deadlock in OMX::freeNode by making sure OMXCodecObserver does not hold the last reference of OMXCodec object
bug - 3336424

Change-Id: I4c79b66a900c527e3ae6a833f76d5da1b75c5a89
2011-01-10 08:57:50 -08:00
Eric Laurent
e15ac3b970 Merge "Fix issue 3261656." into honeycomb 2011-01-07 17:20:59 -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
pmehendale
28f939db9d Awesomeplayer : Frame dropping logic change
Changed late frame drop policy, now we are dropping only 1 in 8,
late (> 40ms) frames. Dropping every late frame result in lot of noticible
pauses, usually with peaky bitrate activity these pauses become more prominant.
Dropping few frames is still required to allow overall playback chain,
to regain the performance.
Experimentally decided to drop Max one late frame in 8.

Change-Id: If20848d619a76aaf8179b1e5c3155610e3bc85fd
2011-01-07 16:14:40 -08:00
James Dong
a173541c6b Fix uninitialized rect structure for retrieving rect cropping information from decoder
o This patch is from NV.

bug - 3333254

Change-Id: I02bc26af464ea0bc9ad9f2e111474e8398c67220
2011-01-07 14:57:34 -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
Andreas Huber
24b3a4ccd6 Fix typo.
Change-Id: I2d7796425ea746432964ce48959b6c227d31df11
2011-01-06 17:32:00 -08:00
Andreas Huber
ba572aaea6 If the stream for the new bandwidth doesn't have the segment we're looking for...
go back to the previous bandwidth' stream.

Change-Id: I3477cb6932102883509a7cbe9fb2b3bb02dac8c6
2011-01-06 16:32:05 -08:00
Andreas Huber
d7069ca0bc Use NuPlayer for HTTP live streaming playback by default.
Reversed the property logic, set media.httplive.disable-nuplayer to true to revert

Change-Id: I1057940667aaab56bb75c9ea15c2cdcab736f3c6
2011-01-06 14:14:56 -08:00
Andreas Huber
c0dbe3a445 Colorconverter may not support some src/dst bitmap configurations.
Let it return an appropriate error code instead of asserting.

Change-Id: I7fe0dfa169e1cbdecb04c5fcbe8501e73362d05e
related-to-bug: 3328212
2011-01-06 12:42:33 -08:00
Andreas Huber
eec06d3679 If we failed to initialize the codec after transitioning to IDLE state, don't assert
during shutdown.

Change-Id: I40ac44260fb136c15d6dcb9f5ad62211640c66ec
related-to-bug: 3328222
2011-01-06 12:42:13 -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
Mike Lockwood
65d2a4cb5f Remove CameraBrowser test app
Change-Id: I7e04ef674746c5c2cdf421a2b9ec440d7ea831bd
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-06 11:47:25 -05:00
Mike Lockwood
215b682b8a MTP: changes to use new usb_request support in libusbhost
Change-Id: Ic091eab166a66efcde0395dcebbbc513f2322fca
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-01-06 11:46:55 -05:00
Joe Onorato
f4e4b2753d Merge "Make the volume keys adjust the media volume by default if the device is not "voice capable."" 2011-01-05 20:53:14 -08: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
Andreas Huber
b7df8ec4db Merge "Some more fixes regarding HTTP live in NuPlayer." 2011-01-05 16:34:06 -08:00
Andreas Huber
847551cff3 Some more fixes regarding HTTP live in NuPlayer.
Change-Id: I9e29615fa8ee6c7bd4189373a75c20caef3fd2b1
2011-01-05 16:24:27 -08:00
Andreas Huber
a4bbc386a0 Merge "Seek/Duration support for completed http live streams in NuPlayer." 2011-01-05 14:50:00 -08:00
Andreas Huber
08e10cb404 Seek/Duration support for completed http live streams in NuPlayer.
Change-Id: I55bbe75d87140c07b1927d14ad24130fce803463
related-to-bug: 3321475
2011-01-05 14:48:31 -08:00
James Dong
876e44dfb5 Merge "Use video output if necessary for timelapse video recording" 2011-01-05 10:27:55 -08:00
James Dong
7f08071f3d Merge "Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java" 2011-01-04 18:19:45 -08:00
James Dong
a1d2d8f7a5 Use video output if necessary for timelapse video recording
Change-Id: I88d0cc824f0fbf8b2f392fbc23c69b5bfefda1b8
2011-01-04 16:09:07 -08:00
James Dong
df9b349b96 Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java
Change-Id: I34dfc1daa3bed1f334f3f266cbe70d1e3d7924f6
2011-01-04 15:03:48 -08:00
Andreas Huber
b794a5e53a Merge "Properly shutdown the decoders on a reset() in NuPlayer's implementation." 2011-01-04 14:47:18 -08:00
Andreas Huber
cbeaca7a81 Properly shutdown the decoders on a reset() in NuPlayer's implementation.
related-to-bug: 3321470
Change-Id: Ida6d2171c5a3a407188d4633602b764f8fe7086a
2011-01-04 14:07:58 -08:00