summaryrefslogtreecommitdiffstats
path: root/media/libmedia/Visualizer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Stop thread before deleting object referenceOscar Rydhé2015-11-071-0/+8
| | | | | | | | | | | If setPeriodicCapture is called Visualizer will start a thread and do periodic callbacks. When native_finalize is called the reference to the class is deleted. If a callback happens after this the reference is no longer valid and when used from the callback method the vm crashes. With this patch the thread will be terminated before deleting the reference. Change-Id: I30f331437ddad05f8d52c244cdbecb1859a0abd2
* Fix for Visualizer release bugRicardo Garcia2015-06-191-8/+4
| | | | | | | Setting callback reference to NULL before requesting exit. bug: 21804802 Change-Id: I54323959686880f4e7a10b766850f8c86c06edb6
* Respect the record audio app op - mediaSvet Ganov2015-04-291-2/+3
| | | | Change-Id: I3a97977b6e9a09355e2008f780d22d480fb7308b
* namespace does not need a closing semicolonGlenn Kasten2015-03-231-1/+1
| | | | Change-Id: Ie8f9d42fc061f6d558f23b98414e04eb3d14b376
* libmedia: ensure mCaptureThread exit within Visualizer destructorHaynes Mathew George2014-10-281-7/+12
| | | | | | | | | | | | | | | | If mCaptureThread doesn't exit when Visualizer instance gets destroyed, recycled member variables with random value such as danger pointer will be accessed again and causes crash. Thread which is created within Visualizer instance lifecycle should be terminated before or within destructor. CRs-Fixed: 688546 authored-by: wjiang@codeaurora.org cherry-pick from CAF commit: 4823e3d6b8c60faa4d8fee5d58728eb70e56abf2 Bug: 18159501 Change-Id: Ie0b12ae8a3b9735b6ecbac0353781b8358cad644
* Add support for level measurements in VisualizerJean-Michel Trivi2013-09-231-0/+68
| | | | | | | | | New commands to set a measurement mode and perform peak + RMS measurements. Bug 8413913 Change-Id: Ib25254065c79d365ebb34f9dc9caa0490e2d300d
* Include what is neededGlenn Kasten2013-07-021-0/+1
| | | | | | | Remove old includes. Header files only include other header files that they directly need themselves. Change-Id: Ic471386808d9f42ea19ccbd59cb50a5f83a89dd0
* Line length 100Glenn Kasten2012-11-011-2/+4
| | | | Change-Id: Ib28fd7b9ce951a6933f006e7f8812ba617625530
* Remove dead code in libmediaGlenn Kasten2012-07-121-9/+0
| | | | Change-Id: I7d8201590cda29c9fa99662a4fdba222091febfe
* Add support for scaling mode parameterJean-Michel Trivi2012-04-181-1/+44
| | | | | | | | | | | | | | | | | | | | | | Support VISUALIZER_PARAM__SCALING_MODE parameter. Modify process() function to use new volume scaling parameter, used to set whether captured values are maximized by current headroom in the buffer (default existing behaviora) or left as is and thus affected by volume. Modify AudioEffect to allow subclasses to override the following events: control status changed, enable status changed, command executed. In Visualizer class (a subclass of AudioEffect), reset the scaling mode and capture size on the actual effect as cached when control is regained. This will allow the effect to be properly configured whenever Visualizers with different scaling modes or capture sizes are released (e.g. from java release() method). Change-Id: I05cb9f925a296dceca91bafa9fe294ef2b2c2bd5
* Whitespace and indentationGlenn Kasten2012-03-131-2/+1
| | | | | | | | | | | | | | Fix indentation to be multiple of 4. Make it easier to search: sp< not sp < to "switch (...)" instead of "switch(...)" (also "if" and "while") Remove redundant blank line at start or EOF. Remove whitespace at end of line. Remove extra blank lines where they don't add value. Use git diff -b or -w to verify. Change-Id: I966b7ba852faa5474be6907fb212f5e267c2874e
* Enhance Visualizer behavior in the case of mediaserver death.John Grossman2012-02-161-1/+1
| | | | | | | | | | | | | | | | | Bring the Visualizer class into line with the SDK documentation by returning ERROR_DEAD_OBJECT instead of ERROR_INVALID_OPERATION when the Visualizer loses its binder connection to the mediaserver because of a mediaserver restart. Also add a new callback interface to allow clients to be asynchronously notified in the case of server death. Right now, the interface definition and the registration method are flagged as hidden pending API council review/approval. See http://b/issue?id=5717519 for details. Change-Id: Ic15856f27ed5a950a583ac11ca81f79bd7e9b1a0 Signed-off-by: John Grossman <johngro@google.com>
* Fix typos in string constantsGlenn Kasten2012-01-191-1/+1
| | | | | | These were copy/paste errors in code that was copied from AudioTrack. Change-Id: I64a04d6026667884ddb1fefba67a71d69c691d62
* Move fixed_fft to system/media/audio_utilsGlenn Kasten2012-01-171-2/+1
| | | | Change-Id: If8a03911434862a872539c313f54825ffb2cc672
* Rename Visualizer::mLockGlenn Kasten2012-01-171-4/+4
| | | | | | | This avoids confusion with parent class AudioEffect's mLock which is protected. Change-Id: I2ae0b0869fe3c606f682252973795b34477951d0
* libmedia new can't fail on AndroidGlenn Kasten2012-01-111-4/+0
| | | | Change-Id: Ie79dd5abb8078b35474bf0f1b3a6ff994a3a3360
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-081-2/+2
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-261-9/+9
| | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* Moved and renamed effect API header filesEric Laurent2011-07-071-3/+3
| | | | | | | | Moved specific effect header files to system/media/audio_effects/include/audio_effects and renamed to lower case (effect_xxx.h). Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
* audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-271-1/+3
| | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* Increase the number of useful bits in the spectrum.Marco Nelissen2011-01-241-2/+7
| | | | Change-Id: I3efc2ac8db689285566df35cb6f594aab41141db
* Visualizer: Fix the conversion from 8-bit sample to 16-bit sample.Chia-chi Yeh2010-11-011-4/+4
| | | | Change-Id: Ie6d77b0f61a37333e05cdcdb6ef29d6f6c345a9d
* Fix error in AudioEffect command status reporting.Eric Laurent2010-09-241-2/+4
| | | | | | | | | | | | AudioEffect::command() should not interpret the status returned in pReplyData unless the command is ENABLE or DISABLE. Also fixed: - bug in Visualizer::getWAveForm() status reporting. - wrong initialization value for capture buffer in visualizer engine. Change-Id: I60fb0011f9dba96ee74661dec1e8ef441edcaf35
* Visualizer: replace the FFT implementation with a faster one.Chia-chi Yeh2010-08-191-26/+15
| | | | | | | | | 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
* Audio effects: modified command() parameter types.Eric Laurent2010-07-281-1/+1
| | | | | | | 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 Visualizer effect.Eric Laurent2010-07-071-0/+330
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