diff options
author | Eino-Ville Talvala <etalvala@google.com> | 2013-08-14 11:37:00 -0700 |
---|---|---|
committer | Eino-Ville Talvala <etalvala@google.com> | 2013-08-23 14:08:27 -0700 |
commit | abaa51d3ca31f0eda99e1d271e6dc64c877dbf58 (patch) | |
tree | 52f4cc1078708f7c0099fded06dcb01daf6ca6bb /camera/camera2 | |
parent | 62c1a46eec047eb5fbc4b90432ec1ce65b76fb75 (diff) | |
download | frameworks_av-abaa51d3ca31f0eda99e1d271e6dc64c877dbf58.zip frameworks_av-abaa51d3ca31f0eda99e1d271e6dc64c877dbf58.tar.gz frameworks_av-abaa51d3ca31f0eda99e1d271e6dc64c877dbf58.tar.bz2 |
Camera2: Add flush support
- On HAL2 devices, fall back to wait until idle
- On HAL3 devices, call HAL flush method
Bug: 9758581
Change-Id: Ie1c570a15f6590a1ee6c271e3b989c48079b468a
Diffstat (limited to 'camera/camera2')
-rw-r--r-- | camera/camera2/ICameraDeviceUser.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/camera/camera2/ICameraDeviceUser.cpp b/camera/camera2/ICameraDeviceUser.cpp index 923f487..ae4cf69 100644 --- a/camera/camera2/ICameraDeviceUser.cpp +++ b/camera/camera2/ICameraDeviceUser.cpp @@ -41,6 +41,7 @@ enum { CREATE_DEFAULT_REQUEST, GET_CAMERA_INFO, WAIT_UNTIL_IDLE, + FLUSH }; class BpCameraDeviceUser : public BpInterface<ICameraDeviceUser> @@ -183,6 +184,16 @@ public: return reply.readInt32(); } + virtual status_t flush() + { + ALOGV("flush"); + Parcel data, reply; + data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor()); + remote()->transact(FLUSH, data, &reply); + reply.readExceptionCode(); + return reply.readInt32(); + } + private: @@ -312,6 +323,12 @@ status_t BnCameraDeviceUser::onTransact( reply->writeInt32(waitUntilIdle()); return NO_ERROR; } break; + case FLUSH: { + CHECK_INTERFACE(ICameraDeviceUser, data, reply); + reply->writeNoException(); + reply->writeInt32(flush()); + return NO_ERROR; + } default: return BBinder::onTransact(code, data, reply, flags); } |