499 Commits

Author SHA1 Message Date
Eric Laurent
923d7d721d Fix issue 2242614: Wired headset not recognized: bogus "state" in ACTION_HEADSET_PLUG broadcast.
The headset state indicated by HeadsetObserver in the broadcast intent ACTION_HEADSET_PLUG was not 0 or 1 as specified in the java doc but contained a bit field indicating the type of headset connected.

Modified HeadsetObserver to broacast a state conforming to java doc.
Added an extra to intent ACTION_HEADSET_PLUG to indicate if headset has a microphone or not.
Removed handling of non standard headset indications from HeadsetObserver.
Removed platform specific devices from output devices defined in AudioSystem.
Modified AudioService to use new ACTION_HEADSET_PLUG intent extra instead of bitfield in state.
2009-11-12 12:09:06 -08:00
Andreas Huber
da440f137f Fix for random audio output failures, properly dup() the file descriptor in IMediaPlayer::setDataSource to assume ownership as the caller will otherwise close it. 2009-11-10 12:26:26 -08:00
Gloria Wang
c060d86f7d Check whether test server is up before running tests which use streaming files. 2009-11-09 15:51:12 -08:00
Android (Google) Code Review
fde273baf6 Merge change Ic997acac into eclair
* changes:
  Make AudioPlayer a little less verbose, defer starting audio playback until after the first video frame has been decoded (if there's video at all).
2009-11-06 11:27:03 -05:00
Andreas Huber
c997acacd5 Make AudioPlayer a little less verbose, defer starting audio playback until after the first video frame has been decoded (if there's video at all). 2009-11-05 16:34:39 -08:00
Android (Google) Code Review
1e495da19f Merge change I4b03c2cd into eclair
* changes:
  Add windows media support check in MediaMetadataTest.java and MediaPlayerApiTest.java
2009-11-05 19:15:56 -05:00
Jean-Michel Trivi
1dc2ae2871 Fix bug 2242585 to unhide the new audio recording sources.
Unhide CAMCORDER and VOICE_RECOGNITION in android.media.MediaRecorder
2009-11-05 15:49:37 -08:00
Andreas Huber
dcaa220ff5 DO NOT MERGE: Squashed commit of the following:
commit 08259dd3dc9026887f9bbfedaf45866eb56ea9bc
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 12:02:31 2009 -0800

    DO NOT MERGE: Use PV for metadata extraction even if stagefright is used for playback.

commit 991832fe4dc012e51d3d9ed8d647c7f09991858f
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:24:11 2009 -0800

    DO NOT MERGE: Do not assert if we encounter OMX_StateInvalid. All bets are off though.

commit cec45cf302d9218fe79956cbe8a462d7ca3a10bb
Author: Andreas Huber <andih@google.com>
Date:   Mon Oct 26 16:11:54 2009 -0700

    DO NOT MERGE: When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers.

commit 34a1e885ef9113d68acbc26d36fcc47fdebbed84
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:10:49 2009 -0800

    DO NOT MERGE: Fix heap corruptin in OMXNodeInstance.

commit 5a47f7439a1298b330541a7e4e647a8b44487388
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:08:19 2009 -0800

    DO NOT MERGE: Fix seek-on-initial-read behaviour of OMXCodec.

commit 45bed64722501b9f411a2940aff5aff4cc4d2e98
Author: Andreas Huber <andih@google.com>
Date:   Thu Nov 5 11:02:23 2009 -0800

    DO NOT MERGE: Renaming string.h to stagefright_string.h to avoid conflicts.

commit 6738e306a50196f31a73d4fc7b7c45faff639903
Author: Andreas Huber <andih@google.com>
Date:   Thu Oct 15 13:46:54 2009 -0700

    DO NOT MERGE: Reimplement the OMX backend for stagefright.

    Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup.

    Changed APIs to conform to the rest of the system.
2009-11-05 13:06:17 -08:00
Andreas Huber
a4eedace99 Now that UseBuffer on this component is fixed, let's use it. 2009-11-05 09:56:03 -08:00
Android (Google) Code Review
67b692920c Merge change I93f500a5 into eclair
* changes:
  Fix issue 2203561: Sholes: audio playing out of earpiece.
2009-11-05 02:55:26 -05:00
Eric Laurent
bda7469d9b Fix issue 2203561: Sholes: audio playing out of earpiece.
Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error.
Do the same if start fails due to the same error after time out in obtainBuffer().
Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails.
This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash.

Same modifications for AudioRecord.

Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
2009-11-04 23:47:21 -08:00
James Dong
b1c85ec47a Add windows media support check in MediaMetadataTest.java and MediaPlayerApiTest.java 2009-11-04 23:00:09 -08:00
Jean-Michel Trivi
6869df3a5d Add new audio sources to support the A1026 recording configurations. 2009-11-03 19:43:21 -08:00
Andreas Huber
d2906ad835 Fix video flickering by propagating the NO_CACHING flag from the master to MemoryHeapPMem. 2009-11-03 10:28:48 -08:00
Android (Google) Code Review
f67eff1775 Merge change Ib0036762 into eclair
* changes:
  Add windows media support check in MediaMetadataRetrieverTest bug 2232274
2009-11-02 20:13:20 -05:00
Android (Google) Code Review
d6af2e0cbf Merge change I43a335c3 into eclair
* changes:
  Suppress takePicture test from continuous DO NOT MERGE.
2009-11-02 20:08:16 -05:00
Android (Google) Code Review
774d956d5d Merge change Ic8c7ca7b into eclair
* changes:
  Remove testCheckMediaPlaybackHandlesApplicationItunes from continuous.
2009-11-02 20:07:11 -05:00
Marco Nelissen
758613de28 Make sure the visualization stops immediately when sound stops, instead of continuing for a fraction of a second. 2009-11-02 13:55:04 -08:00
James Dong
38b03a7661 Add windows media support check in MediaMetadataRetrieverTest
bug 2232274
2009-11-02 12:20:58 -08:00
Brett Chabot
43a335c3cc Suppress takePicture test from continuous DO NOT MERGE.
Bug 2141755
2009-10-30 17:07:03 -07:00
Brett Chabot
c8c7ca7bd7 Remove testCheckMediaPlaybackHandlesApplicationItunes from continuous.
This test causes the whole suite to hang.
2009-10-30 16:48:09 -07:00
Gloria Wang
608a2630bb Dump media recorder PID in dumpsys media.player, and fix minor bugs. 2009-10-29 15:46:37 -07:00
Android (Google) Code Review
898897338d Merge change I4e83a76a into eclair
* changes:
  Fix bug 2201417. Whenever the System setting that indicates whether the notifcation stream uses the ring volume changes, the table of stream volume aliases in AudioService is updated. But the name of the alias stored in VolumeStreamState.mVolumeIndexSettingName was not updated whenever the NOTIFICATIONS_USE_RING_VOLUME setting was updated. This caused the wrong volume setting to be persisted. This change ensures the setting name is updated whenever the volume alias is, and persists the notification volume change right away (instead of after a delay), so that registered observers are notified right away. The notification seekbar in the sound settings is an example of such an observer.
2009-10-28 11:47:54 -04:00
Jean-Michel Trivi
11a74a7565 Fix bug 2201417. Whenever the System setting that indicates
whether the notifcation stream uses the ring volume changes, the
table of stream volume aliases in AudioService is updated. But the
name of the alias stored in VolumeStreamState.mVolumeIndexSettingName
was not updated whenever the NOTIFICATIONS_USE_RING_VOLUME setting
was updated. This caused the wrong volume setting to be persisted.
This change ensures the setting name is updated whenever the volume
alias is, and persists the notification volume change right away
(instead of after a delay), so that registered observers are notified
right away. The notification seekbar in the sound settings is an
example of such an observer.
2009-10-27 17:49:13 -07:00
Dave Sparks
8cc42c5230 Add some logging to detect if AsyncPlayer is lagging. Bug 2201082. 2009-10-27 13:27:34 -07:00
Android (Google) Code Review
adf4b4f5cd Merge change I96458368 into eclair
* changes:
  Fixed the H263 video duation which caused the incorrect video validation.
2009-10-26 21:10:48 -04:00
Yu Shan Emily Lau
13b93713f3 Fixed the H263 video duation which caused the incorrect video validation. 2009-10-26 18:04:11 -07:00
Android (Google) Code Review
e854341878 Merge change I7c0d20a7 into eclair
* changes:
  Run the metadataretriever at background priority. Bug 2187133.
2009-10-26 21:00:46 -04:00
Dave Sparks
7c0d20a753 Run the metadataretriever at background priority. Bug 2187133.
This change forces metadata retreiver threads to background priority.
Uses an inner class to encapsulate the priority change so that it
automatically restores priority when returning to the client.
2009-10-26 16:28:26 -07:00
Andreas Huber
6e50a8c6f5 Revert "Now that the underlying bug is fixed we can continue using OMX_UseBuffer for this decoder's input buffers."
This reverts commit 7a03b074a554ba3fd08dbc20cfd4b2f37c5f3aaa.
2009-10-26 11:11:02 -07:00
Android (Google) Code Review
bf96aaadd4 Merge change Icf10db28 into eclair
* changes:
  Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
2009-10-24 04:32:28 -04:00
Eric Laurent
dd28d56368 Fix 2209967 Tonegenerator: mutex not release in startTone() upon timeout waiting for the stop sequence to complete.
Unlock mLock mutex when exiting upon wait stop timeout condition.
Increase timeout delays to avoid timing out when A2DP exits standby.
2009-10-23 06:54:33 -07:00
Andreas Huber
7a03b074a5 Now that the underlying bug is fixed we can continue using OMX_UseBuffer for this decoder's input buffers. 2009-10-21 15:06:21 -07:00
Eric Laurent
415f3e2875 Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
Added setVoiceVolume() method to AudioSystem, AudioFlinger, IAudioFlinger, AudioPolicyService.
Removed call to AudioHardwareInterface::setVoiceVolume() from AudioFlinger::setStreamVolume().
2009-10-21 12:29:37 -07:00
Andreas Huber
f16a0b7399 do not merge: The qcom video decoders always output yuv data after adjusting dimensions to be a multiple of 16.
Add a quirk mode to OMXCodec that makes it aware of this fact for proper display. Also integrate back a change from eclair-mr2 that delays releasing an output buffer briefly after posting it to surface flinger, as we don't know how long it'll take it to actually display the buffer's content.
2009-10-20 11:49:01 -07:00
Yu Shan Emily Lau
999101368f 1) Add 10 seconds wait time before collecting the end memory.
2) Modified the player stress test, shorten the plabyack time.
2009-10-15 18:52:31 -07:00
Eric Laurent
62443f5f45 Fix issue 2139634: DTMF tones on Sholes popping, hissing (audio latency too high).
This change is a complement to the main fix in kernel driver for the same issue (partner change #1250).
It removes clicks sometimes heard after the end of the tones while audio flinger is sending 0s to the audio output stream.
The problem was that the sleep time between two writes was more than the duration of one audio output stream buffer which could cause some underrun.

Also fixed a recent regression in ToneGenerator that made that the end of previous tone was repeated at the beginning of current one under certain timing circumstances when the maximum tone duration was specified.
2009-10-06 18:59:35 -07:00
gwang@google.com
3b49e9b525 Fix for bug 2158794. Hide MediaPlayer.invoke() and MediaPlayer.newRequest(), and Fix bad links in ToneGenerator documentation. 2009-10-06 14:48:09 -07:00
Marco Nelissen
c39d2e3c01 Music visualizer support hack.
This currently assumes 44k stereo (won't crash on other formats, but won't give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.
2009-10-06 08:51:16 -07:00
Dianne Hackborn
29e4a3c566 Update from API review.
Change-Id: I16b1c566f91167aac9615ac59dd297a154c828ea
2009-09-30 23:21:02 -07:00
Android (Google) Code Review
f09edd6037 Merge change Id60fa26a into eclair
* changes:
  Fix issue 2152541	thumbnail images stretched.
2009-10-01 01:12:35 -04:00
Ray Chen
ef093cd6c4 Fix issue 2152541 thumbnail images stretched. 2009-09-30 22:05:33 -07:00
Eric Laurent
89e74ba141 Fix Issue 2158631: AudioService: volume control sometimes not restored after media server process crash.
The problem comes from the fact that the AudioSystem callback indicating that the media server is active again is ignored if it is received before the delayed message indicating media server death. This happens if another application or service running in the system server process makes a request to the AudioSystem in the interval between the death of the media server and the reception of the corresponding delayed message.

The fix consists in resetting mMediaServerOk flags immediately when the death callback is received and not when the delayed message is received.
2009-09-30 18:26:36 -07:00
Android (Google) Code Review
37b0f279a6 Merge change I999f1aeb into eclair
* changes:
  Remove audio latency fudge factor 96 msec.
2009-09-30 02:18:15 -04:00
Jianhong Jiang
999f1aebf7 Remove audio latency fudge factor 96 msec. 2009-09-29 23:12:39 -07:00
Android (Google) Code Review
edd942c2de Merge change I55a6ac8c into eclair
* changes:
  Fixed the long recorder time and reduce the number of loops.
2009-09-30 01:10:54 -04:00
Yu Shan Emily Lau
55a6ac8c54 Fixed the long recorder time and reduce the number of loops. 2009-09-29 21:38:39 -07:00
Android (Google) Code Review
8bbba0e35b Merge change If5722b3f into eclair
* changes:
  Dont NPE if the thumbnail file cannot be opened.
2009-09-29 19:52:23 -04:00
Chih-Chung Chang
f5722b3f22 Dont NPE if the thumbnail file cannot be opened. 2009-09-29 16:31:16 -07:00
Android (Google) Code Review
7d9871805b Merge change I19f2928b into eclair
* changes:
  Fix issue 2141503: Keyclick sound doesn't honor volume settings.
2009-09-29 18:12:54 -04:00