960 Commits

Author SHA1 Message Date
Jeff Brown
4ec134cdba am cce0cd13: Merge "Looper: use pthread_once for TLS key initialization." into gingerbread
Merge commit 'cce0cd138dd0dc338db59083052aca01a51bd52d' into gingerbread-plus-aosp

* commit 'cce0cd138dd0dc338db59083052aca01a51bd52d':
  Looper: use pthread_once for TLS key initialization.
2010-09-21 15:52:09 -07:00
Jeff Brown
cce0cd138d Merge "Looper: use pthread_once for TLS key initialization." into gingerbread 2010-09-21 15:36:06 -07:00
Jeff Brown
134b4ae901 Looper: use pthread_once for TLS key initialization.
Also fix a Valgrind complaint by zeroing out the entire epoll event
struct since otherwise the data field union would be partly
uninitialized (but not in a harmful way).

Change-Id: I2091ce517e87fcad7c9caf90e2c5e4854a7ca465
2010-09-21 15:26:51 -07:00
Andreas Huber
af90958184 am 67738486: Merge "Remove stagefright foundation\'s incompatible logging interface and update callsites." into gingerbread
Merge commit '67738486d9d1bdc2e6fb0c04698fd74de689acbc' into gingerbread-plus-aosp

* commit '67738486d9d1bdc2e6fb0c04698fd74de689acbc':
  Remove stagefright foundation's incompatible logging interface and update callsites.
2010-09-21 15:17:42 -07:00
Andreas Huber
6e3fa444c5 Remove stagefright foundation's incompatible logging interface and update callsites.
Change-Id: I45fba7d60530ea0f233ac3695a97306b6dc1795c
2010-09-21 15:12:19 -07:00
Wu-cheng Li
2ad1ebcaab am d45cb72a: Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
Merge commit 'd45cb72ac0d7d57829ffc9223decb89a5fc42ce2' into gingerbread-plus-aosp

* commit 'd45cb72ac0d7d57829ffc9223decb89a5fc42ce2':
  Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
2010-09-21 08:57:15 -07:00
Wu-cheng Li
d45cb72ac0 Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
This constant is not public yet. Continuous autofocus should
behave differently in still camera and camcorder. In camcorder,
lens movement may be more smooth. And the triggers to start a
new focus search may be different. If there is a need,
FOCUS_MODE_CONTINUOUS_PHOTO can be added in the future.

Change-Id: I05df9e491aca37829be3df92a73b952f26c86a4a
2010-09-21 08:46:32 -07:00
Jeff Brown
bc9599d48c am 838e93ed: Merge "Looper: Drop default parameters in favor of a safer overload." into gingerbread
Merge commit '838e93ed19879ce3d88b5be51630137d6a6999c6' into gingerbread-plus-aosp

* commit '838e93ed19879ce3d88b5be51630137d6a6999c6':
  Looper: Drop default parameters in favor of a safer overload.
2010-09-17 13:30:20 -07:00
Jeff Brown
a1361e48fa Looper: Drop default parameters in favor of a safer overload.
The idea is that if you're writing code that wants fd/events/data on
return from pollOnce() / pollAll() you should really pass in all of those
arguments.  When I changed the Looper API earlier, it was difficult
to ensure that all callers were passing the right parameters since they
were relying on default parameters to some degree so usage mistakes
would not have been caught by the compiler.

Change-Id: I1f2812894270aaf1515017ac1616b6b312d9b565
2010-09-16 18:51:15 -07:00
Jeff Brown
6f0ff46c6f am 9c258710: Merge "Fix app switch latency optimization." into gingerbread
Merge commit '9c2587104ae259b9fa6a3525063197cc08e8820b' into gingerbread-plus-aosp

* commit '9c2587104ae259b9fa6a3525063197cc08e8820b':
  Fix app switch latency optimization.
2010-09-16 17:15:48 -07:00
Jeff Brown
54a1825121 Fix app switch latency optimization.
This optimization was broken due to recent changes in how ANRs are handled.

Change-Id: Ic99248a12755fadac8d4893e7d305b773e038d3d
2010-09-16 16:41:46 -07:00
Jeff Brown
61cf67a220 am 24326f72: Merge "Input API review." into gingerbread
Merge commit '24326f7223275ba9c85014b86d42040e3a7d2815' into gingerbread-plus-aosp

* commit '24326f7223275ba9c85014b86d42040e3a7d2815':
  Input API review.
2010-09-16 13:01:54 -07:00
Jeff Brown
24326f7223 Merge "Input API review." into gingerbread 2010-09-16 12:57:56 -07:00
Jeff Brown
7642c82c29 am f4d788c9: Merge "Make input dispatcher only ANR for foreground windows." into gingerbread
Merge commit 'f4d788c9309bc5480100d980608472e4cb04f309' into gingerbread-plus-aosp

* commit 'f4d788c9309bc5480100d980608472e4cb04f309':
  Make input dispatcher only ANR for foreground windows.
2010-09-15 18:57:48 -07:00
Jeff Brown
519e024d1e Make input dispatcher only ANR for foreground windows.
Redesigned the input dispatcher's ANR timeout mechanism so it is much
closer to Froyo's policy.  ANR is only ever signalled if the dispatcher
is waiting on a window to finish processing its previous event(s) and
there is new pending input.

In the old code, we tracked the dispatch timeout separately for each
input channel.  This was somewhat complicated and also resulted in the
situation where applications could ANR long after the user had pushed
them into the background.

Change-Id: I666ecada0952d4b95f1d67b9f733842b745c7f4b
2010-09-15 18:52:08 -07:00
Mathias Agopian
310da64d78 am f182e8a8: fix a typo where the eventtags code were wrong
Merge commit 'f182e8a8c2e726b376f3f4c0deb02dfdb6ae06a9' into gingerbread-plus-aosp

* commit 'f182e8a8c2e726b376f3f4c0deb02dfdb6ae06a9':
  fix a typo where the eventtags code were wrong
2010-09-15 12:53:59 -07:00
Mathias Agopian
f182e8a8c2 fix a typo where the eventtags code were wrong
Change-Id: I517112a1475c10b71009a0aa9c3894c76a1f270f
2010-09-15 12:46:59 -07:00
Jeff Brown
dc1ab4b5cc Input API review.
Drop currently unsupported input features.
Add documentation comments.

Change-Id: I407d2e1dd90c5ee82983a3ccf177430d35ee7592
2010-09-14 20:46:14 -07:00
Jeff Brown
14bc6b5d06 am 09340a4b: Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread
Merge commit '09340a4bb99507d9b6bfbfc68a450d4d4f354d73' into gingerbread-plus-aosp

* commit '09340a4bb99507d9b6bfbfc68a450d4d4f354d73':
  Replace epoll() with poll() and rename PollLoop to Looper.
2010-09-14 15:32:03 -07:00
Jeff Brown
09340a4bb9 Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread 2010-09-14 15:27:33 -07:00
Mathias Agopian
48a862407d am b3ffc78f: Merge "Add logging of various important graphics events" into gingerbread
Merge commit 'b3ffc78f3432344702e6f5232067ab624083cad2' into gingerbread-plus-aosp

* commit 'b3ffc78f3432344702e6f5232067ab624083cad2':
  Add logging of various important graphics events
2010-09-14 15:14:10 -07:00
Jeff Brown
4fe6c3e51b Replace epoll() with poll() and rename PollLoop to Looper.
As part of this change, consolidated and cleaned up the Looper API so
that there are fewer distinctions between the NDK and non-NDK declarations
(no need for two callback types, etc.).

Removed the dependence on specific constants from sys/poll.h such as
POLLIN.  Instead looper.h defines events like LOOPER_EVENT_INPUT for
the events that it supports.  That should help make any future
under-the-hood implementation changes easier.

Fixed a couple of compiler warnings along the way.

Change-Id: I449a7ec780bf061bdd325452f823673e2b39b6ae
2010-09-14 01:59:45 -07:00
Mathias Agopian
04262e9f84 Add logging of various important graphics events
There are 16 events logged in the event log:
SF_APP_DEQUEUE_BEFORE
SF_APP_DEQUEUE_AFTER
SF_APP_LOCK_BEFORE
SF_APP_LOCK_AFTER
SF_APP_QUEUE

SF_REPAINT
SF_COMPOSITION_COMPLETE
SF_UNLOCK_CLIENTS
SF_SWAP_BUFFERS
SF_REPAINT_DONE

SF_FB_POST_BEFORE
SF_FB_POST_AFTER
SF_FB_DEQUEUE_BEFORE
SF_FB_DEQUEUE_AFTER
SF_FB_LOCK_BEFORE
SF_FB_LOCK_AFTER

all events log the buffer conserned and a timestamp in microseconds.

by default the logging is not enabled, to turn it on:
adb shell service call SurfaceFlinger 1006 i31 1
adb shell setprop debug.graphic_log 1

The effect is immediate in SurfaceFlinger, but applications need to be
restarted.

Change-Id: Ifc2e31f7aed072d9a7dede20ff2ce59231edbec1
2010-09-13 23:16:58 -07:00
Jeff Brown
0f0541e40c am b88102f5: Input dispatcher ANR handling enhancements.
Merge commit 'b88102f5b7e51552a3576cf197b4c8cf96f193d1' into gingerbread-plus-aosp

* commit 'b88102f5b7e51552a3576cf197b4c8cf96f193d1':
  Input dispatcher ANR handling enhancements.
2010-09-12 17:05:38 -07:00
Jeff Brown
b88102f5b7 Input dispatcher ANR handling enhancements.
This change is essentially a rewrite of the main input dispatcher loop
with the target identification folded in.  Since the input dispatcher now
has all of the window state, it can make better decisions about
when to ANR.

Added a .5 second deadline for processing app switch keys.  This behavior
predates Gingerbread but had not previously been ported.

Fixed some timing inaccuracies in the ANR accounting that could cause
applications to ANR sooner than they should have.

Added a mechanism for tracking key and motion events that have been
dispatched to a window so that appropriate cancelation events can be
synthesized when recovering from ANR.  This change helps to keep
applications in sync so they don't end up with stuck buttons upon
recovery from ANRs.

Added more comments to describe the tricky parts of PollLoop.

Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
2010-09-12 16:52:03 -07:00
Jean-Baptiste Queru
09f1e2b215 resolved conflicts for merge of 56aa3c76 to gingerbread-plus-aosp
Change-Id: I3d36a665f93f976824592edf35f6d6a205cc7617
2010-09-10 09:53:43 -07:00
James Dong
d353c840ad Merge "HW audio encoder expects timestamp via kKeyTime from each input buffer" into gingerbread 2010-09-08 17:51:59 -07:00
James Dong
d015ccf62b HW audio encoder expects timestamp via kKeyTime from each input buffer
- This fixes media server crashes on droid

Change-Id: I7191cadc5275107425ec3ee3d437b2c5295858dc
2010-09-08 17:28:57 -07:00
Eric Laurent
95d5de0681 Modify type of some environmental reverb parameters
Changed type of decay time, reverb delay and reflections delay parameters
from signed to unsigned int to match OpenSL ES interface definition.

Also fixed some type casts in lvm reverb wrapper.

Change-Id: I5ca5e76a87c2590f01f031f3168355586ef22556
2010-09-08 16:06:18 -07:00
Jeff Brown
b21fb104cc Fix key repeat delay.
Change-Id: I6216e082324ee29bf50e37acc673350ca5417c4d
2010-09-08 12:28:43 -07:00
Jeff Brown
85a3176704 Add support for secure views.
Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.

Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.

Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
2010-09-08 11:50:55 -07:00
Dianne Hackborn
42c03e579a Modify native ALooper to take an explicit ident.
The ALooper API now uses an explicit "identifier" for the integer
that is returned rather than implicitly using the fd.  This allows
the APIs that had the fd to be a little more sane.

Change-Id: I8507f535ad484c0bdc4a1bd016d87bb09acd7ff0
2010-09-07 15:46:55 -07:00
Andreas Huber
9fee0b2a02 Ogg files can be tagged to be automatically looping, this setting always overrides the MediaPlayer's setLooping setting.
Change-Id: Ifb564c6cdf6137eac14869f9ca7d471f05a5556a
related-to-bug: 2974691
2010-09-03 14:31:50 -07:00
James Dong
7755cdd696 Remove unused/debugging code from MP4 file writer
o also makes nal length in the recorded file modifiable at runtime

Change-Id: I731b4dde7070d8d9628b36b523a5b2c011c7c2cf
2010-09-03 10:13:19 -07:00
James Dong
cb7e65c6cb Better file size estimate
When the recorded file becomes large, the metadata size can
no longer be ignored. This makes it possible to save the
recorded file when the storage becomes almost full at the
end of the recording session.

Change-Id: Ief038080f825c9946ce550949c03e914aec1e31a
2010-09-02 20:10:00 -07:00
James Dong
4c23815c39 Calculate audio media drift time from AudioSource
The problem was that the time to receive an output buffer
from an audio encoder is different because the encoder does not
need to read from the source for all output buffers. This leads
to large fluctuation in terms of wall clock duration between two
neighboring audio sample outputs from the audio encoder. As a
result, the media time for the video track after adjustment using
the drifting changes wildly sometimes.

This patch addresses this issue by only updating the media drift
time when an audio source input buffer is read. the wall clock
for the audio track is also calculated at the same time when
the input audio buffer is read at AudioSource.

bug - 2959800

Change-Id: I3174aa182f744784b540f0a7198524d4eee8bd7b
2010-09-01 20:45:39 -07:00
aimitakeshi
d074e30ce4 Initial contribution from Sony Corporation.
Add DRM Framework to support DRM content playback
  together with StageFright.

  - DRM Framework code is added
     - include/drm
     - drm
  - api/current.xml is updated to include DRM Framework Java APIs
  - cmds/servicemanager/service_manager.c is modified
    to add drmManager and drmIOService.

Change-Id: I6d7bc9c7067362b500e530988a9ce241761866fb
2010-09-01 15:40:00 +09:00
Jeff Brown
5fad2675e8 Remove incomplete input device enumeration NDK API.
Change-Id: I32de74ff5fcf0e29179a2aee03ddabd22fa485bb
2010-08-31 15:24:55 -07:00
Brad Fitzpatrick
0234376503 Don't propagate StrictMode over one-way Binder calls.
This was causing stack stitching problems where a one-way call with
violations followed by a two-way call without violations was getting
the previous one-way call's violation stack stitched on to the second
caller's stack.

The solution is a little more indirect than I would've liked
(preserving the binder's onTransact flags until enforceInterface) but
was seemingly necessary to work without changing the AIDL compiler.
It should also be sufficiently cheap, since no new calls to
thread-local IPCThreadState lookups were required.  The additional
work is just same-thread getter/setters on the existing
IPCThreadState.

Change-Id: I4b6db1d445c56e868e6d0d7be3ba6849f4ef23ae
2010-08-31 13:16:49 -07:00
Jeff Brown
8d60866e21 Input device calibration and capabilities.
Finished the input device capability API.
Added a mechanism for calibrating touch devices to obtain more
accurate information about the touch contact area.
Improved pointer location to show new coordinates and capabilities.
Optimized pointer location display and formatting to avoid allocating large
numbers of temporary objects.  The GC churn was causing the application to
stutter very badly when more than a couple of fingers were down).
Added more diagnostics.

Change-Id: Ie25380278ed6f16c5b04cd9df848015850383498
2010-08-30 18:16:43 -07:00
Wu-cheng Li
7ec7b9970c Remove camera metering mode API.
Metering mode is not supported yet.

Change-Id: Id6906d6ab0cd1a9dcbc5c303d8d5081b2cda699e
2010-08-30 13:33:53 -07:00
Andreas Huber
df992ac9cc Merge "ALoopers can now be named (useful to distinguish threads)." into gingerbread 2010-08-30 10:28:24 -07:00
Andreas Huber
c4e0b70a21 ALoopers can now be named (useful to distinguish threads).
Change-Id: Ieabaddb2e3a9e3a7a5bc36e55cd0721b60dbd50e
2010-08-27 15:21:07 -07:00
James Dong
90862e2a8b Workaround for a QCOM issue where the output buffer size advertised by the AVC encoder
is occasionally too small.

bug - 2882917

Change-Id: Id59d8529084c5689a26f272e0cd3b1e955fd8a30
2010-08-27 13:59:26 -07:00
James Dong
b86365ad74 Merge "Suppress the video recording start signal - bug 2950297" into gingerbread 2010-08-27 13:47:06 -07:00
Mathias Agopian
c9289fa1c4 fix a race in SF buffer management
also remove some unused code.

Change-Id: Iae2c3309b7a08055f3e13a5b866c5c084993e352
2010-08-26 17:42:27 -07:00
James Dong
d7f1c3d692 Suppress the video recording start signal
- bug 2950297

Change-Id: I0044d07178691feb904cf81e87c1b6d4b714dc1a
2010-08-26 16:56:49 -07:00
Eric Laurent
c14f9ca6e5 Merge "Added preset reverb." into gingerbread 2010-08-25 15:09:10 -07:00
Andreas Huber
efdd088a71 Allow sniffers to return a packet of opaque data that the corresponding extractor can take advantage of to not duplicate work already done sniffing. The mp3 extractor takes advantage of this now.
Change-Id: Icb77ae3ee95a69c7da25b4d3b8696c0a2d33028a
related-to-bug: 2948754
2010-08-25 13:08:38 -07:00
Eric Laurent
a7e5648d61 Added preset reverb.
Modified lvm reverb wrapper code to expose a preset reverb interface.
Also removed debug log from bundle and reverb wrapper.

Change-Id: If9b95d91e25a6ff834decdfdda34b17df9b46967
2010-08-24 17:32:48 -07:00