Loading camera/aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -44,4 +44,5 @@ interface ICameraDeviceCallbacks * @param lastFrameNumber Frame number of the last frame of the streaming request. */ oneway void onRepeatingRequestError(in long lastFrameNumber); oneway void onRequestQueueEmpty(); } camera/ndk/impl/ACameraDevice.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -1346,6 +1346,12 @@ CameraDevice::ServiceCallback::onPrepared(int) { return binder::Status::ok(); } binder::Status CameraDevice::ServiceCallback::onRequestQueueEmpty() { // onRequestQueueEmpty not yet implemented in NDK return binder::Status::ok(); } binder::Status CameraDevice::ServiceCallback::onRepeatingRequestError(int64_t lastFrameNumber) { binder::Status ret = binder::Status::ok(); Loading camera/ndk/impl/ACameraDevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ class CameraDevice final : public RefBase { binder::Status onResultReceived(const CameraMetadata& metadata, const CaptureResultExtras& resultExtras) override; binder::Status onPrepared(int streamId) override; binder::Status onRequestQueueEmpty() override; binder::Status onRepeatingRequestError(int64_t lastFrameNumber) override; private: const wp<CameraDevice> mDevice; Loading camera/tests/CameraBinderTests.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ public: SENT_RESULT, UNINITIALIZED, REPEATING_REQUEST_ERROR, REQUEST_QUEUE_EMPTY, }; protected: Loading Loading @@ -225,6 +226,14 @@ public: return binder::Status::ok(); } virtual binder::Status onRequestQueueEmpty() { Mutex::Autolock l(mLock); mLastStatus = REQUEST_QUEUE_EMPTY; mStatusesHit.push_back(mLastStatus); mStatusCondition.broadcast(); return binder::Status::ok(); } // Test helper functions: bool hadError() const { Loading services/camera/libcameraservice/api2/CameraDeviceClient.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1210,6 +1210,14 @@ void CameraDeviceClient::notifyPrepared(int streamId) { } } void CameraDeviceClient::notifyRequestQueueEmpty() { // Thread safe. Don't bother locking. sp<hardware::camera2::ICameraDeviceCallbacks> remoteCb = getRemoteCallback(); if (remoteCb != 0) { remoteCb->onRequestQueueEmpty(); } } void CameraDeviceClient::detachDevice() { if (mDevice == 0) return; Loading Loading
camera/aidl/android/hardware/camera2/ICameraDeviceCallbacks.aidl +1 −0 Original line number Diff line number Diff line Loading @@ -44,4 +44,5 @@ interface ICameraDeviceCallbacks * @param lastFrameNumber Frame number of the last frame of the streaming request. */ oneway void onRepeatingRequestError(in long lastFrameNumber); oneway void onRequestQueueEmpty(); }
camera/ndk/impl/ACameraDevice.cpp +6 −0 Original line number Diff line number Diff line Loading @@ -1346,6 +1346,12 @@ CameraDevice::ServiceCallback::onPrepared(int) { return binder::Status::ok(); } binder::Status CameraDevice::ServiceCallback::onRequestQueueEmpty() { // onRequestQueueEmpty not yet implemented in NDK return binder::Status::ok(); } binder::Status CameraDevice::ServiceCallback::onRepeatingRequestError(int64_t lastFrameNumber) { binder::Status ret = binder::Status::ok(); Loading
camera/ndk/impl/ACameraDevice.h +1 −0 Original line number Diff line number Diff line Loading @@ -74,6 +74,7 @@ class CameraDevice final : public RefBase { binder::Status onResultReceived(const CameraMetadata& metadata, const CaptureResultExtras& resultExtras) override; binder::Status onPrepared(int streamId) override; binder::Status onRequestQueueEmpty() override; binder::Status onRepeatingRequestError(int64_t lastFrameNumber) override; private: const wp<CameraDevice> mDevice; Loading
camera/tests/CameraBinderTests.cpp +9 −0 Original line number Diff line number Diff line Loading @@ -151,6 +151,7 @@ public: SENT_RESULT, UNINITIALIZED, REPEATING_REQUEST_ERROR, REQUEST_QUEUE_EMPTY, }; protected: Loading Loading @@ -225,6 +226,14 @@ public: return binder::Status::ok(); } virtual binder::Status onRequestQueueEmpty() { Mutex::Autolock l(mLock); mLastStatus = REQUEST_QUEUE_EMPTY; mStatusesHit.push_back(mLastStatus); mStatusCondition.broadcast(); return binder::Status::ok(); } // Test helper functions: bool hadError() const { Loading
services/camera/libcameraservice/api2/CameraDeviceClient.cpp +8 −0 Original line number Diff line number Diff line Loading @@ -1210,6 +1210,14 @@ void CameraDeviceClient::notifyPrepared(int streamId) { } } void CameraDeviceClient::notifyRequestQueueEmpty() { // Thread safe. Don't bother locking. sp<hardware::camera2::ICameraDeviceCallbacks> remoteCb = getRemoteCallback(); if (remoteCb != 0) { remoteCb->onRequestQueueEmpty(); } } void CameraDeviceClient::detachDevice() { if (mDevice == 0) return; Loading