3481 Commits

Author SHA1 Message Date
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
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
James Dong
69b43587be Merge "Remove captureFrame from MediaMetadataRetriever.java class It has been replaced by getFrameAtTime() method" 2011-01-04 13:12:47 -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
Andreas Huber
90c6565741 Make AwesomePlayer's reset process more verbose to track down ANRs.
Change-Id: I8c9fa872263796ba61b3e8de6bc05d50f57833f5
related-to-bug: 3302399
2011-01-04 10:19:13 -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
Ying Wang
8cb9975f35 Fix build.
Due to a bug (fixed by 	59163bf2f15e28712be6598144ae0fdb94dac52b),
libstagefright_yuv.so was actually not prelinked.

Change-Id: Idbc9b968708d0fc31a087d2e4f24398072d915e2
2010-12-29 13:34:20 -08:00
Mike Lockwood
da03aaad78 Change libusbhost and libmtp from static to shared libraries
Change-Id: Iccc67db32400cdeb88aa33261c9e0cf73db992ca
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-12-29 09:12:15 -05:00
Andreas Huber
54e6649e4c Squashed commit of the following:
commit eaeaa2672d4e0a82891493b2bde8bdd0c0e79a1b
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 23 10:26:48 2010 -0800

    Remove lowest bandwidth stream if using the legacy player.

    Change-Id: I2f885e26344996de9152f8fda9fd6bdef89bf953

commit 7d652972615b2750fd8f1c21b9fab0e136df2b82
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 23 10:14:36 2010 -0800

    Don't clear the packet source's format for legacy discontinuities.

    Change-Id: I9bd5a21b9bd28043ad38bd0658ccc8eda3c1079a

commit 2b18a45aac17cbfe1aa089d0f6510957d438dd64
Author: Andreas Huber <andih@google.com>
Date:   Thu Dec 23 10:13:55 2010 -0800

    Use NuPlayer for HTTP live streaming based on runtime property.

    adb shell setprop media.httplive.enable-nuplayer true

    Change-Id: I22738df3403985dc8e6992b1ab5da5747309f773

commit 50d899fb7b9ea52c3994b0a58e993998d926aeed
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 16:25:22 2010 -0800

    Make ACodec a lot less verbose.

    Change-Id: I94c7e499b61032321ffaf999f5ad2c913cde6a48

commit b19e1740cb4d02990a56844654b5d019987c6405
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 16:22:22 2010 -0800

    Wait until we have fresh codec-specific-data before instantiating the decoders

    after a discontinuity involving a format change.

    Change-Id: I7bcf9b5ae3319f08bf8978a117e8ee5220902e37

commit 06428c006906c9099e430aface3b439ff1d36ecc
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 15:20:38 2010 -0800

    Disable random seeks in the streaming tool for now.

    Change-Id: Ie86fde422dcfc4b2c7a01be51a193fda9c88cd71

commit e19db68f3bea8a61c191f60f6940f30e3a0d5f1b
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 15:20:27 2010 -0800

    Tweak HTTP live parameters.

    Change-Id: If4b71e12485facc523a8a43d8213d0feb190daab

commit 1e9942791538c2256b579d96c6c04264b0d8b087
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 14:48:23 2010 -0800

    Enable http live streaming through NuPlayer for http URLs containing the string m3u8

    Change-Id: I1691fe12ae8f1507fe3673313959cd50bc324624

commit 4c33f96a6e499ee0efe0e70b687094430cb7c1c0
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 14:40:27 2010 -0800

    Support for HTTP live streaming in NuPlayer.

    Change-Id: Iacba1c3ebaeb8d3b972185deaf4cff18c8009c54

commit ddf705ce553708bc5b13d89a878484cf839bd674
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 13:42:47 2010 -0800

    StreamingSource now a subclass of abstract NuPlayer::Source

    Change-Id: Ia6c7c639628910b9d1f37decc55da48b07a70de3

commit 9e04a8406b1882a8e3fdeb7b4d52db5ae70b970a
Author: Andreas Huber <andih@google.com>
Date:   Wed Dec 22 13:33:52 2010 -0800

    Refactor media data sourcing to NuPlayer::Source.

    Change-Id: I1db9fb08c4e527bf7b19c29978cf342c2b0a0bc9

Change-Id: I9610a097481dda58f22142eacda3ac2dba0b63f9
2010-12-23 10:27:40 -08: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
6cba61ee68 Merge "Avoid using private Bitmap constructor to generate bitmaps" 2010-12-22 12:03:39 -08:00
James Dong
0e4b535b43 Avoid using private Bitmap constructor to generate bitmaps
bug - 2433195

Change-Id: Ic74225286c9884055ae751cf76a1d65e8e70b3ae
2010-12-22 11:45:42 -08:00
Andreas Huber
222e689267 Distinguish discontinuities w/ a format change from those without.
Shutdown decoders as needed in anticipation of a format change, otherwise just flush.

Change-Id: Ieb04f8aa8658569b091409c4903075fd496e5abb
2010-12-22 10:03:04 -08:00
Andreas Huber
c0bfdb257c Better handling of forming absolute https URLs, runtime error on https:// access.
Change-Id: I7f6275520b0bd070e645024dd151a8541b8787b2
2010-12-21 14:36:19 -08:00
Andreas Huber
3f3c58f1ef Merge "Squashed commit of the following:" 2010-12-21 10:47:34 -08:00
Andreas Huber
41c3f74048 Squashed commit of the following:
commit 63be8ceb8b2354fb997a277c0092abae015ecf10
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:45:34 2010 -0800

    Enable handling of discontinuities that involve potential format changes.

    Change-Id: I21848a113db8764abb54bdcf302b0923253eaf4d

commit d18a7f80ec09af382026809263dcbbfa9e7a9ec8
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:45:01 2010 -0800

    Signal whether or not a format change occured as part of the discontinuity.

    Change-Id: I06e64f542f4369549c9cebbb892dc612346ae43d

commit c400adbd5fdbd65cfef7aed9ec65bcaace4bb69b
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:44:46 2010 -0800

    A little more instrumentation of ACodec

    Change-Id: I07f4aeccbbd15cdd9f80f48c3f92ee984ef6d92b

commit 1d802ee01f47b3cdc5b89502cec7fbb595e197a3
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:43:58 2010 -0800

    Only sync audio/video queues if both types of media are actually present.

    Change-Id: Ic88edf9bb1ebd4034c08747cce9877a4e28e0d35

commit e402da39d9a4d8b75653a78f728e20a3ef0fb497
Author: Andreas Huber <andih@google.com>
Date:   Fri Dec 17 13:42:24 2010 -0800

    Disable the random seek for now.

    Change-Id: Iddd597b546e2f229e88214f9bdd6452bb188105e

Change-Id: I27c4d9ba916080be94ce6117dbb095e9022ed62b
2010-12-21 10:22:33 -08:00
James Dong
7455630fff Add more debugging code to track down hang during video recording
bug - 3276561

Change-Id: I1e02590b23031f29bcbfc4a1064f039ed80cb862
2010-12-21 10:17:53 -08:00
James Dong
2a1cc5ac30 Merge "Backward-compatibility max file size support, ignoring 0 or negative file size limit" 2010-12-20 12:00:52 -08:00
James Dong
26ea64c744 Backward-compatibility max file size support, ignoring 0 or negative file size limit
bug - 3281011

Change-Id: I2d3ae4565602e2374ca794c5e8d0837ad33cf0e8
2010-12-20 11:59:17 -08:00
Jamie Gennis
7dd7c69f0f Merge "Change a Stagefright assert to an error check." 2010-12-20 10:22:48 -08:00
Jamie Gennis
fd8b75afdd Change a Stagefright assert to an error check.
During OMX codec initialization it is possible that buffer allocation
fails.  This changes Stagefright to set an error state and abort
initialization rather than crashing with an assert failure when that
happens.

Change-Id: I2fc2fadfe75657cdbf649cc8cafd2e4c251a5f8b
Bug: 3282700
2010-12-17 18:26:28 -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
28cfb113da Merge "MediaScanner: Add support for scanning empty directories" 2010-12-17 11:22:12 -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