5298 Commits

Author SHA1 Message Date
Andreas Huber
3e408f39ef Support AMR, G.711 and vorbis audio in ACodec and friends.
Change-Id: I08c03219bf2d60fc5c6e89957bd4b4c615570983
2011-09-28 12:37:36 -07:00
Jean-Michel Trivi
26b3d1ff38 Fix bug 5357295 NPE on display when remote control client dies
When a IRemoteControlClient dies, that client is set to null
 in the stack of remote control entries (mRCStack). This is done
 by calling registerRemoteControlClient() with a null client.
The bug is that registerRemoteControlClient(), after storing
 the new client, uses it to let it know what the current
 remote control display is. When that display is non null, the
 client is sent the current display. So when a client died
 when there was a display, the client reference was accessed
 in the part of the method where we haven't yet checked whether
 it is null or not.
The fix consists in moving the setting of the display on the
 client (method plugRemoteControlDisplay) only after having
 checked that the client is non-null.

Change-Id: Ic74d6cba9e3a3a16e78cd80a1ae5901abfeb3905
2011-09-28 11:43:36 -07:00
Marco Nelissen
8df38890d4 Merge "Log a warning when a MediaPlayer is finalized without having being released. b/5382634" 2011-09-28 09:41:12 -07:00
Marco Nelissen
8dc208476f Log a warning when a MediaPlayer is finalized without having being released.
b/5382634

Change-Id: I756d09d16a92ab8ce736c16a24e319a87be6c8de
2011-09-28 09:21:11 -07:00
James Dong
dbf85120b8 Flush resets the count of played audio frames
Change-Id: I0cda94646a71757fa113a199d29235e13efd7ac3
related-to-bug: 5331470
2011-09-27 22:47:25 -07:00
Xia Wang
db6028508c Reorganize media framework functional tests.
Group tests into sub-packages

Change-Id: I878e14487142de495fc646037d5d0b51e39341bd
2011-09-27 16:00:20 -07:00
Andreas Huber
262d7e8e21 Cut down on AwesomePlayer and OMXCodec's verbosity.
Change-Id: Ifd95717e8ea0fb0327099b16d72a6ed58c7c9924
related-to-bug: 5382014
2011-09-27 15:07:36 -07:00
Andreas Huber
d33b3881f7 Merge "Signal an appropriate error even if there are no active streams yet." 2011-09-27 13:36:22 -07:00
Andreas Huber
7922619e9c Signal an appropriate error even if there are no active streams yet.
Change-Id: I3ac1053ad288558b62ee18056dfd0a9ce0da8f49
related-to-bug: 5372901
2011-09-27 12:13:37 -07:00
Eric Laurent
53719fc4c5 Merge "Fix issue 5373048: AudioCache decode errors" 2011-09-27 10:32:17 -07:00
Eric Laurent
9968a36f29 Fix issue 5373048: AudioCache decode errors
When decoding a file for the SoundPool, do not
reject the entire file in case of error but
return what was decoded so far instead.

Change-Id: Iff199a1b6a4c8e064e42a0dfe0704e0ae36a27fd
2011-09-27 10:23:38 -07:00
Andreas Huber
928baf1f54 Propagate error signalled by the source all the way to the output EOS notification.
Change-Id: I30e959a6d669f09745c59fbdebee08f869511cf7
related-to-bug: 5372901
2011-09-26 10:53:29 -07:00
Andreas Huber
3bade9504a Merge "Support even more .avi files with .mp3 content not aligned to chunk boundaries" 2011-09-26 08:09:11 -07:00
Andreas Huber
bea34b942d Support even more .avi files with .mp3 content not aligned to chunk boundaries
Change-Id: I3ace4118e2e519648c23c51d0b699ba0d7511a5d
related-to-bug: 5349382
2011-09-23 14:59:31 -07:00
Eric Laurent
65837cede4 Merge "Fix issue 5355047: Automated effect tests fail." 2011-09-23 14:43:12 -07:00
Eric Laurent
5e7acae2c3 Fix issue 5355047: Automated effect tests fail.
Fixed several regressions in automated audio effect tests due
to changes in effect framework and visualizer FFT output range.

- Do not suspend Volume effect on session 0 when effects are
enabled on specific sessions.
- Adapt energy detection thresholds to new visualizer FFT range.
- Leave more time for BassBoost and Virtualizer effects to ramp up
before measuring the effect.
- Removed second insert reverb left by mistake on the player session
in preset reverb test.

Change-Id: I7a1ad1372d783fa7900eb9dd1d3b47f54d8d766f
2011-09-23 10:15:05 -07:00
Pannag Sanketi
91d3413790 am 1d71c7b4: Merge "Returning EOS in SurfaceMediaSource:read" into ics-factoryrom
* commit '1d71c7b40a7f38487e602e78f45279b6a8364fc9':
  Returning EOS in SurfaceMediaSource:read
2011-09-23 09:08:11 -07:00
Pannag Sanketi
a1849fceaf Returning EOS in SurfaceMediaSource:read
In SurfaceMediaSource::read, if disconnect has already been called, then
ERROR_END_OF_STREAM should be returned rather that NO_INIT. Else, it
sometimes leads to a crash in mediarecorder stop() call.

Related to FactoryROM bug: 5332812

Change-Id: I22132538ab2501d084e0283876817b1ec3f64a1d
2011-09-22 17:03:48 -07:00
Dianne Hackborn
dda868cd33 Merge "Keyguard sound needs to hold wake lock." 2011-09-21 15:15:18 -07:00
Andreas Huber
bfd1c9d93f Merge "Support some .avi files containing H.264 video, log warnings if audio/video unsupported" 2011-09-21 13:56:09 -07:00
Dianne Hackborn
e47e8520fa Keyguard sound needs to hold wake lock.
We need to hold a wakelock while playing the keyguard lock sound,
so that it actually completes before the CPU goes to sleep.

Change-Id: I144c345383afeb911ea461b2eb17b31183b6d092
2011-09-21 13:34:33 -07:00
Andreas Huber
3001e47212 Support some .avi files containing H.264 video, log warnings if audio/video unsupported
Change-Id: Ie7280f25f2bd19f32234c08673e64ceb65833677
related-to-bug: 5349382
2011-09-21 13:19:54 -07:00
Glenn Kasten
faa75f6146 Merge "Bug 5234242 audio continues after discontinuity" 2011-09-21 10:51:43 -07:00
Glenn Kasten
cd5c896381 Bug 5234242 audio continues after discontinuity
Reduce to 8 buffers of 10 packets from 16 buffers of 20 packets.

Change-Id: Ifdb5e15535989fbb6e5e1b70d5f9f71dc66a5c83
2011-09-21 10:40:01 -07:00
Jean-Michel Trivi
eb060254a0 am 9c43016b: Merge "Bug 5045498 Keep track of RemoteControlClient play state change time" into ics-factoryrom
* commit '9c43016b52afa855156aac2dc81a2bbe1e4ab436':
  Bug 5045498 Keep track of RemoteControlClient play state change time
2011-09-21 09:36:56 -07:00
Marco Nelissen
28b9a063ad Merge "MediaScanner: To query row ids of music files when handling playlists." 2011-09-21 08:48:46 -07:00
Jean-Michel Trivi
68622396b6 Bug 5045498 Keep track of RemoteControlClient play state change time
Store the time at which a RemoteControlClient changes it playback
 state, and send that time to the IRemoteControlDisplay.
This change will enable displays to implement strategies such as
 timeouts (e.g. to not display transport controls for clients which have
 been paused or stopped for a certain amount of time).

Change-Id: I902882500565743d455d56f6000efaf612cbe0a9
2011-09-20 11:59:51 -07:00
Chih-Chung Chang
ed4cfe70ca Merge "Fix 5224359: Add width and height to media store." 2011-09-20 09:23:34 -07:00
Chih-Chung Chang
e1bf8efaff Fix 5224359: Add width and height to media store.
Change-Id: I27376285a551e648eb0ea010dfdf6b8ed873cdd8
2011-09-20 20:41:44 +08:00
James Dong
3907c79aeb am 92d0a64b: Merge "Add QVGA resolution to CamcorderProfile" into ics-factoryrom
* commit '92d0a64b909cd95e8f4ce587438b0cc6d2daeaa0':
  Add QVGA resolution to CamcorderProfile
2011-09-19 20:09:00 -07:00
James Dong
92d0a64b90 Merge "Add QVGA resolution to CamcorderProfile" into ics-factoryrom 2011-09-19 20:06:52 -07:00
James Dong
07b9ae3312 Add QVGA resolution to CamcorderProfile
Change-Id: Icebbafb68d8164370f98a2c36699845d10ef081b
related-to-bug: 5145483
2011-09-19 19:32:26 -07:00
Andreas Huber
e2bb99600e Merge "Remove an O(n^2) algorithm in MPEG4Extractor.cpp to speed up seeks in long streams" 2011-09-19 13:28:47 -07:00
Andreas Huber
abc63e7f46 Remove an O(n^2) algorithm in MPEG4Extractor.cpp to speed up seeks in long streams
containing B-frames.

Change-Id: Ie4dc734d2c2d5a5ce84674bb883f4b27e2278642
related-to-bug: 5336497
2011-09-19 12:21:33 -07:00
Jean-Michel Trivi
b3e6eab161 am 2f153169: Merge "Bug 5300223 RemoteControlClient uses PendingIntent for media button events" into ics-factoryrom
* commit '2f153169594249738d63aa6e2897d257f6b7d71e':
  Bug 5300223 RemoteControlClient uses PendingIntent for media button events
2011-09-19 09:51:29 -07:00
Andreas Huber
c7342fbf99 Merge "In order to recover from video lagging behind audio, drop avc frames" 2011-09-19 08:54:59 -07:00
Andreas Huber
950fc9d115 In order to recover from video lagging behind audio, drop avc frames
that are not referenced by other frames before feeding them into the decoder.

Change-Id: I822190af8f8329567bff8da1ea23136d0a765481
2011-09-16 15:19:59 -07:00
Jean-Michel Trivi
607fb6dada am f79ec360: Merge "Fix bug 5327199 Recycle bitmaps in RemoteControlClient" into ics-factoryrom
* commit 'f79ec360984011c49c52b7a19b96cbbc932df4be':
  Fix bug 5327199 Recycle bitmaps in RemoteControlClient
2011-09-16 15:02:43 -07:00
Jean-Michel Trivi
f0cff04562 Bug 5300223 RemoteControlClient uses PendingIntent for media button events
Update the implementation of the RemoteControlClient / Display
 feature rely on PendingIntent as provided in the construction
 of the RemoteControlClient instance.
The ComponentName that describes the target of the media button
 events is set as the target of the Intent from which
 a PendingIntent is constructed.
This ComponentName is still saved in the stack for persisting
 the last media button event receiver.

This CL also updates the lockscreen IRemoteControlDisplay
 implementation to use the PendingIntent supplied by the
 application when sending transport control events. A (good)
 side effect of doing this is that intent will be directly
 targeted at the application.

Restoration of the media button event receiver
 after reboot is not fully functional yet.

Change-Id: I2be82f2839e9dee1de02512437b3fb41cc386cde
2011-09-16 12:40:43 -07:00
Jean-Michel Trivi
34d0d300ca Fix bug 5327199 Recycle bitmaps in RemoteControlClient
When applying the new bitmap from the editor to the client,
 recycle the old bitmap, and set the reference to the editor
 bitmap to null.

Change-Id: I7d79e4b8410e5035fa51b20be4b1ada391c84c28
2011-09-16 11:33:50 -07:00
Andreas Huber
115cac8131 Various improvements to nuplayer playback
- Drastically cut down the number of times we supply the AudioSink with data
by estimating the time until the sink would run out of data and then scheduling
a refill in advance of that.

- Use a dedicated looper for video decoders since they are currently taking
too long to return from OMX_FillThisBuffer (bug 5325201)

- Revise thread priorities for the OMX dispatcher and software codecs, instead
of running them at ANDROID_PRIORITY_AUDIO, they now only run at
ANDROID_PRIORITY_FOREGROUND

- Since threads created by pthread_create inherit all of the parent threads
attributes including thread priority, briefly reset thread priority to
ANDROID_PRIORITY_FOREGROUND before instantiating OMX components and then
restore it.

Change-Id: If9332a3a20dad5485333d68c11de0d2d5d3fffc3
2011-09-16 10:44:02 -07:00
Gloria Wang
152f7b3985 Merge "If media player has died already, do not dec the old surface texture reference. Otherwise segfault will occur. For bug 5327664." 2011-09-15 16:56:41 -07:00
Gloria Wang
81b37d8bde If media player has died already, do not dec the old surface texture reference.
Otherwise segfault will occur.
For bug 5327664.
Do not merge.

Change-Id: I03ea7bc047aa99a106f1e010dac74f75a833ef84
2011-09-15 15:38:36 -07:00
Gloria Wang
e828beb386 If media player has died already, do not dec the old surface texture reference.
Otherwise segfault will occur.
For bug 5327664.

Change-Id: I03ea7bc047aa99a106f1e010dac74f75a833ef84
2011-09-15 15:36:02 -07:00
Gloria Wang
c286b2cc26 Cherry-pick from master. Do not merge.
Do not need to reset surface as NULL in MediaPlayer's _release.
Related to bug 5252296.

Change-Id: Ieab063cee70e072fcc4d861abe0f7979a7bab1ec
2011-09-15 11:58:25 -07:00
Gloria Wang
b107c628ba Merge "Do not need to reset surface as NULL in MediaPlayer's _release. Related to bug 5252296." 2011-09-15 10:16:00 -07:00
James Dong
1318864fa7 Merge "Change an assert failure due to unsupported level by HW AVC decoder and report the error to applications" 2011-09-14 17:42:22 -07:00
Gloria Wang
d59310d086 Do not need to reset surface as NULL in MediaPlayer's _release.
Related to bug 5252296.

Change-Id: Ieab063cee70e072fcc4d861abe0f7979a7bab1ec
2011-09-14 14:24:27 -07:00
Rajneesh Chowdury
2424c93d84 Merge "Fix for bug 5309242 [Prime] VideoEditorAPITest testVideoContentHD failed" 2011-09-14 14:01:36 -07:00
Rajneesh Chowdury
3f43e7d37f Fix for bug 5309242 [Prime] VideoEditorAPITest testVideoContentHD failed
Change-Id: Ibd52a3bda8e1cb17f1c110cc219f2c71a46e5122
2011-09-14 12:37:02 -07:00