1169 Commits

Author SHA1 Message Date
Jeff Brown
f1ec1ddd50 am bc9599d4: am 838e93ed: Merge "Looper: Drop default parameters in favor of a safer overload." into gingerbread
Merge commit 'bc9599d48c79c18d306a13f51af9ef2aac92cdca'

* commit 'bc9599d48c79c18d306a13f51af9ef2aac92cdca':
  Looper: Drop default parameters in favor of a safer overload.
2010-09-17 16:10:01 -07:00
Nipun Kwatra
8726305905 Merge "Adding default profiles for specific levels." 2010-09-17 13:54:55 -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
Nipun Kwatra
d48a15c3fe Adding default profiles for specific levels.
The low and high profiles should each match one of the
specific profiles. So we need to add the specific profiles
corresponding to the low/high profiles. This makes the
default profile compliant to documentation + cts.

Also fixed javadoc to account time lapse profiles.

Change-Id: I34e7307d00ce261c69dc10ead2900025c7f6d428
2010-09-17 13:19:13 -07:00
Nipun Kwatra
7553cf74e6 Implemented frequent read returns for quick stop in time lapse.
If the frame capture interval is large, read will block for a long time.
Due to the way the mediaRecorder framework works, a stop() call from
mediaRecorder waits until the read returns, causing a long wait for
stop() to return. To avoid this, we return a copy of the last read
frame with the same time stamp if a frame is not available quickly.
This keeps the read() call from blocking too long. This method is
triggered when startQuickReadReturns() is called on
CameraSourceTimeLapse.

In the still camera case, also using waitRelative on Condition
instaed of sleeping, so that we can wake it up.
Also for the idle check instead of sleeping, we now wait on a
condition variable, which is woken up when the last takePicture
callback gets called.

Change-Id: Ia74386e175536aee0f44ae2f8b114c353d3d72f5
2010-09-17 09:50:27 -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
711f82784f am 6f0ff46c: am 9c258710: Merge "Fix app switch latency optimization." into gingerbread
Merge commit '6f0ff46c6f1fd1b61325b545ab9e93c5ebf37d25'

* commit '6f0ff46c6f1fd1b61325b545ab9e93c5ebf37d25':
  Fix app switch latency optimization.
2010-09-16 17:29:46 -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
James Dong
9b61dc564e Add YUV420P color format support for video output from camera hal
Change-Id: I5c8266348d0840361c8095ce351ac85c44d4068f
2010-09-16 14:10:31 -07:00
Jeff Brown
707929d6f8 am 61cf67a2: am 24326f72: Merge "Input API review." into gingerbread
Merge commit '61cf67a220ba3205737c646c1c836a92074220de'

* commit '61cf67a220ba3205737c646c1c836a92074220de':
  Input API review.
2010-09-16 13:05:50 -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
fa8186c716 am 7642c82c: am f4d788c9: Merge "Make input dispatcher only ANR for foreground windows." into gingerbread
Merge commit '7642c82c291051919aad87c797e2dc1d77ed55e1'

* commit '7642c82c291051919aad87c797e2dc1d77ed55e1':
  Make input dispatcher only ANR for foreground windows.
2010-09-15 21:42:28 -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
6704d310f9 am 310da64d: am f182e8a8: fix a typo where the eventtags code were wrong
Merge commit '310da64d78750cdba4349d7cc0a268c07155569d'

* commit '310da64d78750cdba4349d7cc0a268c07155569d':
  fix a typo where the eventtags code were wrong
2010-09-15 17:53:43 -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
49478536b6 am 14bc6b5d: am 09340a4b: Merge "Replace epoll() with poll() and rename PollLoop to Looper." into gingerbread
Merge commit '14bc6b5d0677e5c454a67775c852f90389bb4567'

* commit '14bc6b5d0677e5c454a67775c852f90389bb4567':
  Replace epoll() with poll() and rename PollLoop to Looper.
2010-09-15 12:32:29 -07:00
Mathias Agopian
a5ab8ce602 resolved conflicts for merge of 48a86240 to master
Change-Id: I2305fef9f4dd46183337217d822df3c675b6b6e5
2010-09-15 12:29:18 -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
Nipun Kwatra
4e94c30ed5 Added command type to play recording sound.
Added CAMERA_CMD_PLAY_RECORDING_SOUND command type to play recording
sound through sendCommand. This is currently needed by time lapse
recording using still mode capture, which disables the shutter sound
but needs to play the recording sound.

Change-Id: I376aa40f45b6064fd862abc065456b06fc338020
2010-09-14 16:49:08 -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
Nipun Kwatra
088146a421 Adding enable/disable option for sendCommand()
- Added enum CAMERA_CMD_ENABLE_SHUTTER_SOUND which corresponds to
  command type for enabling/disabling shutter sound.
- The implementation checks if it is legal to disable shutter sound.
  If it is, then any process can disable the sound. If not, then only
  the mediaserver process is allowed to do this. Currently time lapse
  capture needs this functionality to disable shutter sound when still
  mode is used to capture time lapse video.

Change-Id: Id147a3bcc6a345c2c6a6d52bf98fd8292386bb19
2010-09-14 13:57:59 -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
Mike Lockwood
0c7d077e9a Merge changes I68379740,I9053218f
* changes:
  MediaFile: Add support for some popular non-media file types.
  Media scanner support for tracking files of arbitrary type.
2010-09-12 20:41:07 -07:00
Mike Lockwood
c37255d5d0 Media scanner support for tracking files of arbitrary type.
The native media scanner no longer filters files based on file extension.
Audio, video, image and playlist files are handled as before, but non-media
files are now inserted into the "files" table, which was originally added
to support MTP.

Change-Id: I9053218fb6d2671a3bb181405c34442b94678afc
Signed-off-by: Mike Lockwood <lockwood@android.com>
2010-09-12 23:21:44 -04:00
Jeff Brown
b3787d57ff am 0f0541e4: am b88102f5: Input dispatcher ANR handling enhancements.
Merge commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6'

* commit '0f0541e40cfef51eb5c3769e53c1aa853b53aaf6':
  Input dispatcher ANR handling enhancements.
2010-09-12 17:15:19 -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
Nipun Kwatra
522632cde5 Exposing specific profile levels + hasProfile().
- Exposing the specific resolution profile levels
  QUALITY_{QCIF,CIF,480P,720P,1080P} and the new time lapse profiles
  QUALITY_TIME_LAPSE_{LOW,HIGH,QCIF,CIF,480P,720P,1080P}
- Unhiding the hasProfile() function used to test if a given profile exists.

Change-Id: I5d8b9e1ba61718f304235e76d85244e428e68643
2010-09-10 18:01:46 -07:00
Nipun Kwatra
55d39f2066 Merge "Adding hasProfile." 2010-09-10 15:04:17 -07:00
Nipun Kwatra
35c8b532e5 Merge "Added specific resolution and time lapse profiles." 2010-09-10 14:26:45 -07:00
Nipun Kwatra
9d619542be Adding hasProfile.
- Added hasProfile to CamcorderProfile and JNI.
- Added hasCamcorderProfile to MediaProfiles.
- using android.hardware.Camera.CAMERA_ID_DEFAULT for default camera
  in get().

Change-Id: Ib57bb49ae79492d7cbc0ec6c7b6efcbf74f80013
2010-09-10 14:22:11 -07:00
Nipun Kwatra
4af0dfd6cb Added specific resolution and time lapse profiles.
- Added enums QUALITY_{QCIF,480P,720P,1080P}
  QUALITY_TIME_LAPSE_{LOW,HIGH,QCIF,480P,720P,1080P} in CamcorderProfile
  and corresponding ones in MediaProfiles.
- Added functions createDefaultCamcorderTimeLapseLowProfile,
  createDefaultCamcorderTimeLapseHighProfile to set default values.
- Moved javadoc for constants to the get() function.

Change-Id: Ib8b3f8d29395dff77a397d1e6b44cfaf8c481d4d
2010-09-10 14:22:08 -07:00
Jean-Baptiste Queru
3d6b009db1 am 09f1e2b2: resolved conflicts for merge of 56aa3c76 to gingerbread-plus-aosp
Merge commit '09f1e2b2151ea18c05b9138a0a5cb63af18ea373'

* commit '09f1e2b2151ea18c05b9138a0a5cb63af18ea373':
  Initial contribution from Sony Corporation.
2010-09-10 11:29:10 -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
Romain Guy
9584a542e3 Merge "Purge Skia objects from GL caches as needed." 2010-09-08 18:06:11 -07:00
Romain Guy
a2341a9f6a Purge Skia objects from GL caches as needed.
Change-Id: I754c671cf790ad5ae8bf047ad328034217da4ecc
2010-09-08 18:04:33 -07:00
James Dong
e3aa6aa770 am 306cd58d: am d353c840: Merge "HW audio encoder expects timestamp via kKeyTime from each input buffer" into gingerbread
Merge commit '306cd58ddcc0cb8487bc6e015f8c692eea47a334'

* commit '306cd58ddcc0cb8487bc6e015f8c692eea47a334':
  HW audio encoder expects timestamp via kKeyTime from each input buffer
2010-09-08 17:57:56 -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
15ff01cdb4 am e126119c: am 95d86480: Merge "Modify type of some environmental reverb parameters" into gingerbread
Merge commit 'e126119c3a406bc564f2549aeb1416aff112689d'

* commit 'e126119c3a406bc564f2549aeb1416aff112689d':
  Modify type of some environmental reverb parameters
2010-09-08 17:22:54 -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
3dfc5721ad am 8723bb58: am b21fb104: Fix key repeat delay.
Merge commit '8723bb58b17a07b7ca036cc76d737c6c0f4b13c7'

* commit '8723bb58b17a07b7ca036cc76d737c6c0f4b13c7':
  Fix key repeat delay.
2010-09-08 14:38:09 -07:00
Jeff Brown
b380c4d7ed resolved conflicts for merge of a05088c1 to master
Change-Id: I7973f9f28586dec9b9659f8f662f40db7997a521
2010-09-08 13:02:55 -07:00