75 Commits

Author SHA1 Message Date
Mathias Agopian
8335f1cccc fix libgui header location
Change-Id: Iec71706cdd4f29c6904993648ce873e83ef9cafe
2012-02-27 13:03:08 -08:00
Wu-cheng Li
0f4f97b70f Update camera continuous autofocus javadoc.
Suppose applications call autoFocus in CAF picture mode. If
CAF is in the middle of scanning, the picture is very likely to
be blurry. Change focus callback to return when the scanning
finishes.

bug:5514415
Change-Id: Ibcb8f92a5263d7dbd7cce54df3617fb21c6255d4
2011-10-28 00:38:02 +08:00
Wu-cheng Li
53b30912d3 Improve camera javadoc and fix some errors.
bug:5169599
Change-Id: Ic2205770753ff462135f884fee0a888ca8ec832d
2011-10-13 12:04:05 +08:00
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
b4f95be03e Update camera javadoc about AE and AWB lock.
- Autofocus does not lock AE and AWB.
- stopPreview and takePicture do not clear AE and AWB locks.

bug:5356404

Change-Id: I55d9b35f4ff746ecd2bff112c2674f1aa2543aca
2011-09-22 18:19:02 +08: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
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
Wu-cheng Li
a4a48a484f Merge "Improve android.hardware.Camera.Area javadoc." 2011-06-07 04:05:35 -07:00
Wu-cheng Li
bde61a5731 Improve android.hardware.Camera.Area javadoc.
bug:4553469
Change-Id: Iae88af354fee4925cb7978572c27f6dd5595ca59
2011-06-07 19:00:03 +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
Iliyan Malchev
a269b87bd7 frameworks/base: switch CameraService to a HAL module
This patch changes CameraService to load a camera HAL module, instead of
linking directly against a library that implements the CameraHardwareInterface
class.

CameraHardwareInterface no longer defines the API to the camera HAL.  Instead,
this is now in HAL header hardware/camera.h.  We keep CamerHardwareInterface as
a class local to CameraService, which wraps around the new HAL calls.  In the
future, we may remove this class entirely and have CameraService call the HAL
methods directly.

Change-Id: I5c61ac40078fc0b50bbac5881a556fe6c8837641
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 15:49:40 -07:00
Iliyan Malchev
9c7ac0d142 frameworks/base: include system/core header camera.h in Camera.h
We define struct CameraInfo in this camera/Camera.h, even though an identical
struct camera_info is defined in hardware/camera.h (but not in
hardware/camera_defs.h).  We may not export struct definitions from the HAL
into headers which may find their way into the NDK.

This commit also renames FRAME_CALLBACK_FLAG_xxx to CAMERA_FRAME_CALLBACK_xxx.

Change-Id: I3e2ddd01d61bf5371ff2fc1a397995e0f1ee11f8
Signed-off-by: Iliyan Malchev <malchev@google.com>
2011-05-03 15:49:39 -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
Eino-Ville Talvala
4e396e063c Clarify the meaning of weight in the focus and metering area HAL.
Weigh values must be less than 1000, but have no restriction on their
sum. Weights should be interpreted as per-pixel values, meaning larger
areas will have more influence over focus/metering than smaller areas
of the same weight.

Change-Id: I988b74f988ddba2ff0c49d078ff3174b47cbae18
2011-04-25 09:33:48 -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
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
James Dong
853f6fdef7 Fixed a typo in the enum for unknown camera error message
Change-Id: Id9f8432e2ba8e1474ee020438d6456f1f450398a
2011-01-04 18:46:34 -08:00
James Dong
74920cb1a8 We requires camera hal's implementation should not track the ref count of any outstanding video frames and ignore
releaseRecordingFrame() call after it receives disableMsgType(CAMERA_MSG_VIDEO_FRAME).

Change-Id: I2ecb9b3b11dab6bf868ccf8effda1b8df5bcde3c
2010-12-10 07:19:13 -08:00
Mathias Agopian
d211230633 remove support for PUSH_BUFFER surfaces and overlays
the same functionality is now supported through
the h/w composer HAL, and YUV support in the GPU.

Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
2010-12-08 16:13:59 -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
Wu-cheng Li
4e911849ca am fb6f4505: am 589e8381: Merge "Improve camera documentation." into gingerbread
* commit 'fb6f4505ba5c227cebb73f1269b0af5d92e6e5e6':
  Improve camera documentation.
2010-11-19 19:20:59 -08:00
Wu-cheng Li
99a3f3e4e0 Improve camera documentation.
bug:3212606
Change-Id: Iee7106e4665c08a4c75471114010b75d63ac74ce
2010-11-19 16:20:04 +08:00
Wu-cheng Li
d55f7e56b9 Mirror the camera preview if the camera is front-facing.
bug:3095272
Change-Id: Ib1c1d1edc06a33e9d4d2dcb42bc1dd2c25b1310c
2010-10-25 15:02:44 +08:00
Wu-cheng Li
b982fb4fd3 Mirror the preview for front-facing cameras. do not merge
Now overlay does ROT_90 before FLIP_V or FLIP_H. It should be FLIP_V
or FLIP_H first. The formula should be changed after overlay is fixed.

bug:3059865
Change-Id: Ie4366bf7f1fcac7383e8dfc74b1b865997bbbcc6
2010-10-20 18:29:18 +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
b0a6db20bb Camera hal change for 0-memcpy in media recording framework
o document the camera hal to clarify the reviewer's questions.

bug - 3042125

Change-Id: I3edf701d084933ee8d1e3b054d222e8c9dfc42a5
2010-10-19 11:21:03 -07:00
James Dong
769bb2aaa4 0-memcpy video recording framework
Part II: proposed camera hal change

Change-Id: I51663cf5de2b00f71e4ff1828080094676065444
2010-10-07 02:09:03 -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
Jamie Gennis
ba2bbcdcbc Fix the CameraHardwareInterface::setPreviewWindow comment.
Change-Id: Ied7eb7872e581e23d9f6f02a551320cdd675e51e
2010-09-25 17:58:15 -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
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
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
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
97a56269d0 Merge "Add camera fps range API." into gingerbread 2010-08-20 11:19:51 -07:00