summaryrefslogtreecommitdiffstats
path: root/camera
diff options
context:
space:
mode:
authorRuben Brunk <rubenbrunk@google.com>2015-08-13 17:58:46 -0700
committerRuben Brunk <rubenbrunk@google.com>2015-08-14 17:30:24 -0700
commitc78ac26e3a65328fc0118f16ee76a800d0687eb7 (patch)
tree9009e37c981c7cbfdd106c44de2622edf1672a49 /camera
parenta09f8cf8c76fa946c4b91be059b420941abcdc3b (diff)
downloadframeworks_av-c78ac26e3a65328fc0118f16ee76a800d0687eb7.zip
frameworks_av-c78ac26e3a65328fc0118f16ee76a800d0687eb7.tar.gz
frameworks_av-c78ac26e3a65328fc0118f16ee76a800d0687eb7.tar.bz2
Add experimental camera session prepare API.
Bug: 18949148 Change-Id: I8f73e68ea2e3acc60d98954106f364d13f439a82
Diffstat (limited to 'camera')
-rw-r--r--camera/camera2/ICameraDeviceUser.cpp27
1 files changed, 25 insertions, 2 deletions
diff --git a/camera/camera2/ICameraDeviceUser.cpp b/camera/camera2/ICameraDeviceUser.cpp
index d2dc200..2a9fd2b 100644
--- a/camera/camera2/ICameraDeviceUser.cpp
+++ b/camera/camera2/ICameraDeviceUser.cpp
@@ -49,7 +49,8 @@ enum {
WAIT_UNTIL_IDLE,
FLUSH,
PREPARE,
- TEAR_DOWN
+ TEAR_DOWN,
+ PREPARE2
};
namespace {
@@ -366,6 +367,21 @@ public:
return reply.readInt32();
}
+ virtual status_t prepare2(int maxCount, int streamId)
+ {
+ ALOGV("prepare2");
+ Parcel data, reply;
+
+ data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor());
+ data.writeInt32(maxCount);
+ data.writeInt32(streamId);
+
+ remote()->transact(PREPARE2, data, &reply);
+
+ reply.readExceptionCode();
+ return reply.readInt32();
+ }
+
virtual status_t tearDown(int streamId)
{
ALOGV("tearDown");
@@ -592,7 +608,14 @@ status_t BnCameraDeviceUser::onTransact(
reply->writeInt32(tearDown(streamId));
return NO_ERROR;
} break;
-
+ case PREPARE2: {
+ CHECK_INTERFACE(ICameraDeviceUser, data, reply);
+ int maxCount = data.readInt32();
+ int streamId = data.readInt32();
+ reply->writeNoException();
+ reply->writeInt32(prepare2(maxCount, streamId));
+ return NO_ERROR;
+ } break;
default:
return BBinder::onTransact(code, data, reply, flags);
}