summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* Issue 2667801: [Audio Effect Framework] AudioFlinger, AudioMixer AudioTrack ↵Eric Laurent2010-06-035-19/+358
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | modifications. First drop of audio framework modifications for audio effects support. - AudioTrack/AudioRecord: Added support for auxiliary effects in AudioTrack Added support for audio sessions Fixed left right channel inversion in setVolume() - IAudioFlinger: Added interface methods for effect enumeraiton and instantiation Added support for audio sessions. - IAudioTrack: Added method to attach auxiliary effect. - AudioFlinger Created new classes to control effect engines in effect library and manage effect connections to tracks or output mix: EffectModule: wrapper object controlling the effect engine implementation in the effect library. There is one EffectModule per instance of an effect in a given audio session EffectChain: group of effects associated to one audio session. There is one EffectChain per audio session. EffectChain for session 0 is for output mix effects, other chains are attached to audio tracks with same session ID. Each chain contains a variable number of EffectModules EffectHandle: implements the IEffect interface. There is one EffectHandle object for each application controlling (or using) an effect module. THe EffectModule maintians a list of EffectHandles. Added support for effect modules and effect chains creation in PlaybackThread. modified mixer thread loop to allow track volume control by effect modules and call effect processing. -AudioMixer Each track now specifies its output buffer used by mixer for accumulation Modified mixer process functions to process tracks by groups of tracks with same buffer Modified track process functions to support accumulation to auxiliary channel Change-Id: I26d5f7c9e070a89bdd383e1a659f8b7ca150379c
* Fix issue 2667797: [Audio Effect Framework] new base class and binder ↵Eric Laurent2010-05-243-1/+335
| | | | | | | | | interfaces for effect control. Added IEffect and IEffectClient binder interfaces to exchange effect module control and status information between application and media server processes. Change-Id: I10e8e894898e52ed9956a765d0ef7075eb2593af
* Fix issue 2553359: Pandora does not work well with Passion deskdock / Cardock.Eric Laurent2010-05-172-77/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is due to a too big difference between the buffer size used at the hardware interface and at the A2DP interface. When no resampling occurs we don't notice problems but the timing is very tight. As soon as resampling is activated, the AudioTrack underruns. This is because the AudioTrack buffers are not resized when moving the AudioTrack from hardware to A2DP output. The AudioTrack buffers are calculated based on a hardware output buffer size of 3072 bytes. Which is much less than the A2DP output buffer size (10240). The solution consists in creating new tracks with new buffers in AudioFlinger when the A2DP output is opened instead of just transfering active tracks from hardware output mixer thread to the new A2DP output mixer thread. To avoid synchronization issues between mixer threads and client processes, this is done by invalidating tracks by setting a flag in their control block and having AudioTrack release the handle on this track (IAudioTrack) and create a new IAudioTrack when this flag is detected next time obtainBuffer() or start() is executed. AudioFlinger modifications: - invalidate the tracks when setStreamOutput() is called - make sure that notifications of output opening/closing and change of stream type to output mapping are sent synchronously to client process. This is necessary so that AudioSystem has the new stream to output mapping when the AudioTrack detects the invalidate flag in the client process. Previously their were sent when the corresponding thread loop was executed. AudioTrack modifications: - move frame count calculation and verification from set() to createTrack() so that is is updated every time a new IAudioTrack is created. - detect track invalidate flag in obtainBuffer() and start() and create a new IAudioTrack. AudioTrackShared modifications - group all flags (out, flowControlFlag, forceReady...) into a single bit filed to save space. Change-Id: I9ac26b6192230627d35084e1449640caaf7d56ee
* don't hardcode "mSurface" throughout our source codeMathias Agopian2010-04-121-1/+1
| | | | | | | this is used in a few places to get access to the android.view.Surface native surface. use a macro instead. Also rename the field to mNativeSurface. Change-Id: I1c6dea14abd6b8b1392c7f97b304115999355094
* Use local lock for most MediaMetadataRetriever methods. Bug 2560834.Dave Sparks2010-04-011-0/+7
| | | | | | | | | | MediaMetadataRetriever uses a single static lock for all operations. This effectively serializes all metadata retrieval operations in a single process. This patch uses the object level lock for all normal operations and only uses the static lock to serialize calls to release. Change-Id: I81c9f234c2f0007a26d18e1398c709b41a4dbbd7
* libutils Condition are now PRIVATE by defaultMathias Agopian2010-03-191-2/+4
| | | | | | | | | | | Condition must be initialized with SHARED for the old behavior, where they can be used accross processes. Updated the two places android that require SHARED conditions. PRIVATE conditions (and mutexes) use more efficient syscalls. Change-Id: I9a281a4b88206e92ac559c66554e886b9c62db3a
* Merge "Fix issue 2416481: Support Voice Dialer over BT SCO."Eric Laurent2010-03-171-2/+13
|\
| * Fix issue 2416481: Support Voice Dialer over BT SCO.Eric Laurent2010-03-161-2/+13
| | | | | | | | | | | | | | | | | | | | | | - AudioPolicyManager: allow platform specific choice for opening a direct output. Also fixed problems in direct output management. - AudioFliinger: use shorter standby delay and track inactivity grace period for direct output thread to free hardware resources as soon as possible. - AudioSystem: do not use cached output selection in getOutput() when a direct output can be selected. Change-Id: If44b50d29237b8402ffd7a5ba1dc43c56f903e9b
* | Fix regression in directory scanningKenny Root2010-03-151-1/+1
|/ | | | | | | | | Previous range-checking fix removed an inequality check. This change restores it. Offending change was I5eb310ced58c3c64a7af2d11b80326efe5adbcab Change-Id: Ic952c3ba5a4f7e5ab2148ec623b6f083cb7495fb
* Merge "Revert "Do autodetection even if no locale was specified, and use the""Marco Nelissen2010-03-111-39/+35
|\
| * Revert "Do autodetection even if no locale was specified, and use the"Marco Nelissen2010-03-111-39/+35
| | | | | | | | This reverts commit b45b0845a6db32848ad08ac1037ef67a68ec2d39.
* | Allow invoke in all the player states except idle and error.Nicolas Catania2010-03-111-2/+4
|/ | | | | | | | | | Previously invoke would work only after prepare but not when the player is in play or pause state (for instance). This new change just check that the player has been initialized and is not in the error state. Bug:2488931 Change-Id: I9b9f3679593a3b7697c1a84d993fdcd7e1693a90
* Revert "Allow invoke in all the player states except idle and error."Nicolas Catania2010-03-111-4/+2
| | | | This reverts commit 88f3b81d065d4bec6f69a25eda99158e254f55b1.
* Allow invoke in all the player states except idle and error.Nicolas Catania2010-03-101-2/+4
| | | | | | | | | | | Previously invoke would work only after prepare but not when the player is in play or pause state (for instance). This new change just check that the player has been initialized and is not in the error state. Bug:2488931 Change-Id: I7a69d1b6e3eec1e5dbdf7378ff2085329062595a
* MEDIA_PLAYER_STATE_ERROR is not a bitmaskMarco Nelissen2010-03-101-1/+2
| | | | | | (b/2502881) Change-Id: I08e427eb2c36f5d70e40f9aeb8638fa8262de989
* Fix issue 2428563: Camera rendered inoperable by voice call interruption.Eric Laurent2010-03-051-3/+7
| | | | | | | | | | | | | | | | | 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.
* Issue 2071329: audio track is shorter than video track for video capture on ↵Eric Laurent2010-03-023-2/+38
| | | | | | | | sholes Add API to retrieve number of frames dropped by audio input kernel driver. Submitted on behalf of Masaki Sato <masaki.sato@motorola.com>
* Merge "Don't allow MediaRecorder.setParameter() to be invoked in the ↵James Dong2010-02-261-0/+9
|\ | | | | | | following states: error, prepared or recording"
| * Don't allow MediaRecorder.setParameter() to be invoked in the following states:James Dong2010-02-251-0/+9
| | | | | | | | | | | | error, prepared or recording bug - 2362412
* | When we're in the 'playback complete' state, don't consider pausingMarco Nelissen2010-02-261-1/+1
|/ | | | | | 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.
* Image encoding settings java API through xml configuration fileJames Dong2010-02-241-0/+24
| | | | | | - 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
* am 8978547f: am f5fe3949: Fix issue 2459650.Eric Laurent2010-02-221-1/+3
|\ | | | | | | | | | | | | Merge commit '8978547f254b6b6ba2e322794aa044803f3edc2a' * commit '8978547f254b6b6ba2e322794aa044803f3edc2a': Fix issue 2459650.
| * Fix issue 2459650.Eric Laurent2010-02-221-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a problem where an unwanted tone is generated by audio policy manager when a MT call is answered. This is because of a policy that replaces high visibility system sounds (ringtones, alarms...) by a beep when in call. There is a transitory phase while the call is being answered where the phone state is changed to IN_CALL but the ringtone is still playing. The audio policy manager then mutes the end of the ringtone and starts playing a beep in replacement because the ringtone is categorized as high visibility. The fix consists in changing the ringtone stream type from high visibility to low visibility. This is not a problem as the only actual use case where a ringtone would be generated while in call is if another call is received. But in this case, the phone system does not generate a ringtone but a call waiting tone instead. It is therefore not required to handle a ringtone as a high visibiltiy tone that must be somehow signaled to the user while in call.
* | Range check in MediaScanner::processDirectoryKenny Root2010-02-181-1/+1
| | | | | | | | | | | | | | Make sure we don't have an empty string before checking if it's a directory since this string is tainted. Change-Id: I5eb310ced58c3c64a7af2d11b80326efe5adbcab
* | New API on java's MediaPlayer to suspend/resume a session.Andreas Huber2010-02-122-0/+42
| | | | | | | | related-to-bug: 2231576
* | split libsurfaceflinger_client and libcamera_client out of libuiMathias Agopian2010-02-116-7/+9
| |
* | Do autodetection even if no locale was specified, and use theMarco Nelissen2010-02-101-35/+39
| | | | | | | | detected encoding if it is unambiguous.
* | Initial check-in for xml-based encoder capabilities retrievalJames Dong2010-02-012-6/+683
| | | | | | | | | | - Changed the Java API as suggested - Treat /etc/media_profiles.xml as the default xml configurtion file
* | Simplify the MemoryDealer implementationMathias Agopian2010-01-292-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At some point the implementation became complicated because of SurfaceFlinger's special needs, since we are now relying on gralloc we can go back to much simpler MemoryDealer. Removed HeapInterface and AllocatorInterface, since those don't need to be paramterized anymore. Merged SimpleMemory and Allocation. Made SimplisticAllocator non virtual. Removed MemoryDealer flags (READ_ONLY, PAGE_ALIGNED) Removed a lot of unneeded code.
* | API Extension: Support for optionally specifying a map of extra request ↵Andreas Huber2010-01-282-6/+36
| | | | | | | | | | | | | | | | headers when specifying the uri of media data to be played. related-to-bug: 2393577 Original change by Andrei Popescu <andreip@google.com>
* | Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V syncEric Laurent2010-01-262-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames written by AudioFlinger to audio HAL and by DSP to DAC. Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames written by DSP to DAC. Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player. Removed excessive log in AudioHardwareGeneric.
* | Fix issue 2378022: AudioService should direct volume control to ↵Eric Laurent2010-01-252-7/+9
| | | | | | | | | | | | | | | | | | STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active. Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream type is playing. Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
* | Fix issue 2363154: Speech synthesis fails to start over A2DP after media ↵Eric Laurent2010-01-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | server process crash. The problem is that after a media_server crash, the value of the A2DP output handle can change. As this value is cached in AudioSystem for all client processes there can be a mismatch between the cached and actual value after a media_server restart. The fix consists in clearing the cached output handles and output to stream map values cached in AudioSystem in AudioFlingerClient::binderDied() which is called when the media_server crashes.
* | Fix no-copy-overhead OMXCodec implementation to actually work.Andreas Huber2010-01-201-3/+7
| |
* | Merge "Avoid unnecessary buffer copying if at all possible, detect if ↵Andreas Huber2010-01-191-3/+21
|\ \ | | | | | | | | | running in the mediaserver process."
| * | Avoid unnecessary buffer copying if at all possible, detect if running in ↵Andreas Huber2010-01-191-3/+21
| | | | | | | | | | | | the mediaserver process.
* | | Media server death nodificationJames Dong2010-01-154-95/+129
|/ /
* | Reorganize some of the stagefright implementation related to metadata.Andreas Huber2010-01-083-86/+0
| |
* | Squashed commit of the following:Andreas Huber2009-12-171-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 144b1c40e9cf08a584c50e1bef7ba3f287e81a4f Author: Andreas Huber <andih@google.com> Date: Wed Dec 16 09:28:23 2009 -0800 This H264 file shows a certain problem even better. commit 3245f1f3b7471975aeeb824a756c987abd610f55 Author: Andreas Huber <andih@google.com> Date: Wed Dec 16 09:20:08 2009 -0800 Using only the QA testfiles now. commit 074817eb3816c5dd70858a3594e3b92d799d873b Author: Andreas Huber <andih@google.com> Date: Tue Dec 15 16:17:39 2009 -0800 Yay, roles are back again now that the API is in place. commit 6d847e4932cc38301ae27cb7283b7f1553a95457 Author: Andreas Huber <andih@google.com> Date: Tue Dec 15 13:01:20 2009 -0800 Added commandline option for specifying the random seed for reproducable tests. commit 62ab37b26336eaa67e49791c41c996acb6acee3f Author: Andreas Huber <andih@google.com> Date: Mon Dec 14 10:53:27 2009 -0800 When issuing a seek it is important that only the first MediaSource::read call has the seek option. commit e77c46644b2fb6862bafa3569f7d304252074f1e Author: Andreas Huber <andih@google.com> Date: Mon Dec 7 16:39:07 2009 -0800 Make sure the tests are actually built, sp<OMXCodec> becomes sp<MediaSource> commit 6df56915bd55a9445b3c6f953d3cc251d81579b8 Author: Andreas Huber <andih@google.com> Date: Thu Dec 3 14:25:36 2009 -0800 Temporarily disable support for querying the roles of OMX components. commit 31bb26930df9e3658dea684cedb4b0f1a06a4a88 Author: Andreas Huber <andih@google.com> Date: Tue Dec 1 13:36:52 2009 -0800 Disregard EOS events, slightly change the way the EOS flag on output buffers is handled. commit 4c382fbc9aebee8197d5988d04378062809e7c48 Author: Andreas Huber <andih@google.com> Date: Tue Dec 1 09:37:24 2009 -0800 New random seek test for the codec tests. Fixed "sticky" end-of-output-buffers flag behaviour in OMXCodec. commit c762eac3e44309592b61a168d66e091cf609fa03 Author: Andreas Huber <andih@google.com> Date: Tue Nov 3 14:13:43 2009 -0800 Fix a typo. commit 50540a59b65c7d476b0193c7494cd75895e6ca6d Author: Andreas Huber <andih@google.com> Date: Tue Nov 3 09:48:35 2009 -0800 Some more fine tuning of the unit tests, make MPEG4Extractor less verbose. commit 1157a7e52a0636706caa235abe16d2ff8a0b8140 Author: Andreas Huber <andih@google.com> Date: Wed Oct 28 12:01:01 2009 -0700 Changes to the IOMX::listNodes API, this now returns the component's roles as well, unit tests now test all components in all supported roles by default. commit 30fbf2d8c6cb927689f7ba75eb550a81e9df488a Author: Andreas Huber <andih@google.com> Date: Mon Oct 26 09:45:26 2009 -0700 Initial check-in of unit tests for OMX components.
* | am 6d42d806: Merge change I9cc489a2 into eclairEric Laurent2009-12-071-2/+1
|\ \ | |/ | | | | | | | | | | Merge commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7' into eclair-mr2 * commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7': Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
| * Fix issue 2304669: VoiceIME: starting and canceling voice IME yields ↵Eric Laurent2009-12-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | persistent "error 8" state on future attempts and breaks voice search. Fixed AudioFlinger::openInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e so that an invalid IO handle (0) is returned in case of failure. Applied the same correction to openOutput(). Modified RecordThread start procedure so that a failure occuring during the first read from audio input stream is detected and causes the record start to fail. Modified RecordThread stop procedure to make sure that audio input stream fd is closed before we exit the stop function. Fixed AudioRecord JAVA and JNI implementation to take status of native AudioRecord::start() into account and not change mRecordingState to RECORDSTATE_RECORDING if start fails.
* | Merge change I6c84d731 into eclair-mr2Android (Google) Code Review2009-12-031-1/+2
|\ \ | | | | | | | | | | | | * changes: Media/ToneGenerator: Change tone format for TONE_CDMA_ANSWER
| * | Media/ToneGenerator: Change tone format for TONE_CDMA_ANSWERNaveen Kalla2009-12-031-1/+2
| | | | | | | | | | | | | | | Tone format for TONE_CDMA_ANSWER should be 660Hz + 1000Hz, with a 500ms ON duration.
* | | I accidentally broke this code while refactoring MediaScanner. This is the fix.Andreas Huber2009-12-031-7/+0
| | |
* | | Refactor MediaScanner. Some steps on the way towards being able to build the ↵Andreas Huber2009-12-037-3/+1439
|/ / | | | | | | tree without OpenCore.
* | am 16cc72bd: Fix simulator build.Dave Sparks2009-11-231-3/+12
|\ \ | |/ | | | | | | | | | | Merge commit '16cc72bdef471ffeee3f61eba8262783de248b04' into eclair-mr2 * commit '16cc72bdef471ffeee3f61eba8262783de248b04': Fix simulator build.
| * Fix simulator build.Dave Sparks2009-11-231-3/+12
| |
* | am 8424ec32: Merge change I0f9a53d4 into eclairDave Sparks2009-11-231-3/+75
|\ \ | |/ | | | | | | | | | | Merge commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013' into eclair-mr2 * commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013': Set metadata retriever thread group to the caller's group.
| * Set metadata retriever thread group to the caller's group.Dave Sparks2009-11-231-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the native binder interface to the metadata retriever to pass the caller's thread group across the binder interface. On the server side, the thread scheduler group is set to the caller's scheduler group temporarily and restored after the request has completed. This patch also reverts a previous patch where the priority of the thread was forced to a low priority foreground thread. This should give apps more control over the priority of their metadata retrieval, particularly allow background process to run without hogging the CPU.
* | am e7800946: Merge change I49f02be9 into eclairEric Laurent2009-11-212-43/+49
|\ \ | |/ | | | | | | | | | | Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-mr2 * commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff': Issue 2265163: Audio still reported routed through earpiece on sholes