1070 Commits

Author SHA1 Message Date
Mathias Agopian
bce2e90ca9 am bc4389ed: am 8395b462: Merge "fix [2931513] Add support for setting the orientation of an ANativeWindow" into gingerbread
Merge commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64'

* commit 'bc4389edfbb5777aec1a9af7863b2ca3ade2fa64':
  fix [2931513] Add support for setting the orientation of an ANativeWindow
2010-08-24 17:56:40 -07:00
Mathias Agopian
e96aa3e859 fix [2931513] Add support for setting the orientation of an ANativeWindow
Also implement support for cropping.

Change-Id: Iba5888dd242bf2feaac9e9ce26e404c1f404c280
2010-08-24 15:40:50 -07:00
James Dong
7741ecc907 am 28a92120: am 3f51fa78: Runtime dump support for MediaWriter
Merge commit '28a92120a702289533a9c9d004bd60f83b2fd98b'

* commit '28a92120a702289533a9c9d004bd60f83b2fd98b':
  Runtime dump support for MediaWriter
2010-08-24 11:20:40 -07:00
Chia-chi Yeh
3f6855ba6c am a102871c: am b80e610b: Merge "Visualizer: replace the FFT implementation with a faster one." into gingerbread
Merge commit 'a102871c7cbb74ebddc53231a871145de61351b0'

* commit 'a102871c7cbb74ebddc53231a871145de61351b0':
  Visualizer: replace the FFT implementation with a faster one.
2010-08-24 11:19:28 -07:00
Kenny Root
53e75ea847 resolved conflicts for merge of 485de781 to master
Change-Id: I483cb81596f09b024b1aea7fc55960183f38b24f
2010-08-24 09:57:33 -07:00
Wu-cheng Li
eee09313c6 am 346b6126: am 97a56269: Merge "Add camera fps range API." into gingerbread
Merge commit '346b6126d54bda4ddc705b27f49004b5cf3a2b3e'

* commit '346b6126d54bda4ddc705b27f49004b5cf3a2b3e':
  Add camera fps range API.
2010-08-24 09:01:27 -07:00
Jamie Gennis
85cfdd0112 Change the framework to use the new camera preview path.
This change makes the camera HAL interface take an ANativeWindow interface from
which all the camera preview buffers will be allocated.  The framework code
running in application processes now passes a Surface object rather than an
ISurface to the camera server via Binder when setting the preview surface.  The
camera server then forwards that Surface object (which implements the
ANativeWindow interface) to the camera HAL, which uses it to communicate with
SurfaceFlinger to allocate the camera preview buffers.

Change-Id: Ie438f721559cd7de5e4f848a26d96360dda07b5f
2010-08-23 14:31:30 -07:00
Andreas Huber
d5350764c9 Merge "Squashed commit of the following:" 2010-08-23 12:31:59 -07:00
Andreas Huber
e3c01832fc Squashed commit of the following:
commit 35cc68814a9537c31fde146e171e7b0bbdfe211e
Author: Andreas Huber <andih@google.com>
Date:   Mon Aug 16 08:48:42 2010 -0700

    Only enable support for yuv to yuv conversion on passion, where it's available, use the slower yuv->rgb565 path everywhere else.

commit d8ac5a8814103e60d11d2acf61997fc31a1dc58d
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 13 13:56:44 2010 -0700

    The software renderer takes over all rendering, converting from yuv to yuv if possible and rgb565 otherwise.

commit 684972074b74318bdcb826ed9b5b0864d2d2e273
Author: Andreas Huber <andih@google.com>
Date:   Fri Aug 13 09:34:35 2010 -0700

    A first shot at supporting the new rendering APIs.

Change-Id: Iea9b32856da46950501f1a700f616b5feac710fd
2010-08-23 12:30:24 -07:00
Wu-cheng Li
6c32677db3 am caaf7fe3: am 271c1bfd: Merge "Handle the camera open failure better." into gingerbread
Merge commit 'caaf7fe3a407c764f643585d050c16f5fb56503c'

* commit 'caaf7fe3a407c764f643585d050c16f5fb56503c':
  Handle the camera open failure better.
2010-08-23 12:02:21 -07:00
James Dong
3f51fa78ad Runtime dump support for MediaWriter
Change-Id: I10b2c474de612ee4cef4b7c9eae2ee1dd8c2e895
2010-08-23 10:34:05 -07:00
Chia-chi Yeh
b80e610b07 Merge "Visualizer: replace the FFT implementation with a faster one." into gingerbread 2010-08-22 18:31:15 -07:00
James Dong
349250f3b6 am c8d2fa70: am cbd038fe: Merge "Make MediaWriter stop and pause return errors if necessary" into gingerbread
Merge commit 'c8d2fa704abebdbf0bd8aac185216dc068950217'

* commit 'c8d2fa704abebdbf0bd8aac185216dc068950217':
  Make MediaWriter stop and pause return errors if necessary
2010-08-21 09:43:41 -07:00
Andreas Huber
fc5d0cf564 am b29ebd39: am f0ad5484: Merge "In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data." into gingerbread
Merge commit 'b29ebd397e25a7176bcc1c81980f17b0190ebe7f'

* commit 'b29ebd397e25a7176bcc1c81980f17b0190ebe7f':
  In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data.
2010-08-21 09:41:54 -07:00
Kenny Root
e49564e0f7 am 821afa9a: am 54d41379: Merge "Add OBB flags to support overlays" into gingerbread
Merge commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973'

* commit '821afa9aec8d3a4ffd2e72ce797d8097eaf13973':
  Add OBB flags to support overlays
2010-08-21 09:41:12 -07:00
Jeff Brown
feb02e7695 am d25f0aea: am 99401b29: Merge "Add support for throttling motion events." into gingerbread
Merge commit 'd25f0aea1cebe93aff55a75374e172f87115f1b3'

* commit 'd25f0aea1cebe93aff55a75374e172f87115f1b3':
  Add support for throttling motion events.
2010-08-21 09:35:13 -07:00
Kenny Root
be857d4284 Reorganize MountService IPC
Remove auto-generated AIDL files and replace them with manually edited
.java and .cpp/.h files so that binder calls can be made from either
Java or C++.

Update the makefiles to not attempt to generate the AIDL files and also
remove the old auto-generated .java files.

Put all the storage-related C++ things in libstorage so that we don't
pollute other libraries.

Change-Id: I82d1631295452709f12ff1270f36c3100e652806
2010-08-20 13:17:12 -07:00
Nipun Kwatra
727f658e81 Merge "Added downsample()" 2010-08-20 11:35:38 -07:00
Wu-cheng Li
97a56269d0 Merge "Add camera fps range API." into gingerbread 2010-08-20 11:19:51 -07:00
Wu-cheng Li
454630f237 Add camera fps range API.
Original preview frame rate API assumes the frame rate
is fixed. It does not not work with auto frame rate camera.

Change-Id: I38f7122ac8ec844ffd63558dc0763ffa17b0926a
2010-08-20 11:14:17 -07:00
Nipun Kwatra
96624731c3 Added downsample()
Added a downsample function which downsamples the source image
starting at an offset and skipping every few pixels. Currently
no low pass filtering is done, but it should be added later.

Change-Id: Iec34092c536bfc661a15521e6a1ef2ef3f815c61
2010-08-20 10:54:59 -07:00
Nipun Kwatra
437e6c49f1 Merge "const correctness, validPixel test." 2010-08-20 10:41:08 -07:00
Jeff Brown
0ca7aae911 am 33992d41: am 72e0b2ab: Merge "Fix some input device mapping bugs with certain drivers." into gingerbread
Merge commit '33992d4195fe55f42ba6919f5a07707a51a12d5d'

* commit '33992d4195fe55f42ba6919f5a07707a51a12d5d':
  Fix some input device mapping bugs with certain drivers.
2010-08-19 23:43:19 -07:00
Wu-cheng Li
271c1bfd60 Merge "Handle the camera open failure better." into gingerbread 2010-08-19 21:45:46 -07:00
Wu-cheng Li
e7044384b2 Handle the camera open failure better.
Check if camera hardware is NULL to avoid mediaserver crash.

Change-Id: Ibde0251f30bdb6b36a5d5380222d7be25ec9449c
2010-08-19 21:44:06 -07:00
Nipun Kwatra
d1fbdf1a3f const correctness, validPixel test.
- made width(), height() const member functions.
- added validPixel() which returns true if pixel is in the allowed range.
- now testing validPixel in get/setPixelValue

Change-Id: I1dee5060bd4f8dcbdcd542ec4647ea328f0185c3
2010-08-19 18:26:58 -07:00
James Dong
cbd038fe20 Merge "Make MediaWriter stop and pause return errors if necessary" into gingerbread 2010-08-19 13:59:32 -07:00
James Dong
d036662470 Make MediaWriter stop and pause return errors if necessary
o Make the API consistent with SF framework, which the MediaSource
  provides a return status for stop

o Also, helps to convey errors that occurred right when a
  premature stop() is called, leading to a potentially
  mal-formed output file.

Change-Id: I52a932345f38570fdf8ea04d67d73dd94ccd30ef
2010-08-19 13:33:13 -07:00
Wu-cheng Li
eba1274978 Merge "Adding getSupportedPreviewSizes to CameraParameters.DO NOT MERGE" into gingerbread 2010-08-19 11:08:39 -07:00
Wu-cheng Li
ccb915963e Merge "Adding getSupportedPictureSizes to CameraParameters.DO NOT MERGE" into gingerbread 2010-08-19 11:08:36 -07:00
Andreas Huber
eef3c33e56 In the absence of width/height information in the sdp, extract the dimensions from the avc codec specific data.
Change-Id: I98c4194593c7e6e24f6fc339c862245111800293
2010-08-19 10:39:47 -07:00
Nipun Kwatra
6c008b8640 Adding getSupportedPreviewSizes to CameraParameters.DO NOT MERGE
Moved functionality to parse string of sizes from getSupportedPictureSizes
to parseSizesList.
Added getSupportedPreviewSizes which returns a list of supported preview sizes.

Change-Id: I41d4f62f9f1641e9e9258aa2ebaeda13ba846c02
2010-08-19 09:59:18 -07:00
Nipun Kwatra
0de0c4960d Adding getSupportedPictureSizes to CameraParameters.DO NOT MERGE
Also added a struct 'Size' containing a width and a height field.
Modified parse_size to optionally set an end pointer pointing to the
character after the found size.

Change-Id: I0c95ebf1ad4684721b32165f363db7d4d15a1b19
2010-08-19 09:59:11 -07:00
Kenny Root
54d4137935 Merge "Add OBB flags to support overlays" into gingerbread 2010-08-19 09:09:32 -07:00
Chia-chi Yeh
58d3bd0810 Visualizer: replace the FFT implementation with a faster one.
This implementation uses fixed points instead of floating points. It
is slightly inaccurate compared to the old one but still perfect for
visualization purpose. It runs 40% faster on passion, 5 times faster
on sholes, and of course 14 times faster on sapphire.

Change-Id: I1e868417bcffda091becf106a7b941d02813faec
2010-08-19 16:05:32 +08:00
Jeff Brown
ae9fc03bdc Add support for throttling motion events.
Change-Id: I24b3a17753e91ecda60a60fe5cd2e6b3260e033d
2010-08-18 16:58:27 -07:00
Wu-cheng Li
24844c9a30 am a2527055: am c8696023: Merge "Document that autoFocus must be called in auto and macro mode." into gingerbread
Merge commit 'a2527055f8e3106fe70feeee10ae0c4ddc6596e9'

* commit 'a2527055f8e3106fe70feeee10ae0c4ddc6596e9':
  Document that autoFocus must be called in auto and macro mode.
2010-08-18 14:22:02 -07:00
Jeff Brown
a9abfa54d3 am 29eb491a: am 3922484d: Merge "Optimize EventHub reads." into gingerbread
Merge commit '29eb491a5addc78003299ecab6ab6c716201f9dc'

* commit '29eb491a5addc78003299ecab6ab6c716201f9dc':
  Optimize EventHub reads.
2010-08-18 14:21:07 -07:00
Jeff Brown
671cc0ec30 am 8fd80e92: am 72ce4235: Merge "Fix possible race conditions during channel unregistration." into gingerbread
Merge commit '8fd80e924a2f40f6a785f834914f8a6f18a3aa9d'

* commit '8fd80e924a2f40f6a785f834914f8a6f18a3aa9d':
  Fix possible race conditions during channel unregistration.
2010-08-18 14:20:24 -07:00
Wu-cheng Li
a2527055f8 am c8696023: Merge "Document that autoFocus must be called in auto and macro mode." into gingerbread
Merge commit 'c86960236d5b2095c87bf46de2400a905acabee2' into gingerbread-plus-aosp

* commit 'c86960236d5b2095c87bf46de2400a905acabee2':
  Document that autoFocus must be called in auto and macro mode.
2010-08-18 13:39:01 -07:00
Jeff Brown
72e0b2ab08 Merge "Fix some input device mapping bugs with certain drivers." into gingerbread 2010-08-18 13:38:32 -07:00
Jeff Brown
2dfd7a7cbf Fix some input device mapping bugs with certain drivers.
On single-touch devices, pointer up/down is signalled by a BTN_TOUCH
key event.  Previously we handled BTN_TOUCH immediately but some drivers
may produce the sequence BTN_TOUCH, ABS_X, ABS_Y, SYN_REPORT on pointer down
which caused us to emit a bad initial pointer down location.
Now we wait for SYN_REPORT before reporting the up or down.

On multi-touch devices, pointer up can be signalled by as little as
the sequence SYN_MT_REPORT, SYN_REPORT.  This change ensures that we
handle this case.

Added support for reading ABS_MT_PRESSURE when available.
Corrected mapping of touchMajor/touchMinor on single touch devices.
Minor code cleanup.

Change-Id: Ic7ec4811241ed85a06e59b8a839ca05180d491d4
2010-08-18 13:37:45 -07:00
Jeff Brown
29eb491a5a am 3922484d: Merge "Optimize EventHub reads." into gingerbread
Merge commit '3922484d7458a4ab72fc1ca8952a0776dd1c7d20' into gingerbread-plus-aosp

* commit '3922484d7458a4ab72fc1ca8952a0776dd1c7d20':
  Optimize EventHub reads.
2010-08-18 13:37:44 -07:00
Jeff Brown
8fd80e924a am 72ce4235: Merge "Fix possible race conditions during channel unregistration." into gingerbread
Merge commit '72ce42352c1c229e05d910b4176f3cddb608e814' into gingerbread-plus-aosp

* commit '72ce42352c1c229e05d910b4176f3cddb608e814':
  Fix possible race conditions during channel unregistration.
2010-08-18 13:36:08 -07:00
Jens Gulin
c4554b9a08 Keep track of remaining fd when devices are removed
Sometimes the wrong fd was accessed when the device was addressed
by device id.

The earlier implementation assumed that two arrays were in sync
but one of them was compacted when devices were removed. Instead
of that dependency the device now keeps track of it's file descriptor.

Change-Id: Ib0f320603aafb07ded354bc3687de9759c9068f2
2010-08-18 10:54:03 -07:00
Wu-cheng Li
c86960236d Merge "Document that autoFocus must be called in auto and macro mode." into gingerbread 2010-08-18 10:19:45 -07:00
Kenny Root
02ca31fbae Add OBB flags to support overlays
* Add flags field in OBB footer to support overlays.

* Remove unused 'crypto' and 'filesystem' fields in obbtool (could
  later be supported in the "flags" field of the OBB footer).

* Add notes to document OBB classes before shipping.

Change-Id: I386b43c32c5edef55210acb5d3322639c08010ba
2010-08-18 09:34:58 -07:00
Jeff Brown
cc2e717f1d Optimize EventHub reads.
Change-Id: Id7d09c0a6e5c741c1e29becd2b6560772c5ff372
2010-08-17 19:40:26 -07:00
Jeff Brown
2cbecea4c9 Fix possible race conditions during channel unregistration.
Previously, the input dispatcher assumed that the input channel's
receive pipe file descriptor was a sufficiently unique identifier for
looking up input channels in its various tables.  However, it can happen
that an input channel is disposed and then a new input channel is
immediately created that reuses the same file descriptor.  Ordinarily
this is not a problem, however there is a small opportunity for a race
to arise in InputQueue.

When InputQueue receives an input event from the dispatcher, it
generates a finishedToken that encodes the channel's receive pipe fd,
and a sequence number.  The finishedToken is used by the ViewRoot
as a handle for the event so that it can tell the InputQueue when
the event has finished being processed.

Here is the race:

1. InputQueue receives an input event, assigns a new finishedToken.
2. ViewRoot begins processing the input event.
3. During processing, ViewRoot unregisters the InputChannel.
4. A new InputChannel is created and is registered with the Input Queue.
   This InputChannel happens to have the same receive pipe fd as
   the one previously registered.
5. ViewRoot tells the InputQueue that it has finished processing the
   input event, passing along the original finishedToken.
6. InputQueue throws an exception because the finishedToken's receive
   pipe fd is registered but the sequence number is incorrect so it
   assumes that the client has called finish spuriously.

The fix is to include a unique connection id within the finishedToken so
that the InputQueue can accurately confirm that the token belongs to
the currently registered InputChannel rather than to an old one that
happened to have the same receive pipe fd.  When it notices this, it
ignores the spurious finish.

I've also made a couple of other small changes to avoid similar races
elsewhere.

This patch set also includes a fix to synthesize a finished signal
when the input channel is unregistered on the client side to
help keep the server and client in sync.

Bug: 2834068
Change-Id: I1de34a36249ab74c359c2c67a57e333543400f7b
2010-08-17 17:03:42 -07:00
Wu-cheng Li
f008f3ea82 Document that autoFocus must be called in auto and macro mode.
Change-Id: Ia52f8bc8a75a7473edff50326a4a0467f4295e6a
2010-08-17 13:44:35 -07:00