Loading services/camera/libcameraservice/device3/Camera3Device.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -4694,6 +4694,10 @@ status_t Camera3Device::RequestThread::prepareHalRequests() { buffer.status = CAMERA_BUFFER_STATUS_OK; buffer.acquire_fence = -1; buffer.release_fence = -1; // Mark the output stream as unpreparable to block clients from calling // 'prepare' after this request reaches CameraHal and before the respective // buffers are requested. outputStream->markUnpreparable(); } else { res = outputStream->getBuffer(&outputBuffers->editItemAt(j), waitDuration, Loading services/camera/libcameraservice/device3/Camera3Stream.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,13 @@ bool Camera3Stream::isUnpreparable() { return mStreamUnpreparable; } void Camera3Stream::markUnpreparable() { ATRACE_CALL(); Mutex::Autolock l(mLock); mStreamUnpreparable = true; } status_t Camera3Stream::startPrepare(int maxCount, bool blockRequest) { ATRACE_CALL(); Loading services/camera/libcameraservice/device3/Camera3Stream.h +5 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,11 @@ class Camera3Stream : */ bool isUnpreparable(); /** * Mark the stream as unpreparable. */ void markUnpreparable() override; /** * Start stream preparation. May only be called in the CONFIGURED state, * when no valid buffers have yet been returned to this stream. Prepares Loading services/camera/libcameraservice/device3/Camera3StreamInterface.h +5 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,11 @@ class Camera3StreamInterface : public virtual RefBase { */ virtual bool isUnpreparable() = 0; /** * Mark the stream as unpreparable. */ virtual void markUnpreparable() = 0; /** * Start stream preparation. May only be called in the CONFIGURED state, * when no valid buffers have yet been returned to this stream. Prepares Loading Loading
services/camera/libcameraservice/device3/Camera3Device.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -4694,6 +4694,10 @@ status_t Camera3Device::RequestThread::prepareHalRequests() { buffer.status = CAMERA_BUFFER_STATUS_OK; buffer.acquire_fence = -1; buffer.release_fence = -1; // Mark the output stream as unpreparable to block clients from calling // 'prepare' after this request reaches CameraHal and before the respective // buffers are requested. outputStream->markUnpreparable(); } else { res = outputStream->getBuffer(&outputBuffers->editItemAt(j), waitDuration, Loading
services/camera/libcameraservice/device3/Camera3Stream.cpp +7 −0 Original line number Diff line number Diff line Loading @@ -417,6 +417,13 @@ bool Camera3Stream::isUnpreparable() { return mStreamUnpreparable; } void Camera3Stream::markUnpreparable() { ATRACE_CALL(); Mutex::Autolock l(mLock); mStreamUnpreparable = true; } status_t Camera3Stream::startPrepare(int maxCount, bool blockRequest) { ATRACE_CALL(); Loading
services/camera/libcameraservice/device3/Camera3Stream.h +5 −0 Original line number Diff line number Diff line Loading @@ -222,6 +222,11 @@ class Camera3Stream : */ bool isUnpreparable(); /** * Mark the stream as unpreparable. */ void markUnpreparable() override; /** * Start stream preparation. May only be called in the CONFIGURED state, * when no valid buffers have yet been returned to this stream. Prepares Loading
services/camera/libcameraservice/device3/Camera3StreamInterface.h +5 −0 Original line number Diff line number Diff line Loading @@ -206,6 +206,11 @@ class Camera3StreamInterface : public virtual RefBase { */ virtual bool isUnpreparable() = 0; /** * Mark the stream as unpreparable. */ virtual void markUnpreparable() = 0; /** * Start stream preparation. May only be called in the CONFIGURED state, * when no valid buffers have yet been returned to this stream. Prepares Loading