1413 Commits

Author SHA1 Message Date
Ray Chen
b4ca6ef994 Avoid overriding DATE_TAKEN by unreliable file time. MediaProvider will calculate it if needed.
Change-Id: I05cb8628f2333c26de5c05ee1c7676b8f79a5e9a
2010-03-09 14:23:23 -08:00
Jean-Michel Trivi
758559e6b7 Fix bug 2329540
Part 1 of the fix: when the user doesn't elect to use the car dock
 for music and media, the APM was not aware of the device being
 docked.
 This is fixed by dissociating the notification for the APM of
 the docking to the dock from the sink state change of the A2DP
 device.
 Also missing was forcing the volumes to be reevaluated whenever
 the device is docked or undocked, as volumes for docks may
 differ, even when the same output device is being used.

Change-Id: If5314e27821a71adbd6df6fdf887c45208241d96
2010-03-09 12:45:55 -08:00
Jean-Michel Trivi
a9fb0a2497 Merge "Unhide API additions to AudioManager for AudioFocus support." 2010-03-09 09:17:45 -08:00
Jean-Michel Trivi
eabb6df2fa Unhide API additions to AudioManager for AudioFocus support.
Change-Id: Ifc7d764703632eb91db11587675ae70ec14510e8
2010-03-09 09:15:19 -08:00
Andreas Huber
29a02a95cb Use a more descriptive user-agent string (similar to PV's before) in stagefright http requests.
Change-Id: I4e8ea856327bdb65989f75dab3673baeaf9637c8
2010-03-08 16:50:44 -08:00
Andreas Huber
147113ee54 Merge "The audio track was accidentally not participating in the prefetch since it wasn't started at the time prepare() was called. Also, properly report the cached duration even near the end when the source has no more data to fetch." 2010-03-08 16:02:16 -08:00
Andreas Huber
dc9927d464 The audio track was accidentally not participating in the prefetch since it wasn't started at the time prepare() was called. Also, properly report the cached duration even near the end when the source has no more data to fetch.
Change-Id: I66a92fec24c9bfb25f1c186f1c877127bae2b4f9
related-to-bug: 2444425
2010-03-08 15:46:13 -08:00
Andreas Huber
0e0b0c9e3d Merge "Apparently a MemoryHeapPMem must be slap()ed for SurfaceFlinger to use the contained buffers." 2010-03-08 14:29:38 -08:00
Andreas Huber
4c987433da Apparently a MemoryHeapPMem must be slap()ed for SurfaceFlinger to use the contained buffers.
Change-Id: I86916a14c6cf9e65145711c6ded433b864f84456
related-to-bug: 2474091
2010-03-08 13:43:35 -08:00
Andreas Huber
55864df7b6 Increase the amount of data buffered at preparation time. Make sure to start preparing after the codecs have been started, otherwise no buffering will happen.
Change-Id: I2c54db085cc76f4069ab381177e94e1b81005b02
related-to-bug: 2474091
2010-03-08 12:28:22 -08:00
Andreas Huber
3c53c69a4e The prefetched source was unnecessarily holding a lock while receiving data from the network, sometimes blocking for seconds over 2G networks with corresponding drops in audio playback. Also, if the cache was full we'd report a cache duration of 0 instead of maximum size.
Change-Id: I46c8083f12f2dd728302095369197ca7e6b78bf8
related-to-bugs: 2492187, 2444425
2010-03-08 11:07:24 -08:00
Eric Laurent
29855801de Merge "Fix issue 2428563: Camera rendered inoperable by voice call interruption." 2010-03-05 16:01:47 -08:00
Eric Laurent
ba8811f552 Fix issue 2428563: Camera rendered inoperable by voice call interruption.
The problem is that AudioRecord never exits read() when a timeout occurs while trying
to get new PCM data from audio hardware input buffer: it just keeps waiting and retrying until stop() is called.
In the same time, opencore AndroidAudioInput::audin_thread_func() loop cannot be exited when stuck
in AudioRecord::read() because the iExitAudioThread flag can only be sampled when AudioRecord::read()
returns. We remain stuck with the audio input thread running.

The fix consists in modifying AudioRecord behavior in case of timeout when getting new PCM samples.
We now wait only one timeout period and try to restart audio record, in case the problem is due to a media_server
process crash. If this fails, we exit read() with a number of bytes read equals to 0 so that
AndroidAudioInput::audin_thread_func() loop can exit.

Also modified Audioflinger::RecordThread() loop so that we attempt to recover from HAL read errors.
In case of read error, the input stream is forced to standby so that next read attempt does a
reconfiguration and restart of the audio input device.
2010-03-05 11:54:23 -08:00
Andreas Huber
bda5780d39 Merge "Instead of allocating the decoder instances in response to a call to setDataSource, postpone allocation to the preparation phase where it belongs." 2010-03-05 11:00:36 -08:00
Andreas Huber
3ac94efc21 Instead of allocating the decoder instances in response to a call to setDataSource, postpone allocation to the preparation phase where it belongs.
related-to-bug: 2492205
2010-03-05 10:42:10 -08:00
Andreas Huber
d197431279 Merge "NPR's audio streams start with a 30sec segment whose mp3 headers are subtly different from those following. Allow certain bits to vary that were thought to be fixed before." 2010-03-05 09:33:29 -08:00
James Dong
ff846009ec Unhide CamcorderProfile and CameraProfile Java API
bug - 2375978
2010-03-04 21:49:35 -08:00
Andreas Huber
1d200e3b95 NPR's audio streams start with a 30sec segment whose mp3 headers are subtly different from those following. Allow certain bits to vary that were thought to be fixed before.
related-to-bug: 2490385
2010-03-04 16:49:03 -08:00
Ray Chen
7a67f156fb Remove native options. 2010-03-05 03:10:28 +08:00
James Dong
0fc6bc4cac Clean up MediaRecorder for public Java SDK
- update comments and fix a check in setAudioChannels()

bug - 2362412
2010-03-03 17:01:32 -08:00
Eric Laurent
6be0fc100e Merge "Fix issue 2456968: Alarm rings in "silent mode and when Alarm in silent mode is turned off"." 2010-03-03 16:09:55 -08:00
Eric Laurent
31951ca52a Fix issue 2456968: Alarm rings in "silent mode and when Alarm in silent mode is turned off".
The problem is that even if silent mode is active, changing the alarm volume will change current
alarm stream volume. This is true for other stream types affected by ringer mode (ring, notification...) but
the UI design is such that it is not possible to change these volumes while in silent mode.

The fix consists in modifying AudioService.setStreamVolumeInt() so that when a stream is affected by ringer mode
and we are in silent mode, only the saved volume value is modified, current value remaining to unchanged (0).
2010-03-03 11:09:11 -08:00
Mike Reed
945a9df6e3 add optional preftable to image codecs, for more control over the resulting bitmap config 2010-03-03 14:04:19 -05:00
Yu Shan Emily Lau
fde67f4925 Merge "Added the Camera Preveiw memory test which can help to isolate the memory leak issue." 2010-03-02 18:12:12 -08:00
Yu Shan Emily Lau
30a1390819 Added the Camera Preveiw memory test which can help to isolate the memory leak issue. 2010-03-02 15:42:31 -08:00
Dave Sparks
6c26fe4e8e Fix build. I screwed up a merge. 2010-03-02 12:56:37 -08:00
Dave Sparks
16433e2fe3 Add locking to signal in AudioCache::notify(). Bug 2317844. 2010-03-02 12:35:20 -08:00
Eric Laurent
2ffeeed87e Merge "Issue 2071329: audio track is shorter than video track for video capture on sholes" 2010-03-02 10:41:23 -08:00
Jean-Michel Trivi
d5176cfe6e First implementation of the audio focus management as an extension
of AudioManager and AudioService.
2010-03-02 08:39:26 -08:00
Eric Laurent
47d0a9264f Issue 2071329: audio track is shorter than video track for video capture on sholes
Add API to retrieve number of frames dropped by audio input kernel driver.

Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
2010-03-02 08:20:13 -08:00
Daniel Sandler
7491d8757f Merge "New vibrate/silent mode behavior." 2010-03-01 17:16:55 -08:00
Andreas Huber
5f0d5ce38a Ensure that the audio codec instance is actually going away before we attempt to instantiate another one, otherwise we might end up with the software codec even though the hardware codec would have been available shortly. 2010-03-01 14:58:39 -08:00
James Dong
039db81d53 Merge "Don't allow MediaRecorder.setParameter() to be invoked in the following states: error, prepared or recording" 2010-02-26 18:56:22 -08:00
Marco Nelissen
465faa925d When we're in the 'playback complete' state, don't consider pausing
an error. This makes 'playback complete' essentially equivalent to
being paused at the end, and treats it the same as being paused at
any other position.
2010-02-26 13:16:23 -08:00
Daniel Sandler
6329bf7b1e New vibrate/silent mode behavior.
In earlier versions of Android, "vibrate mode" (in which
only alarms and media produce sound, but notifications may
operate the vibe motor) was only accessible by adjusting the
ringer volume (via the device's volume rocker) down until
the "vibrate" icon appeared (between the lowest ring volume
and silent mode).

Many users prefer that "silent mode" always allow vibration.
Others prefer Android's historical behavior, in which silent
mode stops the vibes as well.

To accommodate these two distinct usage patterns, we now
allow the user to decide whether vibration is allowed in
"silent mode", a user interface abstraction that now spans
both AudioManager.RINGER_MODE_VIBRATE and
AudioManager.RINGER_MODE_SILENT.

To minimize API impact (and therefore maximize backward
compatibility), RINGER_MODE_VIBRATE and RINGER_MODE_SILENT
remain unchanged. What has changed is what happens when the
user activates silent mode, either via Settings,
GlobalActions (longpress on power), volume rocker, or the
keyguard tab. In essence, there is now only one "silent"
position in these controls, and whether RINGER_MODE_VIBRATE
or RINGER_MODE_SILENT is actually set on the AudioService is
determined by a new one-off setting
(System.VIBRATE_IN_SILENT).  This new setting isn't meant to
be a long-term API, however: in the future we hope to
replace and extend this design with a much more
sophisticated set of systemwide feedback profiles. ETA TBD.

Related changes:
  * I09ad7d69 (GlobalActions and keyguard)
  * I22ba7bcf (Settings app)

Bug: 2457183
Change-Id: I14cf91b0910261ffdfd1bf302423f41ec747d057
2010-02-26 15:37:37 -05:00
Andreas Huber
16f6354be4 Merge "The PV aac software decoder screws up if playing a mono-AACplus stream unless we output stereo data. Now we always output stereo data as the legacy OMX nodes did." 2010-02-26 10:47:11 -08:00
Marco Nelissen
3d6c986d02 Merge "Make AsyncPlayer.startSound catch all exceptions instead of only a few. Two reasons for this: - it's used in the system process - it's run in a separate thread, so the user of AsyncPlayer cannot catch these exceptions" 2010-02-26 10:46:46 -08:00
Andreas Huber
749c570be1 The PV aac software decoder screws up if playing a mono-AACplus stream unless we output stereo data. Now we always output stereo data as the legacy OMX nodes did.
related-to-bug: 2472545
2010-02-26 09:47:28 -08:00
Marco Nelissen
4ba297f3ed Make AsyncPlayer.startSound catch all exceptions instead of only a few.
Two reasons for this:
- it's used in the system process
- it's run in a separate thread, so the user of AsyncPlayer cannot catch these exceptions
2010-02-26 09:30:20 -08:00
James Dong
61701ced74 Don't allow MediaRecorder.setParameter() to be invoked in the following states:
error, prepared or recording

bug - 2362412
2010-02-25 18:41:46 -08:00
Andreas Huber
7bc58b07e2 Merge "Support vendor MPEG4 test content with apparently malformed chunks in them." 2010-02-25 16:25:43 -08:00
Andreas Huber
dfb8eee5bd Support vendor MPEG4 test content with apparently malformed chunks in them.
related-to-bug: 2472211
2010-02-25 16:24:32 -08:00
James Dong
5be65ab5b9 Merge "Add some space and total memory amount to the memory dump from the media server process." 2010-02-25 15:14:40 -08:00
James Dong
b93003649d Merge "Image encoding settings java API through xml configuration file" 2010-02-25 15:11:29 -08:00
James Dong
3d23a61588 Add some space and total memory amount to the memory dump from the media server process. 2010-02-25 10:06:32 -08:00
James Dong
9b433f0b65 Image encoding settings java API through xml configuration file
- I decided to completely remove jpeg decoding related stuff from this change
  I think that setting is better off if it is specified by the system properties.
  We don't have to include MediaProfiles.h header in skia files
2010-02-24 18:10:12 -08:00
Andreas Huber
ff0c5c1929 Recover from a certain mp3 decoder error instead of signalling an error and thereby stopping decoding. 2010-02-24 13:19:04 -08:00
James Dong
c23844c604 Merge "Use Java API from xml configuration in the test application" 2010-02-23 15:42:28 -08:00
Andreas Huber
d7d22eba3c Propagate errors all the way through the MediaSources and send either MEDIA_PLAYBACK_COMPLETE or MEDIA_ERROR depending on the final reason for running out of buffers to play back.
related-to-bug: 2463749
2010-02-23 14:06:38 -08:00
Andreas Huber
42ddfc9495 Merge "Return runtime errors instead of asserting in MPEG4 file format validation, also add more validation to ensure presence of codec specific data for avc, aac and mpeg4." 2010-02-23 10:30:48 -08:00