summaryrefslogtreecommitdiffstats
path: root/camera
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
commite468ac57f6e8afc6078c76d4eb1ac327112a3de0 (patch)
treeb6f657aa11261327f5f4743dd54f796e73ec328b /camera
parent8e0e1979f0f41487b0f18aa5b9c8c52a39ca27f4 (diff)
downloadframeworks_av-e468ac57f6e8afc6078c76d4eb1ac327112a3de0.zip
frameworks_av-e468ac57f6e8afc6078c76d4eb1ac327112a3de0.tar.gz
frameworks_av-e468ac57f6e8afc6078c76d4eb1ac327112a3de0.tar.bz2
Application-managed callback buffer support for raw image
bug - 3292153 Change-Id: I9789f7c5cde3a3889d7375e881181e9152d95fc2
Diffstat (limited to 'camera')
-rw-r--r--camera/Camera.cpp6
-rw-r--r--camera/ICamera.cpp8
2 files changed, 8 insertions, 6 deletions
diff --git a/camera/Camera.cpp b/camera/Camera.cpp
index 907f119..e288312 100644
--- a/camera/Camera.cpp
+++ b/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/camera/ICamera.cpp b/camera/ICamera.cpp
index 0881d65..931b57d 100644
--- a/camera/ICamera.cpp
+++ b/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: {