summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* am 34161132: am 7070b365: Added support for auxiliary audio effects to ↵Eric Laurent2010-07-213-3/+67
|\ | | | | | | | | | | | | | | | | AudioTrack and MediaPlayer. Merge commit '34161132030254bac7dd64c9713832e2f961a061' * commit '34161132030254bac7dd64c9713832e2f961a061': Added support for auxiliary audio effects to AudioTrack and MediaPlayer.
| * Added support for auxiliary audio effects to AudioTrack and MediaPlayer.Eric Laurent2010-07-213-3/+67
| | | | | | | | | | | | | | | | Added methods to AudioTrack and MediaPlayer java classes to enable use of auxiliary audio effects. The effect can be attached and detached by specifying its ID and the send level controlled. Change-Id: Ie74ff54a453096a742688476f612ce355543b6f3
* | resolved conflicts for merge of dd206093 to masterEric Laurent2010-07-203-22/+192
|\ \ | |/ | | | | Change-Id: I21dd2321a4839d034d49092baccbf40986f17dae
| * Audio policy manager changes for audio effectsEric Laurent2010-07-203-22/+192
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added methods for audio effects management by audio policy manager. - control of total CPU load and memory used by effect engines - selection of output stream for global effects - added audio session id in parameter list for startOutput() and stopOutput(). this is not used in default audio policy manager implementation. Modifications of audio effect framework in AudioFlinger to allow moving and reconfiguring effect engines from one output mixer thread to another when audio tracks in the same session are moved or when requested by audio policy manager. Also fixed mutex deadlock problem with effect chains locks. Change-Id: Ida43484b06e9b890d6b9e53c13958d042720ebdb
* | Fixes for simulator build on lucidMike Lockwood2010-07-151-2/+2
| | | | | | | | | | | | | | strchr and strrchr now return const char* instead of char* Change-Id: I5ca831b8951af7e6306eb9d9d6f78ed2ec13d649 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | am bd3f8b71: am e7b790f1: Merge "Fix swap of sessionId and output in audio ↵Jean-Michel Trivi2010-07-091-2/+2
|\ \ | |/ | | | | | | | | | | | | | | effect API." into gingerbread Merge commit 'bd3f8b711643a172703537e34a0fa7c21c5b953f' * commit 'bd3f8b711643a172703537e34a0fa7c21c5b953f': Fix swap of sessionId and output in audio effect API.
| * Fix swap of sessionId and output in audio effect API.Jean-Michel Trivi2010-07-091-2/+2
| | | | | | | | Change-Id: Idc93415efef92087507401e50cfb235a6f1f7ed7
* | am b91881fd: am dacabf97: Merge "Added Visualizer effect." into gingerbreadEric Laurent2010-07-075-96/+347
|\ \ | |/ | | | | | | | | | | Merge commit 'b91881fdd1608cc922f105ec552b5505da1fecb9' * commit 'b91881fdd1608cc922f105ec552b5505da1fecb9': Added Visualizer effect.
| * Merge "Added Visualizer effect." into gingerbreadEric Laurent2010-07-075-96/+347
| |\
| | * Added Visualizer effect.Eric Laurent2010-07-075-96/+347
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The visualizer enables application to retrieve part of the currently playing audio for visualization purpose. It is not an audio recording interface and only returns partial and low quality audio content as a waveform or a frequency representation (FFT). Removed temporary hack made in MediaPlayer for animated wall papers based on audio visualization (snoop() method. This commit also includes a change in AudioEffect class: - the enable()/disable() methods have been replaced bya more standard setEnabled() method. - some fixes in javadoc Change-Id: Id092a1340e9e38dae68646ade7be054e3a36980e
* | | am bda93c4c: am 09b90057: Add multiple camera support for in MediaProfiles.Chih-Chung Chang2010-07-011-16/+65
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit 'bda93c4cb94b47c86251d22df16e46a514c191ef' * commit 'bda93c4cb94b47c86251d22df16e46a514c191ef': Add multiple camera support for in MediaProfiles.
| * | Add multiple camera support for in MediaProfiles.Chih-Chung Chang2010-07-011-16/+65
| |/ | | | | | | Change-Id: Ie89568a0f5f5fd08ede77e33f9a559215d6bed9a
* | am c2c59f69: am 2a76b316: Merge "Separate MediaRecorderClient with ↵James Dong2010-06-283-4/+75
|\ \ | |/ | | | | | | | | | | | | | | MediaPlayerClient" into gingerbread Merge commit 'c2c59f690deafe34c7701b01b612fd777cee8d4b' * commit 'c2c59f690deafe34c7701b01b612fd777cee8d4b': Separate MediaRecorderClient with MediaPlayerClient
| * Separate MediaRecorderClient with MediaPlayerClientJames Dong2010-06-283-4/+75
| | | | | | | | | | | | | | | | | | | | - An alternative would be to define a common base class that both MediaRecorderClient and MediaPlayerClient can derive. But since the common code, onTransact() and notify() uses some Binder code, having a common base class may not gain us too much in terms of code reuse. Change-Id: Ibc06720278ad173fceacff3d267b7060856c6316
* | am cdf1357b: am 8e103da1: Merge "Various fixes and improvements in audio ↵Eric Laurent2010-06-252-7/+8
|\ \ | |/ | | | | | | | | | | | | | | effects implementation" into gingerbread Merge commit 'cdf1357b6e0152280dcd611b5f096db4887d8126' * commit 'cdf1357b6e0152280dcd611b5f096db4887d8126': Various fixes and improvements in audio effects implementation
| * Various fixes and improvements in audio effects implementationEric Laurent2010-06-252-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Effect API: - Use different definitions for audio device, channels, formats... in AudioSystem and EffectApi: Removed media/AudioCommon.h file created for initial version of EffectApi - Indicate audio session and output ID to effect library when calling EffectCreate(). Session ID can be useful to optimize the implementation of effect chains in the same audio session. Output ID can be used for effects implemented in audio hardware. - Renamed EffectQueryNext() function to EffectQueryEffect() and changed operating mode: now an index is passed for the queried effect instead of implicitly querying the next one. - Added CPU load and memory usage indication in effects descriptor - Added flags and commands to indicate changes in audio mode (ring tone, in call...) to effect engine - Added flag to indicate hardware accelerated effect implementation. - Renamed EffectFactoryApi.h to EffectsFactoryApi.h for consistency with EffectsFactory.c/h Effect libraries: - Reflected changes in Effect API - Several fixes in reverb implementation - Added build option TEST_EFFECT_LIBRARIES in makefile to prepare integration of actual effect library. - Replaced pointer by integer identifier for library handle returned by effects factory Audio effect framework: - Added support for audio session -1 in preparation of output stage effects configuration. - Reflected changes in Effect API - Removed volume ramp up/down when effect is inserted/removed: this has to be taken care of by effect engines. - Added some overflow verification on indexes used for deferred parameter updates via shared memory - Added hardcoded CPU and memory limit check when creating a new effect instance Change-Id: I43fee5182ee201384ea3479af6d0acb95092901d
* | am 03e90f7e: am 58e9402b: Merge "Properly assign LOG_TAGs in OMXMaster.cpp ↵Andreas Huber2010-06-231-0/+4
|\ \ | |/ | | | | | | | | | | | | | | and MediaScanner.cpp" into gingerbread Merge commit '03e90f7eeb032c981fc2952aa33f6ba1fae20d97' * commit '03e90f7eeb032c981fc2952aa33f6ba1fae20d97': Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cpp
| * Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cppAndreas Huber2010-06-231-0/+4
| | | | | | | | | | Change-Id: I863651619f84b2b66e9a926ce1fef8ce6a53a42d related-to-bug: 2639116
* | am 845f5414: am 2c2ce8e5: Merge "Added support for audio sessions in ↵Eric Laurent2010-06-233-9/+42
|\ \ | |/ | | | | | | | | | | | | | | MediaPlayer and AudioTrack." into gingerbread Merge commit '845f541454d1fa9f328c0b0bf79acf2fba363177' * commit '845f541454d1fa9f328c0b0bf79acf2fba363177': Added support for audio sessions in MediaPlayer and AudioTrack.
| * Merge "Added support for audio sessions in MediaPlayer and AudioTrack." into ↵Eric Laurent2010-06-223-9/+42
| |\ | | | | | | | | | gingerbread
| | * Added support for audio sessions in MediaPlayer and AudioTrack.Eric Laurent2010-06-223-9/+42
| | | | | | | | | | | | | | | | | | Audio sessions are used to associate audio effects to particular instances (or groups) of MediaPlayers or AudioTracks. Change-Id: Ib94eec43241cfcb416590f435ddce7ab39a07640
* | | am da9269af: am 3238302b: Merge "media: add ↵Chia-chi Yeh2010-06-231-25/+38
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | AudioRecord::getMinFrameCount()." into gingerbread Merge commit 'da9269af5e94e25c142c519429aa77eb40f68e58' * commit 'da9269af5e94e25c142c519429aa77eb40f68e58': media: add AudioRecord::getMinFrameCount().
| * | media: add AudioRecord::getMinFrameCount().Chia-chi Yeh2010-06-231-25/+38
| |/ | | | | | | Change-Id: I952071ab10aa49aa96b727d157b68470d69fff3d
* | am d9e9132e: am 2ce999fc: am bd240c27: media: add ↵Chia-chi Yeh2010-06-211-0/+29
|\ \ | |/ | | | | | | | | | | | | | | AudioTrack::getMinFrameCount(). Merge commit 'd9e9132eeb2c02feb812f21a5cecb844b5b39d9d' * commit 'd9e9132eeb2c02feb812f21a5cecb844b5b39d9d': media: add AudioTrack::getMinFrameCount().
| * media: add AudioTrack::getMinFrameCount().Chia-chi Yeh2010-06-211-0/+29
| | | | | | | | Change-Id: If15162583d1d16d89f59be0793106afe77417f35
* | MediaScanner: Fix handling of files with dirent.d_type == DT_UNKNOWNMike Lockwood2010-06-141-10/+8
| | | | | | | | | | | | | | The previous code was calling stat() on the parent directory rather than the actual file. Change-Id: If64552cb37552c77618a81ae4333307a018efe13 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | am 184a3ff6: am e0219539: am 01f7ac64: Merge "Issue 2667802: [Audio Effect ↵Eric Laurent2010-06-142-1/+464
|\ \ | |/ | | | | | | | | | | | | | | Framework] AudioEffect base class and JNI." into kraken Merge commit '184a3ff64ba71e7e860b70b9a836c0132b447138' * commit '184a3ff64ba71e7e860b70b9a836c0132b447138': Issue 2667802: [Audio Effect Framework] AudioEffect base class and JNI.
| * Issue 2667802: [Audio Effect Framework] AudioEffect base class and JNI.Eric Laurent2010-06-112-1/+464
| | | | | | | | | | | | | | | | | | | | Added AudioEffect C++ class. AudioEffect is the base class for effect specific implementations, OpenSL ES effect interfaces and audio effect JNI. Added the AudioEffect JNI and AudioEffect JAVA class. AudioEffect is the base class to implement more specific JAVA classes to control audio effects from JAVA applications. Change-Id: If300a1b708f2e6605891261e67bfb4f8330a4624
* | am 030a1553: am 2ea200c5: Merge "Issue 2667801: [Audio Effect Framework] ↵Eric Laurent2010-06-045-19/+358
|\ \ | |/ | | | | AudioFlinger, AudioMixer AudioTrack modifications." into kraken
| * 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
* | Merge "Fix issue 2712130: Sholes: problem when playing audio while recording ↵Eric Laurent2010-05-261-1/+2
|\ \ | |/ |/| | | over bluetooth SCO."
| * Fix issue 2712130: Sholes: problem when playing audio while recording over ↵Eric Laurent2010-05-261-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | bluetooth SCO. The problem is that when an input stream is opened for record over bluetooth SCO, the kernel mono audio device should be opened in RW mode to allow further use of this same device by an output stream also routed to bluetooth SCO. This does not happen because of a bug in AudioSystem::isBluetoothScoDevice() that does not return true when the device is DEVICE_IN_BLUETOOTH_SCO_HEADSET (input device for blurtooth SCO). Change-Id: I9100e972931d8142295c7d64ec06e31304407586
* | 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