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
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>
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
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>
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
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
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
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
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>