summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* fixedfft: Only includes cpu-features.h when __arm__ is defined.Chia-chi Yeh2010-08-311-1/+1
| | | | Change-Id: Ifb6c03b38eff3c94a507ceb5043fcc48b364c25c
* Fix the simulator build.Eric Laurent2010-08-251-0/+2
| | | | | | Fixes the sim build broken by commit 58d3bd08107f44cba79938dd8430e69c0fda4202. Change-Id: I5a63623363d558783dc5254fdd322080cc2f3525
* Visualizer: replace the FFT implementation with a faster one.Chia-chi Yeh2010-08-193-31/+177
| | | | | | | | | This implementation uses fixed points instead of floating points. It is slightly inaccurate compared to the old one but still perfect for visualization purpose. It runs 40% faster on passion, 5 times faster on sholes, and of course 14 times faster on sapphire. Change-Id: I1e868417bcffda091becf106a7b941d02813faec
* Fix all fd leaks in authoring engineJames Dong2010-08-111-0/+2
| | | | Change-Id: I17798543f9dd41cc8bef6f6086e66932f9f97be8
* Fixed several audio effects problems.Eric Laurent2010-08-091-3/+22
| | | | | | | | | | - Fixed constant inversions in AudioEffect.java - Do not return error when enabling an already enabled effect - Update cached effect state in native AudioEffect class when effect is enabled/disabled by command() method - Remove click when restarting effect during disable sequence - Fixed problem in master mute management when volume control is delegated to effect. Change-Id: I6df4ce9fcc54fdc7345df858f639d20d802d6712
* Support for Gtalk video, includes AMR/H.263 assembler and packetization ↵Andreas Huber2010-08-041-1/+1
| | | | | | support, extensions to MediaRecorder to stream via RTP over a pair of UDP sockets as well as various fixes to the RTP implementation. Change-Id: I95b8dd487061add9bade15749e563b01cd99d9a6
* Fix issue 2876124.Eric Laurent2010-08-041-1/+2
| | | | | | Allow calls to MediaPlayer::notify() in idle state to signal errors from JNI. Change-Id: I1515fe69766f0a926b76e15c4971317da2acd6a0
* resolved conflicts for merge of 27eecb70 to gingerbreadJean-Baptiste Queru2010-07-301-1/+1
|\ | | | | | | Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
| * fix inaccurate copyrightsJean-Baptiste Queru2010-07-291-1/+1
| | | | | | | | Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
* | Audio effects: modified command() parameter types.Eric Laurent2010-07-284-16/+32
| | | | | | | | | | | | | | The type of the cmd, cmdSize and *pReplySize parameters of the effect control interface command() function have been modified from int to uint32_t. This is more consistent with their role. Change-Id: I84d289fc262d6753747910f06f485597dfee6591
* | 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
* | 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
* | Fix swap of sessionId and output in audio effect API.Jean-Michel Trivi2010-07-091-2/+2
| | | | | | | | Change-Id: Idc93415efef92087507401e50cfb235a6f1f7ed7
* | 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
* | | Add multiple camera support for in MediaProfiles.Chih-Chung Chang2010-07-011-16/+65
|/ / | | | | | | Change-Id: Ie89568a0f5f5fd08ede77e33f9a559215d6bed9a
* | 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
* | 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
* | Properly assign LOG_TAGs in OMXMaster.cpp and MediaScanner.cppAndreas Huber2010-06-231-0/+4
| | | | | | | | | | Change-Id: I863651619f84b2b66e9a926ce1fef8ce6a53a42d related-to-bug: 2639116
* | 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
* | | media: add AudioRecord::getMinFrameCount().Chia-chi Yeh2010-06-231-25/+38
|/ / | | | | | | Change-Id: I952071ab10aa49aa96b727d157b68470d69fff3d
* | media: add AudioTrack::getMinFrameCount().Chia-chi Yeh2010-06-211-0/+29
| | | | | | | | Change-Id: If15162583d1d16d89f59be0793106afe77417f35
* | 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
* | 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
| |