338 Commits

Author SHA1 Message Date
Marco Nelissen
c39d2e3c01 Music visualizer support hack.
This currently assumes 44k stereo (won't crash on other formats, but won't give the correct results either), and links statically with libspeex to get FFT data, increasing the size of libmedia by about 45kb.
2009-10-06 08:51:16 -07:00
Mathias Agopian
0c4cec7e4d Attempt to fix [2152536] ANR in browser
The ANR is caused by SurfaceFlinger waiting for buffers of a removed surface to become availlable.
When it is removed from the current list, a Surface is marked as NO_INIT, which causes SF to return
immediately in the above case. For some reason, the surface here wasn't marked as NO_INIT.

This change makes the code more robust by always (irregadless or errors) setting the NO_INIT status
in all code paths where a surface is removed from the list.

Additionaly added more information in the logs, should this happen again.
2009-10-02 18:12:30 -07:00
Wu-cheng Li
fe1a86df8b Change FLASH_MODE_VIDEO_LIGHT to FLASH_MODE_TORCH. 2009-09-28 13:51:59 -07:00
Wu-cheng Li
8de57d8fa3 Add camera parameter key constants and documentation. 2009-09-25 14:23:56 -07:00
Eric Laurent
af141d529f Fix issue 2142613: ToneGenerator: short tones sometimes don't play on sholes or over A2DP.
When the AudioTrack callback notification size is relatively high (Which is the case on Sholes and over A2DP), it is likely that the end of tone is reached during the first callback. In this case, the AudioTrack is stopped before exiting the callback which causes 2 problems:
- 1: If the AudioFlinger thread is scheduled before we exit the ToneGenerator callback, the track can be stopped and reset before the data is actually marked as present in the buffer by the AudioTrack callback => no audio will be processed by AudioFlinger.
- 2: In this case, the data write index in the AudioTrack buffer is incremented after the track was reset by the AudioFlinger which leaves unplayed data in the buffer. This data will be played the next time the AudioTrack is started if not flushed in between.

The fix consists in adding an intermediate state to ToneGenerator state machine so that we exit the callback function when the stop condition is reached and stop the AudioTrack the next time we execute the callback.
2009-09-24 23:49:40 -07:00
Mathias Agopian
bc7261130a fix [2132563] stuck in boot animation (framebuffer_device_open: Failed to create flip chain) 2009-09-23 15:49:32 -07:00
Mathias Agopian
b1a1874625 Android side of the fix for [2121211] Sholes has stutter during animations
a new method, compostionComplete() is added to the framebuffer hal, it is used by surfaceflinger to signal the driver that the composition is complete, BEFORE it releases its client. This gives a chance to the driver to
2009-09-17 16:18:16 -07:00
Mathias Agopian
bcef9ac35d add basic time stats for surfaces lock time 2009-09-17 01:35:28 -07:00
Android (Google) Code Review
f7c3679f89 Merge change 25158 into eclair
* changes:
  Another software color conversion implementation, this time OMX_QCOM_COLOR_FormatYVU420SemiPlanar => rgb565.
2009-09-16 13:01:57 -04:00
Dianne Hackborn
93e462b79d Implement issue #1780928: Need support hiding nav keys.
This implements support for devices whose hardware can hide
their navigation keys.  It works much like the existing keyboardHidden
configuration, and for compatibility uses the same configuration
change bit.

Also add FLAG_TURN_ON_SCREEN for windows, which has the system
cause the screen to be turned on when the window is displayed.
Great fun when used with FLAG_SHOW_WHEN_LOCKED!

Change-Id: I0b867f19af85cfd8786a14cea194b34f7bdd9b7a
2009-09-15 22:50:40 -07:00
Mathias Agopian
e611a6ed33 fix [2122448] android_native_window_t::setUsage() only reallocates the first buffer
Take 2. We needed to check that the usage flags are "good enough" as opposed to "the same".

This reverts commit 8f17a762fe9e9f31e4e86cb60ff2bfb6b10fdee6.
2009-09-15 19:21:31 -07:00
Mathias Agopian
8f17a762fe Revert "fix [2122448] android_native_window_t::setUsage() only reallocates the first buffer"
This reverts commit 486aa963b63e20b7910e1004cebb4f0afabbd80f.
2009-09-15 18:57:06 -07:00
Mathias Agopian
486aa963b6 fix [2122448] android_native_window_t::setUsage() only reallocates the first buffer 2009-09-15 17:34:04 -07:00
Andreas Huber
4f23457958 Another software color conversion implementation, this time OMX_QCOM_COLOR_FormatYVU420SemiPlanar => rgb565. 2009-09-15 16:19:08 -07:00
Android (Google) Code Review
a4fe2aca52 Merge change 25128 into eclair
* changes:
  Support CbYCrY -> RGB565 color conversion in IOMXRenderer.
2009-09-15 17:48:33 -04:00
Andreas Huber
c966a3c255 Support CbYCrY -> RGB565 color conversion in IOMXRenderer. 2009-09-15 14:32:59 -07:00
Andreas Huber
9f9afef3d5 Added an API IOMX::createRendererFromJavaSurface.
This api allows to instantiate a renderer by specifying the hosting java Surface object. This hides the implementation details of (java-)Surface, (native-)Surface and friends.
2009-09-15 12:49:11 -07:00
Chih-Chung Chang
244f8c2636 Fix 2083478: Camera needs an auto-focus cancel API
Change-Id: I13bda991b32aee47e82b5cf9d43b3021c416a9a2
2009-09-15 18:29:03 +08:00
Android (Google) Code Review
a1212578bf Merge change 24947 into eclair
* changes:
  make sure to update the tail pointer when undoing a dequeue
2009-09-14 19:01:40 -04:00
Mathias Agopian
bd8527110c make sure to update the tail pointer when undoing a dequeue 2009-09-14 15:48:42 -07:00
San Mehat
242d65bf9f process: Switch to common cutils sched_policy api
Signed-off-by: San Mehat <san@google.com>
2009-09-12 10:48:03 -07:00
Andreas Huber
6026a51424 Move JPEGSource.{cpp,h} into libstagefright. 2009-09-11 07:49:50 -07:00
Android (Google) Code Review
f84a21820b Merge change 24643 into eclair
* changes:
  fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymore
2009-09-10 22:59:12 -04:00
Android (Google) Code Review
12d2cdcdb0 Merge change 24642 into eclair
* changes:
  make sure conditions will return when the status of a surface is not NO_ERROR
2009-09-10 22:59:02 -04:00
Mathias Agopian
248b5bd51e fix [2112575] stuck on DequeueCondition for a surface that doesn't exist anymore
this also fixes part of [2111536] Device is soft rebooted after ending the call through voice dialer
2009-09-10 19:41:18 -07:00
Mathias Agopian
436c627ca4 make sure conditions will return when the status of a surface is not NO_ERROR 2009-09-10 16:55:13 -07:00
San Mehat
181b31a0d8 Process: Add support for using scheduler policies instead of cgroups.
Preference is given to cgroups if available.

Signed-off-by: San Mehat <san@google.com>
2009-09-10 15:09:38 -07:00
Andreas Huber
e6c409632f Media MIME types now have corresponding constants in MediaDefs.h, new codec enumeration API. 2009-09-10 14:43:36 -07:00
Andreas Huber
033e6c3a68 Minor API change in MPEG4Writer, support for amr output into MPEG4 containers. 2009-09-09 16:36:12 -07:00
Andreas Huber
5a65a6e220 Added a .amr file extractor (for AMR-NB and AMR-WB content). 2009-09-09 11:05:42 -07:00
Android (Google) Code Review
4e60d7e60b Merge change 24179 into eclair
* changes:
  Support encoding amr-wb content in stagefright.
2009-09-09 13:55:48 -04:00
Android (Google) Code Review
11c803ac77 Merge change 24335 into eclair
* changes:
  use broadcast() instead of signal() when signaling the condition-variable Thread::RequestExitAndWait() is waiting for
2009-09-09 03:29:19 -07:00
Mathias Agopian
d42bd87f23 use broadcast() instead of signal() when signaling the condition-variable Thread::RequestExitAndWait() is waiting for
we could have several thread waiting on the condition and they all need to wake-up.
also added a debug "mTid" field in the class, which contains the tid of the thread (as opposed to pthread_t), this
is useful when debugging under gdb for instance.
2009-09-09 02:45:26 -07:00
Eric Laurent
96c08a69ea Fix issue 1992233: DTMF tones on Sholes is really long.
Add a parameter to ToneGenerator.startTone() allowing the caller to specify the tone duration. This is used by the phone application to have a precise control on the DTMF tone duration which was not possible with the use of delayed messaged.
Also modified AudioFlinger output threads so that 0s are written to the audio output stream when no more tracks are ready to mix instead of just sleeping. This avoids an issue where the end of a previous DTMF tone could stay in audio hardware buffers and be played just before the beginning of the next DTMF tone.
2009-09-08 22:56:07 -07:00
Android (Google) Code Review
b80f698362 Merge changes 24119,24120 into eclair
* changes:
  delete old and unused source files
  fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly
2009-09-08 14:36:06 -07:00
Andreas Huber
ee606e66b0 Support encoding amr-wb content in stagefright. 2009-09-08 12:55:50 -07:00
James Dong
392ff3b529 Add basic metadata retrieval support for midi, ogg, etc.
Bug 2050320
2009-09-08 11:04:53 -07:00
Mathias Agopian
9779b221e9 fix [2068105] implement queueBuffer/lockBuffer/dequeueBuffer properly
Rewrote SurfaceFlinger's buffer management from the ground-up.
The design now support an arbitrary number of buffers per surface, however the current implementation is limited to four. Currently only 2 buffers are used in practice.

The main new feature is to be able to dequeue all buffers at once (very important when there are only two). 

A client can dequeue all buffers until there are none available, it can lock all buffers except the last one that is used for composition. The client will block then, until a new buffer is enqueued.

The current implementation requires that buffers are locked in the same order they are dequeued and enqueued in the same order they are locked. Only one buffer can be locked at a time.

eg. Allowed sequence:   DQ, DQ, LOCK, Q, LOCK, Q
eg. Forbidden sequence: DQ, DQ, LOCK, LOCK, Q, Q
2009-09-07 16:32:45 -07:00
Android (Google) Code Review
e1da8be501 Merge change 23835 into eclair
* changes:
  When encountering a .nomedia file, notify the MediaScannerClient, so that it can erase the data column for entries that are in the folder containing the .nomedia file. This prevents us from deleting (via a delete trigger) files when somebody adds a .nomedia file after the fact.
2009-09-03 12:27:26 -07:00
Marco Nelissen
8b04661700 When encountering a .nomedia file, notify the MediaScannerClient,
so that it can erase the data column for entries that are in the
folder containing the .nomedia file. This prevents us from
deleting (via a delete trigger) files when somebody adds a
.nomedia file after the fact.
2009-09-03 11:22:28 -07:00
Andreas Huber
4c48342572 Setting the component role appears to be mandatory now for all mime types.
Also using CODEC_LOGV instead of vanilla LOGV to include the component name the message related to.
2009-09-02 16:05:36 -07:00
Andreas Huber
da050cf206 Some work to make audio encoding work. 2009-09-02 14:01:43 -07:00
Andreas Huber
43ad6eaf77 Squashed commit of the following:
commit c45bfbb97ccd05982008df47181f9c73abaf0497
Author: Andreas Huber <andih@google.com>
Date:   Tue Sep 1 15:58:12 2009 -0700

    This quirk should not be enabled by default in order to make the bug reproducible by the vendor.

commit 21d72e80e795fcae53d9c3bcc8ba6312b081e420
Author: Andreas Huber <andih@google.com>
Date:   Tue Sep 1 15:55:45 2009 -0700

    Undoing the hack to temporarily give up the lock to facilitate reading from the buffer source.

    This simply causes too many issues, there need to be independent threads providing input buffers and dequeuing output buffers.

commit 84d507def8999c146ce124cc8edfe106c9ca70c2
Author: Andreas Huber <andih@google.com>
Date:   Tue Sep 1 15:16:23 2009 -0700

    The AAC components appear to output stereo data even if the input data is mono...
2009-09-01 16:02:43 -07:00
Andreas Huber
329577aa6d Squashed commit of the following:
commit 3fa5f3ce910f34da0cedb8bcce1bd593db7eb740
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 27 14:48:54 2009 -0700

    Getting rid of more code now obsolete with the departure of OMXDecoder.

commit e0d923ec0c7bb60bec8eb97739036a4c70c0feef
Author: Andreas Huber <andih@google.com>
Date:   Thu Aug 27 14:33:06 2009 -0700

    Remove obsoleted OMXDecoder class. OMXDecoder is dead, long live OMXCodec.
2009-08-27 14:50:58 -07:00
Android (Google) Code Review
bc86bda499 Merge change 22897 into eclair
* changes:
  Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
2009-08-27 11:37:35 -07:00
Andreas Huber
42978e55fe An attempt to fix a deadlock between OMXCodec::start and upstream ::read 2009-08-27 10:41:13 -07:00
Eric Laurent
327c27be19 Fix issue 2045911: Camera Shutter tone does not play correctly while listening to music.
Add the possibility to delay routing and volume commands in AudioPolicyClientInterface. The delay is not blocking for the caller.
2009-08-27 05:58:10 -07:00
Andreas Huber
127fcdcd9f Another quirk, some OMX components fail to properly flush before shutdown and we must do it for them... 2009-08-26 16:27:02 -07:00
Andreas Huber
b5ceb9ee21 assert => CHECK in stagefright. 2009-08-26 14:48:20 -07:00
Andreas Huber
446f44f61a Keep up with latest changes to overlay handling on that unnamable platform. 2009-08-26 09:11:13 -07:00