summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* 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
|\ \
| * | Return status code from invoke()James Dong2011-04-061-4/+5
| | | | | | | | | | | | | | | Change-Id: Ie64b418d2a1f44e07942399c285b460c68f8e14f related-to-bug: 4199781
* | | MediaScanner: reimplement the ".nomedia" feature for hiding files from the ↵Mike Lockwood2011-04-251-13/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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: I2d7285bd32e06c1a5c4ef6a8a15f8f8b2c33b39b Signed-off-by: Mike Lockwood <lockwood@android.com>
* | | - Add another parameter in notify() to be able to send timed text sampleGloria Wang2011-04-132-4/+15
| | | | | | | | | | | | | | | | | | | | | | | | through listener during video playback. - Add OnTimedTextListener in the MediaPlayer For feature request 800939. Change-Id: I65072c27acb4c0037109a72be38c73e9f667420f
* | | Do not disable effect in AudioEffect destructor.Eric Laurent2011-04-071-1/+0
|/ / | | | | | | | | | | | | | | | | | | Current implementation of AudioEffect class destructor disables the effect before disconnecting from IAudioEffect interface. This is problematic when more than one client has a handle on the same effect engine as destroying one handle will disable the effect which is not the intended behavior. Change-Id: I10eacf981506469a7ef4eb9a1650813f0848de5d
* | New fix for issue 4111672: control block flagsEric Laurent2011-04-052-60/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first fix (commit 913af0b4) is problematic because it makes threads in mediaserver process block on the cblk mutex. This is not permitted as it can cause audio to skip or worse have a malicious application prevent all audio playback by keeping the mutex locked. The fix consists in using atomic operations when modifying the control block flags. Also fixed audio_track_cblk_t::framesReady() so that it doesn't block when called from AudioFlinger (only applies when a loop is active). Change-Id: Ibf0abb562ced3e9f64118afdd5036854bb959428
* | merge libsurfaceflinger_client into libguiMathias Agopian2011-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | this is the first step in unifying surfacetexture and surface. for this reason the header files were not moved, as most of them will eventually go away. NOTE: currently we keep libsurfaceflinger_client.so as an empty library to workaround prebuilt binaries wrongly linking against it. Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
* | Merge "Fix issue 3483718: audio streaming and A2DP."Eric Laurent2011-03-211-3/+21
|\ \
| * | Fix issue 3483718: audio streaming and A2DP.Eric Laurent2011-03-211-3/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem is that when switching from A2DP to device speakers or headset, The AudioTrack binder interface to AudioFlinger must be destroyed and restored to accomodate new buffer size requirements. Current AudioTrack implementation did not restore properly the PCM buffer write index which caused a mismatch between the written frame count in the mediaplayer renderer and the AudioTrack. The renderer could then believe the AudioTrack buffer was full and stop writing data preventing the AudioTrack to reach a bufffer full condition and resume playback. The rendered was also modified to refresh the AudioTrack frame count (buffer size) inside the write loop in NuPlayer::Renderer::onDrainAudioQueue() as this count can change from one write to the next. Also modified AudioTrack::obtainBuffer() to check for track invalidated status before querying for available space in the buffer. This avoids writing to the old track's buffer until full before detecting the invalidated condition and create a new track. Change-Id: I16a857e464e466880847f52f640820aa271539ad
* | | Support passing headers to MediaMetadataRetriever's setDataSource APIAndreas Huber2011-03-212-4/+30
|/ / | | | | | | | | Change-Id: Ib1a5c08fc5034cac05034db27007a35c9b660b26 related-to-bug: 3506316
* | Merge "Fix issue 4111672: AudioTrack control block flags"Eric Laurent2011-03-182-9/+26
|\ \
| * | Fix issue 4111672: AudioTrack control block flagsEric Laurent2011-03-182-9/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make sure that all read/modify/write operations on the AudioTrack and AudioRecord control block flags field are protected by the control block's mutex. Also fix potential infinite loop in AudioTrack::write() if the written size is not a multiple of frame size. Change-Id: Ib3d557eb45dcc3abeb32c9aa56058e2873afee27
* | | am 782ffe91: am 9c0c5b56: am 2f1f2248: Fix missing AOSP copyright headers ↵James Dong2011-03-171-0/+16
|\ \ \ | |/ / |/| / | |/ | | | | | | for a bunch of media framework files * commit '782ffe91da665c6b1fb9e297faa6e0dc6035f40c': Fix missing AOSP copyright headers for a bunch of media framework files
| * Fix missing AOSP copyright headers for a bunch of media framework filesJames Dong2011-03-171-0/+16
| | | | | | | | | | | | bug - 4119349 Change-Id: If5924e16a5f596d5d73d9beb66eaf5ac9a6f0e50
* | resolved conflicts for merge of 1cbf8493 to masterJames Dong2011-03-161-2/+4
|\ \ | |/ | | | | Change-Id: Ifea2ba8b02ecf291fbd1612973647a95a70511c4
| * Add the default camera id to mCameraIds for emulator and those devices ↵James Dong2011-03-161-0/+5
| | | | | | | | | | | | | | | | without media_profiles.xml configuration file. bug - 4109530 Change-Id: Ib83be7a7f767a4b20ac338734ada1581e7a4c5bf
* | Add memory leak tracking/debugging code to drm serverJames Dong2011-03-142-0/+170
| | | | | | | | | | | | bug - 4099038 Change-Id: I6c048eaf3d7f34bc144b8daaa5fdef1ed474af66
* | am 2dc78477: am cc34967f: Merge "Fix issue 3439872: video chat and bluetooth ↵Eric Laurent2011-03-092-80/+333
|\ \ | |/ | | | | | | | | | | SCO" into honeycomb-mr1 * commit '2dc78477364bd4accb9a603baaafca9a5523dcec': Fix issue 3439872: video chat and bluetooth SCO
| * Fix issue 3439872: video chat and bluetooth SCOEric Laurent2011-03-082-80/+333
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes the stability problems experienced when using a bluetooth headset supporting both A2DP and SCO. Problems occur when starting the video chat at which time the A2DP output is being stopped to start SCO. At that time, active AudioTracks are invalidated by AudioFlinger so that a new AudioTrack binder interface can be recreated by the client process on the new mixer thread with correct parameters. The problem was that the process to restore the binder interface was not protected against concurrent requests which caused 2 binder interfaces to be created sometimes. This could lead to permanent client deadlock if one of the client threads was waiting for a condition of the first created binder interface while the second one was created (as the AudioFlinger would only signal conditions on the last one created). This concurrent request situation is more likely to happen when a client uses the JAVA AudioTrack as the JNI implementation uses simultaneously the native AudioTrack callback and write push mechanisms. By doing so, the code that checks if the binder interface should be restored (in obtainBuffer()) is much more likely to be called concurrently from two different threads. The fix consists in protecting the critical binder interface restore phase with a flag in the AudioTrack control block. The first thread acting upon the binder interface restore request will raise the flag and the second thread will just wait for a condition to be signaled when the restore process is complete. Also protected all accesses to the AudioTrack control block by a mutex to prevent access while the track is being destroyed and restored. If a mutex cannot be held (e.g because we call a callback function), acquire a strong reference on the IAudioTrack to prevent its destruction while the cblk is being accessed. Modified AudioTrack JNI to use GetByteArrayElements() instead of GetPrimitiveArrayCritical() when writing audio buffers. Entering a critical section would cause the JNI to abort if a mediaserver crash occurs during a write due to the AudioSystem callback being called during the critical section when media server process restarts. Anyway with current JNI implementation, either versions do not copy data most of the times and the criticial version does not guaranty no data copy. The same modifications have been made to AudioRecord. Change-Id: Idc5aa711a04c3eee180cdd03f44fe17f3c4dcb52
* | Add the default back-facing camera to the MediaProfile camera vectorJames Dong2011-03-071-0/+3
|/ | | | | | As a result, missing media_profiles.xml will be still allowed. Change-Id: Ie6c1bbfdfd4e971f1d5d0e031a913e757f3863a7
* Allow optional specification of a PTS timestamp when signalling a discontinuity.Andreas Huber2011-03-021-0/+3
| | | | | | | If present, rendering will be suppressed until reaching the timestamp. Change-Id: Ic64bdf4225063c5a4d042ea9809960b843a46d19 related-to-bug: 3489454
* Get rid of redundant media profilesJames Dong2011-03-011-6/+172
| | | | | | bug - 3330679 Change-Id: Idc55aea32746c0c57552c5e15a289681421aa859
* Add an OMX IL API for querying buffer usage flags.Jamie Gennis2011-02-281-0/+29
| | | | | | | | | | This change defines an OpenMAX IL API for querying from the IL component the gralloc buffer usage flags that should be used to allocate the buffers. It also adds the Stagefright plumbing for using the new OMX IL API. Change-Id: I046b5e7be70ce61e2a921dcdc6e3aa9324d19ea6 Related-Bug: 3479027
* Bug 3438258 Add SurfaceTexture as MediaPlayer sinkGlenn Kasten2011-02-233-2/+35
| | | | | | | | | | | | | | This change enables the use of a SurfaceTexture in place of a Surface as the video sink for an android.media.MediaPlayer. The new API MediaPlayer.setTexture is currently hidden. This includes: - New Java and C++ interfaces - C++ plumbing and implementation (JNI, Binder) - Stagefright AwesomePlayer and NuPlayer use ANativeWindow (either Surface or SurfaceTextureClient) Change-Id: I2b568bee143d9eaf3dfc6cc4533c1bebbd5afc51
* Merge "- Add method in MediaPlayerService to collect and pull codec usage ↵Gloria Wang2011-02-231-1/+27
|\ | | | | | | (duration) for the battery app - Collect MediaPlayer decoding usage data"
| * - Add method in MediaPlayerService to collect and pullGloria Wang2011-02-221-1/+27
| | | | | | | | | | | | | | codec usage (duration) for the battery app - Collect MediaPlayer decoding usage data Change-Id: I0ef4e32b6a041ba1fe73c19f9c67185c61d03965
* | Check file descriptor before passing it through binder callsJames Dong2011-02-221-0/+11
|/ | | | | | bug - 3476613 Change-Id: I858933fd2fe4c095c0bd58bf50344c47fc104be9
* Bug 3352047 Wrong message when adjusting volumeGlenn Kasten2011-02-102-1/+26
| | | | | | Add hidden AudioManager.getDevicesForStream and output device codes. Change-Id: I4d1c1d3b6a077cd117720817d1f733dda557b947
* Fix issue 3371080Eric Laurent2011-02-033-26/+27
| | | | | | | | | | | | | | | | | | | | | | Modified default volume control logic in AudioService: 1 IN_CALL volume if in video/audio chat 2 NOTIFICATION if notification is playing or was playing less than 5s ago. 3 MUSIC Modified silent mode: - now also affect MUSIC stream type - entering silent mode when VOL- hard key is pressed once while selected stream volume is already at 0 (except for VOICE_CALL stream). - exiting silent mode when pressing VOL+ hard key while in silent mode Play sound FX (audible selections, keyboard clicks) at a fixed volume. Modified audio framework: - isStreamActive() method now implemented in AudioPolicyManagerBase (previously AudioFlinger) - iStreamActive() now specifies a time window during which the stream is considered active after it actually stopped. Change-Id: I7e5a0724099450b9fc90825224180ac97322785f
* am c929677e: Merge "Increase the number of useful bits in the spectrum." ↵Marco Nelissen2011-01-291-2/+7
|\ | | | | | | | | | | | | into gingerbread * commit 'c929677e017759047d94599faa1b80ebe278fefb': Increase the number of useful bits in the spectrum.
| * Increase the number of useful bits in the spectrum.Marco Nelissen2011-01-241-2/+7
| | | | | | | | Change-Id: I3efc2ac8db689285566df35cb6f594aab41141db
| * Squash commits of the following patches, cherry-picked from other branch - ↵James Dong2011-01-122-64/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | do not merge. o Prepare for publishing MediaMetadataRetriever as public API step one: o replaced captureFrame with getFrameAtTime o removed getMode o Replace MediaMetadataRetriever.captureFrame() with MediaMetadataRetriever.getFrameAtTime() as part of the preparation for publishing MediaMetadataRetriever as public Java API o Remove captureFrame from MediaMetadataRetriever.java class It has been replaced by getFrameAtTime() method o Replace extractAlbumArt() with getEmbeddedPicture() in MediaMetadataRetriever.java o Publish MediaMetadataRetriever.java as public API o Removed setMode() methods and related mode constants o Removed some of the unused the metadata keys o Updated the javadoc o part of a multi-project change. bug - 3309041 Change-Id: I2efb6e8b8d52897186b016cb4efda6862f5584c4