summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorEmilio López <turl@tuxfamily.org>2011-08-02 22:38:30 +0000
committerSteve Kondik <shade@chemlab.org>2011-09-16 23:41:02 -0700
commit28e0dfc97428e4ad3ae0cc20a777e19aecb7c4ef (patch)
tree71b2a99d0ad541bc96daba5bd0408c78df4ebdd9 /include
parenteb0e3d32e9bb8b6ace525be1cf04c18183157d5e (diff)
downloadframeworks_base-28e0dfc97428e4ad3ae0cc20a777e19aecb7c4ef.zip
frameworks_base-28e0dfc97428e4ad3ae0cc20a777e19aecb7c4ef.tar.gz
frameworks_base-28e0dfc97428e4ad3ae0cc20a777e19aecb7c4ef.tar.bz2
Support Motorola Custom libcamera Parameters
This commit adds support for get/setCustomParameters, two functions used on Motorola Tegra 2 libcameras to pass special values like usenvbuffer, video size, etc. It also adds some required keys and functions to CameraParameters. Change-Id: I30bfc02862972a9437e925322ab0e7ea89d4a767
Diffstat (limited to 'include')
-rw-r--r--include/camera/Camera.h10
-rw-r--r--include/camera/CameraParameters.h22
-rw-r--r--include/camera/ICamera.h8
3 files changed, 40 insertions, 0 deletions
diff --git a/include/camera/Camera.h b/include/camera/Camera.h
index 52b992f..2660138 100644
--- a/include/camera/Camera.h
+++ b/include/camera/Camera.h
@@ -210,9 +210,19 @@ public:
// set preview/capture parameters - key/value pairs
status_t setParameters(const String8& params);
+ #ifdef MOTO_CUSTOM_PARAMETERS
+ // set preview/capture parameters - key/value pairs
+ status_t setCustomParameters(const String8& params);
+ #endif
+
// get preview/capture parameters - key/value pairs
String8 getParameters() const;
+ #ifdef MOTO_CUSTOM_PARAMETERS
+ // get preview/capture parameters - key/value pairs
+ String8 getCustomParameters() const;
+ #endif
+
// send command to camera driver
status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2);
diff --git a/include/camera/CameraParameters.h b/include/camera/CameraParameters.h
index 040d4de..a0c495a 100644
--- a/include/camera/CameraParameters.h
+++ b/include/camera/CameraParameters.h
@@ -59,6 +59,21 @@ public:
void setPreviewSize(int width, int height);
void getPreviewSize(int *width, int *height) const;
void getSupportedPreviewSizes(Vector<Size> &sizes) const;
+
+ // Set the dimensions in pixels to the given width and height
+ // for video frames. The given width and height must be one
+ // of the supported dimensions returned from
+ // getSupportedVideoSizes(). Must not be called if
+ // getSupportedVideoSizes() returns an empty Vector of Size.
+ void setVideoSize(int width, int height);
+
+ // Retrieve the current dimensions (width and height)
+ // in pixels for video frames, which must be one of the
+ // supported dimensions returned from getSupportedVideoSizes().
+ // Must not be called if getSupportedVideoSizes() returns an
+ // empty Vector of Size.
+ void getVideoSize(int *width, int *height) const;
+
void setPreviewFrameRate(int fps);
int getPreviewFrameRate() const;
void getPreviewFpsRange(int *min_fps, int *max_fps) const;
@@ -333,6 +348,12 @@ public:
// Example value: "0.95,1.9,Infinity" or "0.049,0.05,0.051". Read only.
static const char KEY_FOCUS_DISTANCES[];
+ // The current dimensions in pixels (width x height) for video frames.
+ // The width and height must be one of the supported sizes retrieved
+ // via KEY_SUPPORTED_VIDEO_SIZES.
+ // Example value: "1280x720". Read/write.
+ static const char KEY_VIDEO_SIZE[];
+
// The image format for video frames. See CAMERA_MSG_VIDEO_FRAME in
// frameworks/base/include/camera/Camera.h.
// Example value: "yuv420sp" or PIXEL_FORMAT_XXX constants. Read only.
@@ -419,6 +440,7 @@ public:
// Formats for setPreviewFormat and setPictureFormat.
static const char PIXEL_FORMAT_YUV422SP[];
static const char PIXEL_FORMAT_YUV420SP[]; // NV21
+ static const char PIXEL_FORMAT_YUV420P[];
static const char PIXEL_FORMAT_YUV422I[]; // YUY2
static const char PIXEL_FORMAT_RGB565[];
static const char PIXEL_FORMAT_JPEG[];
diff --git a/include/camera/ICamera.h b/include/camera/ICamera.h
index efa4282..f4c0282 100644
--- a/include/camera/ICamera.h
+++ b/include/camera/ICamera.h
@@ -94,6 +94,14 @@ public:
// get preview/capture parameters - key/value pairs
virtual String8 getParameters() const = 0;
+ #ifdef MOTO_CUSTOM_PARAMETERS
+ // set preview/capture custom parameters - key/value pairs
+ virtual status_t setCustomParameters(const String8& params) = 0;
+
+ // get preview/capture custom parameters - key/value pairs
+ virtual String8 getCustomParameters() const = 0;
+ #endif
+
// send command to camera driver
virtual status_t sendCommand(int32_t cmd, int32_t arg1, int32_t arg2) = 0;