summaryrefslogtreecommitdiffstats
path: root/libs
diff options
context:
space:
mode:
authorJames Dong <jdong@google.com>2011-02-17 16:38:06 -0800
committerJames Dong <jdong@google.com>2011-02-22 20:48:15 -0800
commite00cab707dcaf6f05adb5ccb9c80fdf25c483427 (patch)
tree1e69fd3c108e675a5a68b598f31882df58b602fb /libs
parent16dc3073a2f06a77d9873e536f633a4adf575fce (diff)
downloadframeworks_base-e00cab707dcaf6f05adb5ccb9c80fdf25c483427.zip
frameworks_base-e00cab707dcaf6f05adb5ccb9c80fdf25c483427.tar.gz
frameworks_base-e00cab707dcaf6f05adb5ccb9c80fdf25c483427.tar.bz2
Application-managed callback buffer support for raw image
bug - 3292153 Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
Diffstat (limited to 'libs')
-rw-r--r--libs/camera/Camera.cpp6
-rw-r--r--libs/camera/ICamera.cpp8
2 files changed, 8 insertions, 6 deletions
diff --git a/libs/camera/Camera.cpp b/libs/camera/Camera.cpp
index 907f119..e288312 100644
--- a/libs/camera/Camera.cpp
+++ b/libs/camera/Camera.cpp
@@ -301,12 +301,12 @@ status_t Camera::cancelAutoFocus()
}
// take a picture
-status_t Camera::takePicture()
+status_t Camera::takePicture(int msgType)
{
- LOGV("takePicture");
+ LOGV("takePicture: 0x%x", msgType);
sp <ICamera> c = mCamera;
if (c == 0) return NO_INIT;
- return c->takePicture();
+ return c->takePicture(msgType);
}
// set preview/capture parameters - key/value pairs
diff --git a/libs/camera/ICamera.cpp b/libs/camera/ICamera.cpp
index 0881d65..931b57d 100644
--- a/libs/camera/ICamera.cpp
+++ b/libs/camera/ICamera.cpp
@@ -223,11 +223,12 @@ public:
}
// take a picture - returns an IMemory (ref-counted mmap)
- status_t takePicture()
+ status_t takePicture(int msgType)
{
- LOGV("takePicture");
+ LOGV("takePicture: 0x%x", msgType);
Parcel data, reply;
data.writeInterfaceToken(ICamera::getInterfaceDescriptor());
+ data.writeInt32(msgType);
remote()->transact(TAKE_PICTURE, data, &reply);
status_t ret = reply.readInt32();
return ret;
@@ -401,7 +402,8 @@ status_t BnCamera::onTransact(
case TAKE_PICTURE: {
LOGV("TAKE_PICTURE");
CHECK_INTERFACE(ICamera, data, reply);
- reply->writeInt32(takePicture());
+ int msgType = data.readInt32();
+ reply->writeInt32(takePicture(msgType));
return NO_ERROR;
} break;
case SET_PARAMETERS: {