summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* Audio effects: track CPU and memory use separatelyEric Laurent2011-08-112-1/+27
| | | | | | | | | | | | | | | | | | | | | | Before this change, CPU and memory usage for an audio effect were registered and checked against the limit by audio policy manager upon effect instantiation. Even if an effect was not enabled it would prevent another effect to be created if the CPU load budget was exceeded, which was too restrictive. This change adds a method to register/unregister CPU load only when an effect is enabled or disabled. It also adds a mechanism to place all effects on the global output mix in suspend state (disabled) when an effect is enabled on a specific session. This will allow applications using session effects to have the priority over others using global effects. Also fixes some issues with suspend/restore mechanism: - avoid taking actions when an effect is disconnected and was not enabled. - do not remove a session from the suspended sessions list when corresponding effect chain is destroyed. Change-Id: I5225278aba1ae13d0d0997bfe26a0c9fb46b17d3
* Keep effects sessions active when the caller dies.Marco Nelissen2011-08-095-2/+57
| | | | | | | | Don't remove effects until the session they are in goes away or all AudioEffects have been explicitly released. This allows the control panel process to die without stopping the effects. Change-Id: I4496e5df080230ca1af149dec95c1309ab8ea888
* Merge "Fix ordering assumption of argument evaluation."Gloria Wang2011-08-021-2/+6
|\
| * Fix ordering assumption of argument evaluation.Gloria Wang2011-08-011-2/+6
| | | | | | | | | | | | | | | | | | | | No specific order is specified in the C++ standard, but the order of the calls to Parcel read commands matters. Move any calls with multiple reads to local variables. Fix for bug 5104979. Change-Id: I709aa040e990d2659e7a3a089f7a42ae812de9ff
* | connect/disconnect is now called from our EGL wrapperMathias Agopian2011-08-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | the original connect/disconnect hooks are deprecated and replace by api_connect/api_disconnect. the original hooks are no no-ops. api_connect/api_disconnect is now only called from the android framework. Bug: 5057915 Change-Id: I8ca64cd1acd6cabf915bf54689ec2e5f6dfa495a
* | AudioRecord: Fix getInput()Eric Laurent2011-07-261-1/+1
|/ | | | | | | AudioRecord::getInput() was issuing a query to get a new input stream from audio policy service instead of returning the cached input stream in AudioRecord. Change-Id: Ice324b7c60bc0898149023797bcb56a72091b9d3
* Merge "Added APIs for audio preprocessing"Eric Laurent2011-07-252-0/+58
|\
| * Added APIs for audio preprocessingEric Laurent2011-07-252-0/+58
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added APIs to control pre processes applied on captured audio. Those APIs are still hidden until reviewed by API council. Three types of standard pre processes are supported: - Automatic Gain Control (AGC) by AutomaticGainControl class - Acoustic Echo Cancellation (AEC) by AcousticEchoCanceler class - Noise Suppression (NS) by NoiseSuppressor class A method is added to AudioEffect class to query audio pre processings applied by default by the platform on a given AudioRecord session ID. Change-Id: I0b9fceeb8c704dd06319c3b52b85c96fe871d51d
* | Do not support still image capture mode for timelapse video recordingJames Dong2011-07-242-44/+0
|/ | | | | | related-to-bug: 4973779 Change-Id: Ica665217ab10247b2242acc4e93d4fe9f83e3f45
* Connect MediaRecorder Native to SurfaceMediaSourcePannag Sanketi2011-07-222-3/+60
| | | | | | | | | | | | | | | | | Making a connection from MediaRecorder Native layer to the SurfaceMediaSource for the purpose of encoding GL Frames. This will be called from the java side inside the Mobile Filter Framework. The mediarecorder native layer (client), when set the videosource to option VIDEO_SOURCE_FRAMES, asks the StageFrightRecorder on the mediaserver side to create a SurfaceMediaSource object and pass it back as a sp<ISurfaceTexture> object. Using that, the client side will dequeue and queue buffers. Connecting the GL Frames to the obtained sp<ISurfaceTexture> is not part of this CL. Related to bug id: 4529323 Change-Id: I651bec718dd5b935779e7d7a050b841c2d0b0fcd
* Merge "Log setVideoSurface() and setVideoSurfaceTexture() failures."James Dong2011-07-221-0/+2
|\
| * Log setVideoSurface() and setVideoSurfaceTexture() failures.James Dong2011-07-211-0/+2
| | | | | | | | | | Change-Id: Iaea34e74a0cf569fc85b926949253dea6baa6142 related-to-bug: 5063370
* | Merge "fix for issue 4142219 Don't hard code platform-specific ↵Hong Teng2011-07-211-0/+64
|\ \ | | | | | | | | | limitations-jni/java part"
| * | fix for issue 4142219Hong Teng2011-07-201-0/+64
| |/ | | | | | | | | | | Don't hard code platform-specific limitations-jni/java part Change-Id: Icde261b1caf29a8cf552884c97f3c9d0b41741a3
* | Merge "Untangle MediaScanner error handling. Bug: 5056917"Jeff Brown2011-07-202-72/+82
|\ \
| * | Untangle MediaScanner error handling.Jeff Brown2011-07-202-72/+82
| |/ | | | | | | | | | | Bug: 5056917 Change-Id: I1a7a73579e3ba4e9709459329fc1901a28b0f4b1
* | Merge "Audio framework: support for audio pre processing"Eric Laurent2011-07-204-23/+41
|\ \
| * | Audio framework: support for audio pre processingEric Laurent2011-07-184-23/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Audio effect framework is extended to suport effects on output and input audio path. AudioFlinger: Support for audio effects and effect chains is moved from PlaybackThread class to ThreadBase class so that RecordThread can manage effects. Effects of type pre processing are allowed on record thread only. When a pre processing is enabled, the effect interface handle is passed down to the input stream so that the audio HAL can call the process function. The record thread loop calls the effect chain process function that will only manage the effect state and commands and skip the process function. AudioRecord: The audio session is allocated before calling getInput() into audio policy serice so that the session is known before the input theead is created and pre processings can be created on the correct session. AudioPolicyService: default pre processing for a given input source are loaded from audio_effects.conf file. When an input is created, corresponding effects are created and enabled. Change-Id: Id17119e0979b4dcf189b5c7957fec30dc3478790
* | | MediaPlayer: add a disconnect from ANativeWindowJamie Gennis2011-07-191-0/+2
| |/ |/| | | | | | | | | | | This change makes MediaPlayer::disconnect disconnect from the ANativeWindow once the player has been disconnected. Change-Id: I6744559030d1edc520cf77402d1f5ce841742340
* | Merge "MediaPlayer: add ANativeWindow (dis)connect calls"Jamie Gennis2011-07-181-5/+101
|\ \ | |/ |/|
| * MediaPlayer: add ANativeWindow (dis)connect callsJamie Gennis2011-07-141-5/+101
| | | | | | | | | | | | | | This change makes MediaPlayer connect to the ANativeWindow to which it is going to render video frames and disconnect when it is done. Change-Id: I88ab5c2fe62493aabdc84a283ff31634f795d415
* | Enable signalling of a stream discontinuity involving a format-changeAndreas Huber2011-07-131-0/+3
| | | | | | | | | | | | | | through IStreamListener. Change-Id: Ic0409cdc4891ad26b61f2f98bdda3c7fb2e2de6a related-to-bug: 5022434
* | Remove the simulator target from all makefiles.Jeff Brown2011-07-111-9/+1
|/ | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* Moved and renamed effect API header filesEric Laurent2011-07-072-4/+5
| | | | | | | | Moved specific effect header files to system/media/audio_effects/include/audio_effects and renamed to lower case (effect_xxx.h). Change-Id: Icfc2264bfd013cab0395d7e310ada636b9fe3621
* Add framework support for camcorder zoom.Wu-cheng Li2011-06-272-6/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to allow applications using the camera during recording. Camera service allows only one client at a time. Since camcorder application needs to own the camera to do things like zoom, the media recorder cannot access the camera directly during recording. So ICameraRecordingProxy is a proxy of ICamera, which allows the media recorder to start/stop the recording and release recording frames. ICameraRecordingProxyListener is an interface that allows the recorder to receive video frames during recording. ICameraRecordingProxy startRecording() stopRecording() releaseRecordingFrame() ICameraRecordingProxyListener dataCallbackTimestamp() The camcorder app opens the camera and starts the preview. The app passes ICamera and ICameraRecordingProxy to the media recorder by MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in MediaRecorder::start(). After setup, the recorder disconnects from camera service. The recorder calls ICameraRecordingProxy::startRecording() and passes a ICameraRecordingProxyListener to the app. The app connects back to camera service and starts the recording. The app owns the camera and can do things like zoom. The media recorder receives the video frames from the listener and releases them by ICameraRecordingProxy::releaseRecordingFrame. The recorder calls ICameraRecordingProxy::stopRecording() to stop the recording. The call sequences are as follows: 1. The app: Camera.unlock(). 2. The app: MediaRecorder.setCamera(). 3. Start recording (1) The app: MediaRecorder.start(). (2) The recorder: ICamera.unlock() and ICamera.disconnect(). (3) The recorder: ICameraRecordingProxy.startRecording(). (4) The app: ICamera.reconnect(). (5) The app: ICamera.startRecording(). 4. During recording (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp() (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame(). 5. Stop recording (1) The app: MediaRecorder.stop() (2) The recorder: ICameraRecordingProxy.stopRecording(). (3) The app: ICamera.stopRecording(). bug:2644213 Change-Id: I15269397defc25cbbcae16abc071c8349c123122
* - Public part of the Metadata API.Gloria Wang2011-06-231-2/+1
| | | | | | - Modify the media framework test for Metadata. Change-Id: Ib8fa4991f114e1bb88a17ca662844b9b8e1d0faf
* Merge "Fix warnings for uninitialized local variables"Glenn Kasten2011-06-232-3/+3
|\
| * Fix warnings for uninitialized local variablesGlenn Kasten2011-06-222-3/+3
| | | | | | | | Change-Id: Ic9b03b0fd215444e76c7b7bebb385f7831c557e0
* | Merge "Added audio_bytes_per_sample() helper function"Eric Laurent2011-06-232-3/+3
|\ \ | |/ |/|
| * Added audio_bytes_per_sample() helper functionEric Laurent2011-06-172-3/+3
| | | | | | | | Change-Id: Ibfcd75c4c241a53d5f052c25ada091904991048a
* | Remove unneeded #include <sys/resource.h>Glenn Kasten2011-06-151-1/+0
|/ | | | | | Suggested in code review for previous change. Change-Id: Ic3225b240367dc6c9bf56fb4498fb8a0f9f806ec
* audio: update for audio/audio_policy header names/locationsDima Zavin2011-06-131-1/+1
| | | | | Change-Id: I36c49352eee57559403cd1597f56a8485a360289 Signed-off-by: Dima Zavin <dima@android.com>
* am 15e9d474: am 88748e6d: am d86302df: Quiet the log.Dianne Hackborn2011-06-101-1/+1
|\ | | | | | | | | * commit '15e9d474d1033adbedc8632309df26c3d6dfaee3': Quiet the log.
| * Quiet the log.Dianne Hackborn2011-06-091-1/+1
| | | | | | | | Change-Id: Ie814b579997bb555eae014c22da0f41f1a46940f
| * DO NOT MERGE MediaScanner: Fix bug in "no media" handling logicMike Lockwood2011-05-031-3/+4
| | | | | | | | | | | | | | | | | | | | Don't let the "no media" status of one directory leak to the remaining files and directories in the same parent. Bug: 4364077 Change-Id: Ie756ccd06b1962b06143fc02a1a3927c3aba143a Signed-off-by: Mike Lockwood <lockwood@android.com>
| * DO NOT MERGE MediaScanner: reimplement the ".nomedia" feature for hiding ↵Mike Lockwood2011-05-031-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | files from the media provider Previously we ignored any files and directories that had name started with '.' and ignored any directories that contained a ".nomedia" file. Now to support transferring any file via MTP, we now add these previously ignored files to the media database, but will not mark them as audio, video, image or playlist files. That way they will be included in the files table but will be hidden from the audio, video, images and playlist views that are used by apps like Music and Gallery. Bug: 3405327 Change-Id: Ibb37bb2856a0684ce9f685ed565ad35347622834 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | Remove dead code related to gettidGlenn Kasten2011-06-033-38/+4
| | | | | | | | | | | | The gettid system call is always available now. Change-Id: Ib78b41781eda182dc8605daf456bbea7ff7c2dc0
* | Remove unnecessary level of priority indirectionGlenn Kasten2011-06-012-4/+4
| | | | | | | | Change-Id: I942d43973c20a7ace8b0d3f78b4da97e45e996c6
* | Revert "Use AudioTrack::event_type not int in callback"Glenn Kasten2011-06-011-1/+1
| | | | | | This reverts commit 2225e4b7049fa3fb9d39a068b8268b63c952d7c1
* | Use AudioTrack::event_type not int in callbackGlenn Kasten2011-06-011-1/+1
| | | | | | | | Change-Id: Ifefc708d46874e04fd0d01cb6e2d43b987ee796c
* | Use channel mask instead of channel count for track creationJean-Michel Trivi2011-06-013-40/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Record and playback objects (resp AudioRecord and AudioTrack) are created using a channel mask, but this information is lost in the mixer because only the channel count is known to AudioFlinger. A channel count can always be derived from a channel mask. The change consists in: - disambiguiting variable names for channel masks and counts - passing the mask information from the client to AudioFlinger and the mixer. - when using the DIRECT ouput, only verifying the format of the track is compatible with the output's for PCM. Change-Id: I50d87bfb7d7afcabdf5f12d4ab75ef3a54132c0e
* | Removed interface to load audio effects librariesEric Laurent2011-05-272-62/+0
| | | | | | | | | | | | | | Removed unused functions allowing dynamic loading of audio effects libraries from effects factory API. Change-Id: I06cc5a51dc10aca87c7a8687bbb874babd711eca
* | Merge "Add support for platform-specific recording start time offset"James Dong2011-05-131-0/+23
|\ \
| * | Add support for platform-specific recording start time offsetJames Dong2011-05-101-0/+23
| | | | | | | | | | | | | | | | | | | | | | | | o This start time offset is used in the media framework to eliminate the recording sound in the recorded file. Change-Id: I97926a74f0743b8a4f985d51334e8d1486a318ea related-to-bug: 4390777
* | | update for new audio.h header locationDima Zavin2011-05-125-5/+5
|/ / | | | | | | | | Change-Id: Ic4c62c4037800802427eb7d3c7f5eb8b25d18876 Signed-off-by: Dima Zavin <dima@android.com>
* | MediaScanner: Fix bug in "no media" handling logicMike Lockwood2011-05-021-3/+4
| | | | | | | | | | | | | | | | | | | | Don't let the "no media" status of one directory leak to the remaining files and directories in the same parent. Bug: 4364077 Change-Id: I30943222dc292818cff00ee8169be7a695eed174 Signed-off-by: Mike Lockwood <lockwood@android.com>
* | Add setParameter/getParameter to MediaPlayer API.Gloria Wang2011-04-292-0/+61
| | | | | | | | | | | | for bug 1982947 Change-Id: If3f40e4f18cbba155af29944af38bdc627f8cd53
* | audio/media: convert to using the audio HAL and new audio defsDima Zavin2011-04-278-244/+145
| | | | | | | | | | Change-Id: Ibc637918637329e4f2b62f4ac7781102fbc269f5 Signed-off-by: Dima Zavin <dima@android.com>
* | libmedia: move AudioParameter out of AudioSystemDima Zavin2011-04-273-154/+191
| | | | | | | | | | Change-Id: I9eb7e002d141936258050d4fa4f0ccd8202bfc54 Signed-off-by: Dima Zavin <dima@android.com>
* | Merge "Return status code from invoke()"James Dong2011-04-251-4/+5
|\ \