summaryrefslogtreecommitdiffstats
path: root/media/libmedia
Commit message (Collapse)AuthorAgeFilesLines
* 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
| |
* | Do autodetection even if no locale was specified, and use theMarco Nelissen2010-02-101-35/+39
| | | | | | | | detected encoding if it is unambiguous.
* | Initial check-in for xml-based encoder capabilities retrievalJames Dong2010-02-012-6/+683
| | | | | | | | | | - Changed the Java API as suggested - Treat /etc/media_profiles.xml as the default xml configurtion file
* | Simplify the MemoryDealer implementationMathias Agopian2010-01-292-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | At some point the implementation became complicated because of SurfaceFlinger's special needs, since we are now relying on gralloc we can go back to much simpler MemoryDealer. Removed HeapInterface and AllocatorInterface, since those don't need to be paramterized anymore. Merged SimpleMemory and Allocation. Made SimplisticAllocator non virtual. Removed MemoryDealer flags (READ_ONLY, PAGE_ALIGNED) Removed a lot of unneeded code.
* | API Extension: Support for optionally specifying a map of extra request ↵Andreas Huber2010-01-282-6/+36
| | | | | | | | | | | | | | | | headers when specifying the uri of media data to be played. related-to-bug: 2393577 Original change by Andrei Popescu <andreip@google.com>
* | Fix issue 2285561: New AudioFlinger and audio driver API needed for A/V syncEric Laurent2010-01-262-1/+47
| | | | | | | | | | | | | | | | | | | | | | | | Added getRenderPosition() API to IAudioFlinger to retreive number of audio frames written by AudioFlinger to audio HAL and by DSP to DAC. Added getRenderPosition() API to AudioHardwareInterface to retreive number of audio frames written by DSP to DAC. Exposed AudioTrack::getPosition() to AudioSink() to make it available to media player. Removed excessive log in AudioHardwareGeneric.
* | Fix issue 2378022: AudioService should direct volume control to ↵Eric Laurent2010-01-252-7/+9
| | | | | | | | | | | | | | | | | | STREAM_VOICE_CALL stream when STREAM_VOICE_CALL stream is active. Modified AudioService.getActiveStreamType() so that STREAM_VOICE_CALL is selected when a track using this stream type is playing. Chanded isMusicActive() for a more generic isStreamActive(stream) method in AudioSystem, IAudioFlinger and AudioFlinger.
* | Fix issue 2363154: Speech synthesis fails to start over A2DP after media ↵Eric Laurent2010-01-251-0/+3
| | | | | | | | | | | | | | | | | | | | | | server process crash. The problem is that after a media_server crash, the value of the A2DP output handle can change. As this value is cached in AudioSystem for all client processes there can be a mismatch between the cached and actual value after a media_server restart. The fix consists in clearing the cached output handles and output to stream map values cached in AudioSystem in AudioFlingerClient::binderDied() which is called when the media_server crashes.
* | Fix no-copy-overhead OMXCodec implementation to actually work.Andreas Huber2010-01-201-3/+7
| |
* | Merge "Avoid unnecessary buffer copying if at all possible, detect if ↵Andreas Huber2010-01-191-3/+21
|\ \ | | | | | | | | | running in the mediaserver process."
| * | Avoid unnecessary buffer copying if at all possible, detect if running in ↵Andreas Huber2010-01-191-3/+21
| | | | | | | | | | | | the mediaserver process.
* | | Media server death nodificationJames Dong2010-01-154-95/+129
|/ /
* | Reorganize some of the stagefright implementation related to metadata.Andreas Huber2010-01-083-86/+0
| |
* | Squashed commit of the following:Andreas Huber2009-12-171-6/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 144b1c40e9cf08a584c50e1bef7ba3f287e81a4f Author: Andreas Huber <andih@google.com> Date: Wed Dec 16 09:28:23 2009 -0800 This H264 file shows a certain problem even better. commit 3245f1f3b7471975aeeb824a756c987abd610f55 Author: Andreas Huber <andih@google.com> Date: Wed Dec 16 09:20:08 2009 -0800 Using only the QA testfiles now. commit 074817eb3816c5dd70858a3594e3b92d799d873b Author: Andreas Huber <andih@google.com> Date: Tue Dec 15 16:17:39 2009 -0800 Yay, roles are back again now that the API is in place. commit 6d847e4932cc38301ae27cb7283b7f1553a95457 Author: Andreas Huber <andih@google.com> Date: Tue Dec 15 13:01:20 2009 -0800 Added commandline option for specifying the random seed for reproducable tests. commit 62ab37b26336eaa67e49791c41c996acb6acee3f Author: Andreas Huber <andih@google.com> Date: Mon Dec 14 10:53:27 2009 -0800 When issuing a seek it is important that only the first MediaSource::read call has the seek option. commit e77c46644b2fb6862bafa3569f7d304252074f1e Author: Andreas Huber <andih@google.com> Date: Mon Dec 7 16:39:07 2009 -0800 Make sure the tests are actually built, sp<OMXCodec> becomes sp<MediaSource> commit 6df56915bd55a9445b3c6f953d3cc251d81579b8 Author: Andreas Huber <andih@google.com> Date: Thu Dec 3 14:25:36 2009 -0800 Temporarily disable support for querying the roles of OMX components. commit 31bb26930df9e3658dea684cedb4b0f1a06a4a88 Author: Andreas Huber <andih@google.com> Date: Tue Dec 1 13:36:52 2009 -0800 Disregard EOS events, slightly change the way the EOS flag on output buffers is handled. commit 4c382fbc9aebee8197d5988d04378062809e7c48 Author: Andreas Huber <andih@google.com> Date: Tue Dec 1 09:37:24 2009 -0800 New random seek test for the codec tests. Fixed "sticky" end-of-output-buffers flag behaviour in OMXCodec. commit c762eac3e44309592b61a168d66e091cf609fa03 Author: Andreas Huber <andih@google.com> Date: Tue Nov 3 14:13:43 2009 -0800 Fix a typo. commit 50540a59b65c7d476b0193c7494cd75895e6ca6d Author: Andreas Huber <andih@google.com> Date: Tue Nov 3 09:48:35 2009 -0800 Some more fine tuning of the unit tests, make MPEG4Extractor less verbose. commit 1157a7e52a0636706caa235abe16d2ff8a0b8140 Author: Andreas Huber <andih@google.com> Date: Wed Oct 28 12:01:01 2009 -0700 Changes to the IOMX::listNodes API, this now returns the component's roles as well, unit tests now test all components in all supported roles by default. commit 30fbf2d8c6cb927689f7ba75eb550a81e9df488a Author: Andreas Huber <andih@google.com> Date: Mon Oct 26 09:45:26 2009 -0700 Initial check-in of unit tests for OMX components.
* | am 6d42d806: Merge change I9cc489a2 into eclairEric Laurent2009-12-071-2/+1
|\ \ | |/ | | | | | | | | | | Merge commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7' into eclair-mr2 * commit '6d42d80653f2c41f3e72a878a1d9a6f9693b89f7': Fix issue 2304669: VoiceIME: starting and canceling voice IME yields persistent "error 8" state on future attempts and breaks voice search.
| * Fix issue 2304669: VoiceIME: starting and canceling voice IME yields ↵Eric Laurent2009-12-071-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | persistent "error 8" state on future attempts and breaks voice search. Fixed AudioFlinger::openInput() broken in change ddb78e7753be03937ad57ce7c3c842c52bdad65e so that an invalid IO handle (0) is returned in case of failure. Applied the same correction to openOutput(). Modified RecordThread start procedure so that a failure occuring during the first read from audio input stream is detected and causes the record start to fail. Modified RecordThread stop procedure to make sure that audio input stream fd is closed before we exit the stop function. Fixed AudioRecord JAVA and JNI implementation to take status of native AudioRecord::start() into account and not change mRecordingState to RECORDSTATE_RECORDING if start fails.
* | Merge change I6c84d731 into eclair-mr2Android (Google) Code Review2009-12-031-1/+2
|\ \ | | | | | | | | | | | | * changes: Media/ToneGenerator: Change tone format for TONE_CDMA_ANSWER
| * | Media/ToneGenerator: Change tone format for TONE_CDMA_ANSWERNaveen Kalla2009-12-031-1/+2
| | | | | | | | | | | | | | | Tone format for TONE_CDMA_ANSWER should be 660Hz + 1000Hz, with a 500ms ON duration.
* | | I accidentally broke this code while refactoring MediaScanner. This is the fix.Andreas Huber2009-12-031-7/+0
| | |
* | | Refactor MediaScanner. Some steps on the way towards being able to build the ↵Andreas Huber2009-12-037-3/+1439
|/ / | | | | | | tree without OpenCore.
* | am 16cc72bd: Fix simulator build.Dave Sparks2009-11-231-3/+12
|\ \ | |/ | | | | | | | | | | Merge commit '16cc72bdef471ffeee3f61eba8262783de248b04' into eclair-mr2 * commit '16cc72bdef471ffeee3f61eba8262783de248b04': Fix simulator build.
| * Fix simulator build.Dave Sparks2009-11-231-3/+12
| |
* | am 8424ec32: Merge change I0f9a53d4 into eclairDave Sparks2009-11-231-3/+75
|\ \ | |/ | | | | | | | | | | Merge commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013' into eclair-mr2 * commit '8424ec323b2bc38887370c75e2c1fcd84bcdb013': Set metadata retriever thread group to the caller's group.
| * Set metadata retriever thread group to the caller's group.Dave Sparks2009-11-231-3/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch modifies the native binder interface to the metadata retriever to pass the caller's thread group across the binder interface. On the server side, the thread scheduler group is set to the caller's scheduler group temporarily and restored after the request has completed. This patch also reverts a previous patch where the priority of the thread was forced to a low priority foreground thread. This should give apps more control over the priority of their metadata retrieval, particularly allow background process to run without hogging the CPU.
* | am e7800946: Merge change I49f02be9 into eclairEric Laurent2009-11-212-43/+49
|\ \ | |/ | | | | | | | | | | Merge commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff' into eclair-mr2 * commit 'e7800946a42c0ebe8e0b3f6eba04a96a9641aaff': Issue 2265163: Audio still reported routed through earpiece on sholes
| * Issue 2265163: Audio still reported routed through earpiece on sholesEric Laurent2009-11-192-43/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | This is a second attempt to fix the audio routed to earpiece syndrom. The root cause identified this time is the crash of an application having an active AudioTrack playing on the VOICE_CALL stream type. When this happens, the AudioTrack destructor is not called and the audio policy manager is not notified of the track stop. Results a situation where the VOICE_CALL stream is considered as always in use by audio policy manager which makes that audio is routed to earpiece. The fix consists in moving the track start/stop/close notification to audio policiy manager from AudioTrack to AudioFlinger Track objet. The net result is that in the case of a client application crash, the AudioFlinger TrackHandle object (which implements the remote side of the IAudioTrack binder interface) destructor is called which in turn destroys the Track object and we can notify the audio policy manager of the track stop and removal. The same modification is made for AudioRecord although no bug related to record has been reported yet. Also fixed a potential problem if record stop is called while the record thread is exiting.
* | am fddfb9ae: Merge change Iad79689a into eclairEric Laurent2009-11-121-9/+18
|\ \ | |/ | | | | | | | | | | Merge commit 'fddfb9ae03a2730ac5ce27fa4c47b7d3a0285d0f' into eclair-mr2 * commit 'fddfb9ae03a2730ac5ce27fa4c47b7d3a0285d0f': Improvements for issue 2197683: English IME key-press latency is noticeably higher on passion than sholes
| * Improvements for issue 2197683: English IME key-press latency is noticeably ↵Eric Laurent2009-11-111-9/+18
| | | | | | | | | | | | | | | | | | higher on passion than sholes This change goes with a kernel driver change that reduces the audio buffer size from 4800 bytes (~27ms) to 3072 bytes (~17ms). - The AudioFlinger modifcations in change 0bca68cfff161abbc992fec82dc7c88079dd1a36 have been removed: the short sleep period was counter productive when the AudioTrack is using the call back thread as it causes to many preemptions. - AudioFlinger mixer thread now detects long standby exit time and in this case anticipates start by writing 0s as soon as a track is enabled even if not ready for mixing. - AudioTrack::start() is modified to start call back thread before starting the IAudioTrack so that thread startup time is masked by IAudioTrack start and mixer thread wakeup time.
| * DO NOT MERGE: Squashed commit of the following:Andreas Huber2009-11-052-63/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | commit 08259dd3dc9026887f9bbfedaf45866eb56ea9bc Author: Andreas Huber <andih@google.com> Date: Thu Nov 5 12:02:31 2009 -0800 DO NOT MERGE: Use PV for metadata extraction even if stagefright is used for playback. commit 991832fe4dc012e51d3d9ed8d647c7f09991858f Author: Andreas Huber <andih@google.com> Date: Thu Nov 5 11:24:11 2009 -0800 DO NOT MERGE: Do not assert if we encounter OMX_StateInvalid. All bets are off though. commit cec45cf302d9218fe79956cbe8a462d7ca3a10bb Author: Andreas Huber <andih@google.com> Date: Mon Oct 26 16:11:54 2009 -0700 DO NOT MERGE: When freeing an OMX node, attempt to transition it from its current state all the way to "Loaded" in order to properly free any allocated buffers. commit 34a1e885ef9113d68acbc26d36fcc47fdebbed84 Author: Andreas Huber <andih@google.com> Date: Thu Nov 5 11:10:49 2009 -0800 DO NOT MERGE: Fix heap corruptin in OMXNodeInstance. commit 5a47f7439a1298b330541a7e4e647a8b44487388 Author: Andreas Huber <andih@google.com> Date: Thu Nov 5 11:08:19 2009 -0800 DO NOT MERGE: Fix seek-on-initial-read behaviour of OMXCodec. commit 45bed64722501b9f411a2940aff5aff4cc4d2e98 Author: Andreas Huber <andih@google.com> Date: Thu Nov 5 11:02:23 2009 -0800 DO NOT MERGE: Renaming string.h to stagefright_string.h to avoid conflicts. commit 6738e306a50196f31a73d4fc7b7c45faff639903 Author: Andreas Huber <andih@google.com> Date: Thu Oct 15 13:46:54 2009 -0700 DO NOT MERGE: Reimplement the OMX backend for stagefright. Besides a major cleanup and refactoring, OMX is now a singleton living in the media server, it listens for death notifications of node observers/clients that allocated OMX nodes and performs/attempts cleanup. Changed APIs to conform to the rest of the system.
* | am 67b69292: Merge change I93f500a5 into eclairEric Laurent2009-11-055-110/+225
|\ \ | |/ | | | | | | | | | | Merge commit '67b692920c18f99b096dce285adc6f7439fa866c' into eclair-mr2 * commit '67b692920c18f99b096dce285adc6f7439fa866c': Fix issue 2203561: Sholes: audio playing out of earpiece.
| * Fix issue 2203561: Sholes: audio playing out of earpiece.Eric Laurent2009-11-045-110/+225
| | | | | | | | | | | | | | | | | | | | | | Create a new IAudioTrack interface to AudioFlinger when start() fails due to a broken pipe error. Do the same if start fails due to the same error after time out in obtainBuffer(). Do not indicate that the AudioTrack is started to AudioPolicyManager if IAudioTrack start fails. This avoids that an AudioTrack keeps a dead IAudioTrack after a media server crash. Same modifications for AudioRecord. Add a flag to ToneGenerator indicating that the callback thread can call Java. Without it, when the media server crashes and restarts, the AudioSystem error callback will crash in JNI if the IAudiotrack is created from AudioTrack callback thread.
* | am bf96aaad: Merge change Icf10db28 into eclairEric Laurent2009-10-242-1/+24
|\ \ | |/ | | | | | | | | | | Merge commit 'bf96aaadd46fb5b0884070177faa16ec4f22e2ba' into eclair-mr2 * commit 'bf96aaadd46fb5b0884070177faa16ec4f22e2ba': Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
| * Merge change Icf10db28 into eclairAndroid (Google) Code Review2009-10-242-1/+24
| |\ | | | | | | | | | | | | * changes: Fix issue 2192181: AudioFlinger must provide separated methods to set VOICE_CALL stream volume and down link audio volume.
| | * Fix issue 2192181: AudioFlinger must provide separated methods to set ↵Eric Laurent2009-10-212-1/+24
| | | | | | | | | | | | | | | | | | | | | VOICE_CALL stream volume and down link audio volume. Added setVoiceVolume() method to AudioSystem, AudioFlinger, IAudioFlinger, AudioPolicyService. Removed call to AudioHardwareInterface::setVoiceVolume() from AudioFlinger::setStreamVolume().