60 Commits

Author SHA1 Message Date
Eino-Ville Talvala
037abb8bb0 Add video stabilization control to Camera parameters.
Hardware video stabilization reduces camera shake in preview
and in recorded videos. It has no effect on still image capture.

Convenience accessor methods hidden for now.

Change-Id: Ie18450bff662b2ef98b85d19719beefc180975fc
2011-10-12 10:34:10 -07:00
Wu-cheng Li
98bb251c8b Add video snapshot camera parameter.
The API is still hidden.

bug:5187868

Change-Id: I59e1b5774ca32be049723d1a0887faa90d8884bb
2011-09-01 13:37:14 +08:00
Wu-cheng Li
b9ac75d3df Add new camera focus mode FOCUS_MODE_CONTINUOUS_PICTURE.
The API is still hidden.

bug:5086125
Change-Id: I69268a95ad6aae249771d3a8dfb423ffe2d87081
2011-08-18 00:15:40 +08:00
Wu-cheng Li
70fb908504 Add camera bayer image format.
The API are hidden.

bug:5086073

Change-Id: Ic9a53e5d5007ad3f12a28406ee25098227f14cbc
2011-08-04 16:40:28 +08:00
Wu-cheng Li
bb1e275c0e Pass camera frame metadata from camera service to Java.
bug:4460717
Change-Id: I2fae6e1dfca6b8f3a5ee5716fc7817f5417bf657
2011-08-02 15:48:41 +08:00
Wu-cheng Li
25d8fb51da Add camera recording hint parameter.
The API is still hidden.

bug:4266229
Change-Id: I5e4c24e9e2808582aecb55ac4f1d5be3ed7e36a2
2011-08-02 14:27:58 +08:00
Wu-cheng Li
4c2292efbb Add camera face detection API.
API are still hidden.

bug:4460717
Change-Id: I1a515061f141a89bd61c875257712789fb15d2d4
2011-07-27 05:25:35 +08:00
Jeff Brown
bd882b1c87 Remove the simulator target from all makefiles.
Bug: 5010576

Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
2011-07-11 22:12:16 -07:00
Wu-cheng Li
42419ce28a Add framework support for camcorder zoom.
The purpose of ICameraRecordingProxy and ICameraRecordingProxyListener is to
allow applications using the camera during recording.

Camera service allows only one client at a time. Since camcorder application
needs to own the camera to do things like zoom, the media recorder cannot
access the camera directly during recording. So ICameraRecordingProxy is a proxy
of ICamera, which allows the media recorder to start/stop the recording and
release recording frames. ICameraRecordingProxyListener is an interface that
allows the recorder to receive video frames during recording.

ICameraRecordingProxy
  startRecording()
  stopRecording()
  releaseRecordingFrame()

ICameraRecordingProxyListener
  dataCallbackTimestamp()

The camcorder app opens the camera and starts the preview. The app passes
ICamera and ICameraRecordingProxy to the media recorder by
MediaRecorder::setCamera(). The recorder uses ICamera to setup the camera in
MediaRecorder::start(). After setup, the recorder disconnects from camera
service. The recorder calls ICameraRecordingProxy::startRecording() and
passes a ICameraRecordingProxyListener to the app. The app connects back to
camera service and starts the recording. The app owns the camera and can do
things like zoom. The media recorder receives the video frames from the
listener and releases them by ICameraRecordingProxy::releaseRecordingFrame.
The recorder calls ICameraRecordingProxy::stopRecording() to stop the
recording.

The call sequences are as follows:
1. The app: Camera.unlock().
2. The app: MediaRecorder.setCamera().
3. Start recording
   (1) The app: MediaRecorder.start().
   (2) The recorder: ICamera.unlock() and ICamera.disconnect().
   (3) The recorder: ICameraRecordingProxy.startRecording().
   (4) The app: ICamera.reconnect().
   (5) The app: ICamera.startRecording().
4. During recording
   (1) The recorder: receive frames from ICameraRecordingProxyListener.dataCallbackTimestamp()
   (2) The recorder: release frames by ICameraRecordingProxy.releaseRecordingFrame().
5. Stop recording
   (1) The app: MediaRecorder.stop()
   (2) The recorder: ICameraRecordingProxy.stopRecording().
   (3) The app: ICamera.stopRecording().

bug:2644213

Change-Id: I15269397defc25cbbcae16abc071c8349c123122
2011-06-27 15:44:57 +08:00
Iliyan Malchev
219451363d CameraParameters: add PIXEL_FORMAT_RGBA8888
Change-Id: I2780e936f5b4628d506ac4e6947b78ef831fbde8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-06-06 18:04:17 -07:00
Eino-Ville Talvala
d9c2601afa Add auto-white balance locking to the Camera API.
Adds a new camera parameter for locking auto-white balance to its
current value. Also adds a function for checking if auto-white balance
lock is supported by the current platform. Lock semantics match that
of the auto-exposure lock.

Hidden for now.

Change-Id: Id59339a4be84d55c1b0b8473d765b6aa765999b2
2011-05-17 10:52:42 -07:00
Eino-Ville Talvala
3773eef4e3 Add an auto-exposure lock feature to the Camera API.
Adds a new camera parameter for locking auto-exposure to its current
value. Also adds a function for checking if auto-exposure lock is
supported by the current platform.

Hidden for now.

Change-Id: Id452371191ab220318ce2cb98b8ee91bdde9aab6
2011-05-02 09:36:06 -07:00
Wu-cheng Li
e98e4c8063 Add camera metering area API.
The API are still hidden.

bug:3475893
Change-Id: Id4147528def5e0fe067e1a3ed315fa34c14a0640
2011-04-13 16:06:47 +08:00
Wu-cheng Li
30771b7733 Add camera focus area API.
The API are still hidden.

bug:3475893

Change-Id: I92405c9e332b7fb141788cda7ebc9705dd666c67
2011-04-08 17:45:15 +08:00
Iliyan Malchev
40c364136f frameworks/base: some camera-interface cleanup
Methods getNumberOfVideoBuffers() and getVideoBuffer() as well as struct
image_rect_struct are no longer used (instead, the necessary information is
passed through ANativeWindow.)

Change-Id: If4b11446fc9ccbde1f6b45bc70c0d0b8e54376eb
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-03-28 16:28:57 -07:00
Mathias Agopian
696257ccf3 merge libsurfaceflinger_client into libgui
this is the first step in unifying surfacetexture and surface.
for this reason the header files were not moved, as most of them
will eventually go away.

NOTE: currently we keep libsurfaceflinger_client.so as an empty
library to workaround prebuilt binaries wrongly linking against
it.

Change-Id: I130f0de2428e8579033dc41394d093f4e1431a00
2011-03-25 18:42:40 -07:00
Wu-cheng Li
e857cc8175 Merge "Add YV12 preview format to camera parameter constants." 2011-02-24 02:51:17 -08:00
Wu-cheng Li
10a1b30dfb Add YV12 preview format to camera parameter constants.
bug:3463624
Change-Id: I8f2992dadfd3fb9e3c9d67743e52da7f3212827e
2011-02-24 18:19:48 +08:00
James Dong
e00cab707d Application-managed callback buffer support for raw image
bug - 3292153

Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
2011-02-22 20:48:15 -08:00
Jamie Gennis
ff2dc46c12 Add camera service support for SurfaceTexture.
This change enables the use of a SurfaceTexture in place of a Surface as
the destination of camera preview frames.

Change-Id: Ic70d404c8fe261e9d5da6f1de93d6babb5b191cb
2011-01-06 13:31:53 -08:00
Wu-cheng Li
0e73cdc983 Camera::create should fail when it fails to connect the camera.
bug:3197565

Change-Id: I3439a25c06b00615e8257e6b3db85df081643643
2011-01-05 13:14:30 +08:00
James Dong
4ddca9bacc Add preferred preview size support in the camera framework
bug - 3237021

Change-Id: Ica8a3ae5cfbee462b74de98770e33277186c9a2b
2010-11-30 22:28:27 -08:00
James Dong
df7a856d3d Fixed a race condition where some recording frames may not be released.
When startRecording() is called before setListener(), recording frames
are sent right after startRecording(), but there is no listener to
release the recording frames. This causes the hang in media server.

bug - 3166356

Change-Id: I19366ca682ef9f6b847590c190c30a15ed32b8e4
2010-11-15 13:14:59 -08:00
James Dong
38311859e8 Camera framework change required for 0-memcpy recording
bug - 3042125

Change-Id: I46eb7a10b5394086b353fd73e4503beceeed76f1
2010-10-19 23:07:08 -07:00
James Dong
4fd446f7b7 Video size retrieval/configuration support in camera hal
This is the first part of the camera hal change required for
0-memcpy of input video frames for video recording.

o removed check in setVideoSize()/getVideoSize() for impl consistency

Change-Id: I01274a62b9f9eaf32154d98f8d0bfedacf645698
2010-10-03 21:24:49 -07:00
Wu-cheng Li
d276720edb am 2ad1ebca: am d45cb72a: Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
Merge commit '2ad1ebcaabb632c8fe714f0c3fd88bdfa14697bd'

* commit '2ad1ebcaabb632c8fe714f0c3fd88bdfa14697bd':
  Rename FOCUS_MODE_CONTINUOUS to FOCUS_MODE_CONTINUOUS_VIDEO.
2010-09-21 10:44:38 -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
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
Wu-cheng Li
b8f7f42f70 am 6e46e6f7: am 7ec7b997: Remove camera metering mode API.
Merge commit '6e46e6f7488ad1f4e6ab762d141790798fe3f2d5'

* commit '6e46e6f7488ad1f4e6ab762d141790798fe3f2d5':
  Remove camera metering mode API.
2010-08-30 14:06:16 -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
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
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
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
Nipun Kwatra
b70c1db70f Adding parseSizesList, getSupportedPreviewSizes to CameraParameters.
Moved functionality to parse string of sizes from getSupportedPictureSizes
to parseSizesList.
Added getSupportedPreviewSizes which returns a list of supported preview sizes.

Change-Id: I435317427c1ee9623caef435f93e95d4476b7285
2010-08-04 14:04:07 -07:00
Nipun Kwatra
51c2ec2411 Adding getSupportedPictureSizes which returns a Vector of supported Sizes.
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: I51a56bbf2cb7c91d7b80a28e6bd6a559f40a1333
2010-07-30 17:51:59 -07:00
Jean-Baptiste Queru
154a320069 resolved conflicts for merge of 27eecb70 to gingerbread
Change-Id: If064f2f4950fc1a4ff38e6927fe2120af76b26f1
2010-07-30 12:08:31 -07:00
Jean-Baptiste Queru
0c51c98fd9 am 4506c62a: fix inaccurate copyrights
Merge commit '4506c62abd5767d6d42a97e8e87793a1b3bcb625' into gingerbread-plus-aosp

* commit '4506c62abd5767d6d42a97e8e87793a1b3bcb625':
  fix inaccurate copyrights
2010-07-29 17:52:09 -07:00
Jean-Baptiste Queru
83407b993f fix inaccurate copyrights
Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
2010-07-29 17:41:35 -07:00
Jean-Baptiste Queru
4506c62abd fix inaccurate copyrights
Change-Id: I33b0f68f2da34ca4728211d83159cf32a127f6dd
2010-07-29 17:35:37 -07:00
Chih-Chung Chang
b8bb78f54b Change camera interface to support multiple cameras.
Change-Id: Ie88fe706d2278acf762eca87780de349434778a4
2010-06-11 16:47:33 +08:00
Wu-cheng Li
8aba232dbc Add KEY_SUPPORTED_METERING_MODES and fix some typos.
bug:2737111
Change-Id: I108ae7057786921bf99385ad66dbc1f02d6a1448
2010-06-04 17:18:17 +08:00
Wu-cheng Li
f7f6333831 Add camera metering mode API.
bug:2737111
Change-Id: Ie986fee56ebeaaed2d2efb757701dfe3ffdec8d8
2010-06-03 16:34:18 +08:00
Wu-cheng Li
d2c2929c94 Add video frame parameter.
The image format of preview frames and video frames may be different.
We need another parameter for video frame format.

bug:2720893
Change-Id: I966a31b0ce8cab25cdde65db65a18c8cbe9c7bd6
2010-05-28 17:32:41 +08:00
Wu-cheng Li
ae7ca4c32c Fix build error.
Original name INFINITY conflicts with the macro in math.h.

Change-Id: I9845ed84fca17813dd971239a902cc1e0bad1e3e
2010-05-15 13:06:19 +08:00
Wu-cheng Li
e339c5edbe Add camera focus distances API.
Applications can use this API to estimate the distance
between the subject and the camera.

bug:1955650
Change-Id: Ie6c8ea4971759cab6c9bcdda2c5ceb5925791c27
2010-05-15 12:40:54 +08:00
Chih-Chung Chang
553447b8ff Fix deadlock if the last reference of ICameraClient is removed in
ICamera::connect()

Change-Id: I34ab3e4f07435c62168175e9bb159022c8fb99f4
2010-05-14 11:34:20 +08:00
Wu-cheng Li
b339013589 am d8c33747: am 78624e41: Add remove method in CameraParameters class.
Merge commit 'd8c33747afbe98e893e0569f3bf45b67a9e8e728' into kraken

* commit 'd8c33747afbe98e893e0569f3bf45b67a9e8e728':
  Add remove method in CameraParameters class.
2010-05-12 07:55:00 -07:00
Wu-cheng Li
78624e41da Add remove method in CameraParameters class.
bug:2672651
Change-Id: I537c817b5ca6a3d925f22febe9a5769156354d00
2010-05-11 12:54:14 +08:00