Loading camera/camera2/ICameraDeviceUser.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ enum { CREATE_DEFAULT_REQUEST, GET_CAMERA_INFO, WAIT_UNTIL_IDLE, FLUSH }; namespace { Loading Loading @@ -196,6 +197,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: Loading Loading @@ -325,6 +336,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); } Loading include/camera/camera2/ICameraDeviceUser.h +3 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ public: // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle() = 0; // Flush all pending and in-progress work as quickly as possible. virtual status_t flush() = 0; }; // ---------------------------------------------------------------------------- Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,20 @@ status_t CameraDeviceClient::waitUntilIdle() return res; } status_t CameraDeviceClient::flush() { ATRACE_CALL(); ALOGV("%s", __FUNCTION__); status_t res = OK; if ( (res = checkPid(__FUNCTION__) ) != OK) return res; Mutex::Autolock icl(mBinderSerializationLock); if (!mDevice.get()) return DEAD_OBJECT; return mDevice->flush(); } status_t CameraDeviceClient::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("CameraDeviceClient[%d] (%p) PID: %d, dump:\n", Loading services/camera/libcameraservice/api2/CameraDeviceClient.h +4 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,10 @@ public: // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle(); // Flush all active and pending requests as fast as possible virtual status_t flush(); /** * Interface used by CameraService */ Loading services/camera/libcameraservice/common/CameraDeviceBase.h +7 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,13 @@ class CameraDeviceBase : public virtual RefBase { */ virtual status_t pushReprocessBuffer(int reprocessStreamId, buffer_handle_t *buffer, wp<BufferReleasedListener> listener) = 0; /** * Flush all pending and in-flight requests. Blocks until flush is * complete. */ virtual status_t flush() = 0; }; }; // namespace android Loading Loading
camera/camera2/ICameraDeviceUser.cpp +17 −0 Original line number Diff line number Diff line Loading @@ -41,6 +41,7 @@ enum { CREATE_DEFAULT_REQUEST, GET_CAMERA_INFO, WAIT_UNTIL_IDLE, FLUSH }; namespace { Loading Loading @@ -196,6 +197,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: Loading Loading @@ -325,6 +336,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); } Loading
include/camera/camera2/ICameraDeviceUser.h +3 −0 Original line number Diff line number Diff line Loading @@ -63,6 +63,9 @@ public: // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle() = 0; // Flush all pending and in-progress work as quickly as possible. virtual status_t flush() = 0; }; // ---------------------------------------------------------------------------- Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +14 −0 Original line number Diff line number Diff line Loading @@ -436,6 +436,20 @@ status_t CameraDeviceClient::waitUntilIdle() return res; } status_t CameraDeviceClient::flush() { ATRACE_CALL(); ALOGV("%s", __FUNCTION__); status_t res = OK; if ( (res = checkPid(__FUNCTION__) ) != OK) return res; Mutex::Autolock icl(mBinderSerializationLock); if (!mDevice.get()) return DEAD_OBJECT; return mDevice->flush(); } status_t CameraDeviceClient::dump(int fd, const Vector<String16>& args) { String8 result; result.appendFormat("CameraDeviceClient[%d] (%p) PID: %d, dump:\n", Loading
services/camera/libcameraservice/api2/CameraDeviceClient.h +4 −0 Original line number Diff line number Diff line Loading @@ -89,6 +89,10 @@ public: // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle(); // Flush all active and pending requests as fast as possible virtual status_t flush(); /** * Interface used by CameraService */ Loading
services/camera/libcameraservice/common/CameraDeviceBase.h +7 −0 Original line number Diff line number Diff line Loading @@ -209,6 +209,13 @@ class CameraDeviceBase : public virtual RefBase { */ virtual status_t pushReprocessBuffer(int reprocessStreamId, buffer_handle_t *buffer, wp<BufferReleasedListener> listener) = 0; /** * Flush all pending and in-flight requests. Blocks until flush is * complete. */ virtual status_t flush() = 0; }; }; // namespace android Loading