diff options
author | Igor Murashkin <iam@google.com> | 2014-09-11 14:43:24 -0700 |
---|---|---|
committer | Igor Murashkin <iam@google.com> | 2014-09-11 14:43:24 -0700 |
commit | fcf5fea2ac99e6359998078d09fd7e21269dca4a (patch) | |
tree | a28d2d71e26900223139a19889c4de257c47ab75 /services/camera/libcameraservice/api1 | |
parent | b606de81ce5fffc8923c53cb7d5d00f5b423c9b9 (diff) | |
download | frameworks_av-fcf5fea2ac99e6359998078d09fd7e21269dca4a.zip frameworks_av-fcf5fea2ac99e6359998078d09fd7e21269dca4a.tar.gz frameworks_av-fcf5fea2ac99e6359998078d09fd7e21269dca4a.tar.bz2 |
camera: add latest parameters to dumpsys for api1 cameras
Bug: 17290106
Change-Id: I08ac1659d0367613c37669d5bf6e6bf7b2b63bc2
Diffstat (limited to 'services/camera/libcameraservice/api1')
-rw-r--r-- | services/camera/libcameraservice/api1/CameraClient.cpp | 11 | ||||
-rw-r--r-- | services/camera/libcameraservice/api1/CameraClient.h | 3 |
2 files changed, 14 insertions, 0 deletions
diff --git a/services/camera/libcameraservice/api1/CameraClient.cpp b/services/camera/libcameraservice/api1/CameraClient.cpp index 33bdaa3..1a4d9a6 100644 --- a/services/camera/libcameraservice/api1/CameraClient.cpp +++ b/services/camera/libcameraservice/api1/CameraClient.cpp @@ -122,6 +122,16 @@ status_t CameraClient::dump(int fd, const Vector<String16>& args) { mClientPid); len = (len > SIZE - 1) ? SIZE - 1 : len; write(fd, buffer, len); + + len = snprintf(buffer, SIZE, "Latest set parameters:\n"); + len = (len > SIZE - 1) ? SIZE - 1 : len; + write(fd, buffer, len); + + mLatestSetParameters.dump(fd, args); + + const char *enddump = "\n\n"; + write(fd, enddump, strlen(enddump)); + return mHardware->dump(fd, args); } @@ -550,6 +560,7 @@ status_t CameraClient::setParameters(const String8& params) { status_t result = checkPidAndHardware(); if (result != NO_ERROR) return result; + mLatestSetParameters = CameraParameters(params); CameraParameters p(params); return mHardware->setParameters(p); } diff --git a/services/camera/libcameraservice/api1/CameraClient.h b/services/camera/libcameraservice/api1/CameraClient.h index 6779f5e..63a9d0f 100644 --- a/services/camera/libcameraservice/api1/CameraClient.h +++ b/services/camera/libcameraservice/api1/CameraClient.h @@ -142,6 +142,9 @@ private: // of the original one), we allocate mPreviewBuffer and reuse it if possible. sp<MemoryHeapBase> mPreviewBuffer; + // Debugging information + CameraParameters mLatestSetParameters; + // We need to avoid the deadlock when the incoming command thread and // the CameraHardwareInterface callback thread both want to grab mLock. // An extra flag is used to tell the callback thread that it should stop |