diff options
| author | Chih-Chung Chang <chihchung@google.com> | 2010-06-10 13:32:16 +0800 |
|---|---|---|
| committer | Chih-Chung Chang <chihchung@google.com> | 2010-06-11 16:47:33 +0800 |
| commit | b8bb78f54b48868465a9d69d65fda08524ab5ae1 (patch) | |
| tree | fadbdd8dd989ce2b3b29cd780fabc91d7f98dd09 /include/camera/Camera.h | |
| parent | 2fd73a452268d2acb6e72a1d23a422085ed3c510 (diff) | |
| download | frameworks_base-b8bb78f54b48868465a9d69d65fda08524ab5ae1.zip frameworks_base-b8bb78f54b48868465a9d69d65fda08524ab5ae1.tar.gz frameworks_base-b8bb78f54b48868465a9d69d65fda08524ab5ae1.tar.bz2 | |
Change camera interface to support multiple cameras.
Change-Id: Ie88fe706d2278acf762eca87780de349434778a4
Diffstat (limited to 'include/camera/Camera.h')
| -rw-r--r-- | include/camera/Camera.h | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h index 1beac27..9974f2f 100644 --- a/include/camera/Camera.h +++ b/include/camera/Camera.h @@ -93,6 +93,32 @@ enum { CAMERA_ERROR_SERVER_DIED = 100 }; +enum { + CAMERA_FACING_BACK = 0, + CAMERA_FACING_FRONT = 1 /* The camera faces to the user */ +}; + +struct CameraInfo { + + /** + * The direction that the camera faces to. It should be + * CAMERA_FACING_BACK or CAMERA_FACING_FRONT. + */ + int facing; + + /** + * The orientation of the camera image. The value is the angle that the + * camera image needs to be rotated clockwise so it shows correctly on + * the display in its natural orientation. It should be 0, 90, 180, or 270. + * + * For example, suppose a device has a naturally tall screen, but the camera + * sensor is mounted in landscape. If the top side of the camera sensor is + * aligned with the right edge of the display in natural orientation, the + * value should be 90. + */ + int orientation; +}; + class ICameraService; class ICamera; class Surface; @@ -114,6 +140,8 @@ public: // construct a camera client from an existing remote static sp<Camera> create(const sp<ICamera>& camera); static int32_t getNumberOfCameras(); + static status_t getCameraInfo(int cameraId, + struct CameraInfo* cameraInfo); static sp<Camera> connect(int cameraId); ~Camera(); void init(); |
