Loading camera/photography/ICameraDeviceUser.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ enum { CREATE_STREAM, CREATE_DEFAULT_REQUEST, GET_CAMERA_INFO, WAIT_UNTIL_IDLE, }; class BpCameraDeviceUser : public BpInterface<ICameraDeviceUser> Loading Loading @@ -172,6 +173,15 @@ public: return result; } virtual status_t waitUntilIdle() { ALOGV("waitUntilIdle"); Parcel data, reply; data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor()); remote()->transact(WAIT_UNTIL_IDLE, data, &reply); reply.readExceptionCode(); return reply.readInt32(); } private: Loading Loading @@ -296,6 +306,12 @@ status_t BnCameraDeviceUser::onTransact( return NO_ERROR; } break; case WAIT_UNTIL_IDLE: { CHECK_INTERFACE(ICameraDeviceUser, data, reply); reply->writeNoException(); reply->writeInt32(waitUntilIdle()); return NO_ERROR; } break; default: return BBinder::onTransact(code, data, reply, flags); } Loading include/camera/photography/ICameraDeviceUser.h +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ public: virtual status_t getCameraInfo(/*out*/ CameraMetadata* info) = 0; // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle() = 0; }; // ---------------------------------------------------------------------------- Loading services/camera/libcameraservice/camera3/Camera3OutputStream.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -304,7 +304,7 @@ status_t Camera3OutputStream::configureQueueLocked() { ALOGV("%s: Consumer wants %d buffers, HAL wants %d", __FUNCTION__, maxConsumerBuffers, camera3_stream::max_buffers); if (camera3_stream::max_buffers == 0) { ALOGE("%s: Camera HAL requested no max_buffers, requires at least 1", ALOGE("%s: Camera HAL requested max_buffer count: %d, requires at least 1", __FUNCTION__, camera3_stream::max_buffers); return INVALID_OPERATION; } Loading services/camera/libcameraservice/photography/CameraDeviceClient.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,30 @@ status_t CameraDeviceClient::getCameraInfo(/*out*/CameraMetadata* info) return res; } status_t CameraDeviceClient::waitUntilIdle() { 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; // FIXME: Also need check repeating burst. if (!mStreamingRequestList.isEmpty()) { ALOGE("%s: Camera %d: Try to waitUntilIdle when there are active streaming requests", __FUNCTION__, mCameraId); return INVALID_OPERATION; } res = mDevice->waitUntilDrained(); ALOGV("%s Done", __FUNCTION__); return res; } 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/photography/CameraDeviceClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,8 @@ public: // -- Caller owns the newly allocated metadata virtual status_t getCameraInfo(/*out*/CameraMetadata* info); // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle(); /** * Interface used by CameraService */ Loading Loading
camera/photography/ICameraDeviceUser.cpp +16 −0 Original line number Diff line number Diff line Loading @@ -40,6 +40,7 @@ enum { CREATE_STREAM, CREATE_DEFAULT_REQUEST, GET_CAMERA_INFO, WAIT_UNTIL_IDLE, }; class BpCameraDeviceUser : public BpInterface<ICameraDeviceUser> Loading Loading @@ -172,6 +173,15 @@ public: return result; } virtual status_t waitUntilIdle() { ALOGV("waitUntilIdle"); Parcel data, reply; data.writeInterfaceToken(ICameraDeviceUser::getInterfaceDescriptor()); remote()->transact(WAIT_UNTIL_IDLE, data, &reply); reply.readExceptionCode(); return reply.readInt32(); } private: Loading Loading @@ -296,6 +306,12 @@ status_t BnCameraDeviceUser::onTransact( return NO_ERROR; } break; case WAIT_UNTIL_IDLE: { CHECK_INTERFACE(ICameraDeviceUser, data, reply); reply->writeNoException(); reply->writeInt32(waitUntilIdle()); return NO_ERROR; } break; default: return BBinder::onTransact(code, data, reply, flags); } Loading
include/camera/photography/ICameraDeviceUser.h +2 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,8 @@ public: virtual status_t getCameraInfo(/*out*/ CameraMetadata* info) = 0; // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle() = 0; }; // ---------------------------------------------------------------------------- Loading
services/camera/libcameraservice/camera3/Camera3OutputStream.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -304,7 +304,7 @@ status_t Camera3OutputStream::configureQueueLocked() { ALOGV("%s: Consumer wants %d buffers, HAL wants %d", __FUNCTION__, maxConsumerBuffers, camera3_stream::max_buffers); if (camera3_stream::max_buffers == 0) { ALOGE("%s: Camera HAL requested no max_buffers, requires at least 1", ALOGE("%s: Camera HAL requested max_buffer count: %d, requires at least 1", __FUNCTION__, camera3_stream::max_buffers); return INVALID_OPERATION; } Loading
services/camera/libcameraservice/photography/CameraDeviceClient.cpp +24 −0 Original line number Diff line number Diff line Loading @@ -412,6 +412,30 @@ status_t CameraDeviceClient::getCameraInfo(/*out*/CameraMetadata* info) return res; } status_t CameraDeviceClient::waitUntilIdle() { 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; // FIXME: Also need check repeating burst. if (!mStreamingRequestList.isEmpty()) { ALOGE("%s: Camera %d: Try to waitUntilIdle when there are active streaming requests", __FUNCTION__, mCameraId); return INVALID_OPERATION; } res = mDevice->waitUntilDrained(); ALOGV("%s Done", __FUNCTION__); return res; } 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/photography/CameraDeviceClient.h +2 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,8 @@ public: // -- Caller owns the newly allocated metadata virtual status_t getCameraInfo(/*out*/CameraMetadata* info); // Wait until all the submitted requests have finished processing virtual status_t waitUntilIdle(); /** * Interface used by CameraService */ Loading