diff options
author | Colin Cross <ccross@android.com> | 2014-03-24 19:36:36 +0000 |
---|---|---|
committer | Android Git Automerger <android-git-automerger@android.com> | 2014-03-24 19:36:36 +0000 |
commit | 32ce52b01dab863f2b4749e1c69f619cf820486f (patch) | |
tree | 489e255200d3a7bfdac8269bee29a9b55707f14e /services/camera/libcameraservice/device3 | |
parent | f555c47f1843b5a3557e18c16cb06b0ec06dcf34 (diff) | |
parent | 5c679d41714e42f153f6aeb492df54510a195bc1 (diff) | |
download | frameworks_av-32ce52b01dab863f2b4749e1c69f619cf820486f.zip frameworks_av-32ce52b01dab863f2b4749e1c69f619cf820486f.tar.gz frameworks_av-32ce52b01dab863f2b4749e1c69f619cf820486f.tar.bz2 |
am 5c679d41: resolved conflicts for merge of 3d7c5002 to klp-modular-dev-plus-aosp
* commit '5c679d41714e42f153f6aeb492df54510a195bc1':
libcameraservice: build 64-bit
libcameraservice: fix 64-bit print format warnings
Diffstat (limited to 'services/camera/libcameraservice/device3')
5 files changed, 19 insertions, 19 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index e5ac037..cc192c8 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -37,6 +37,8 @@ "%s: " fmt, __FUNCTION__, \ ##__VA_ARGS__) +#include <inttypes.h> + #include <utils/Log.h> #include <utils/Trace.h> #include <utils/Timers.h> @@ -331,7 +333,7 @@ status_t Camera3Device::dump(int fd, const Vector<String16> &args) { } else { for (size_t i = 0; i < mInFlightMap.size(); i++) { InFlightRequest r = mInFlightMap.valueAt(i); - lines.appendFormat(" Frame %d | Timestamp: %lld, metadata" + lines.appendFormat(" Frame %d | Timestamp: %" PRId64 ", metadata" " arrived: %s, buffers left: %d\n", mInFlightMap.keyAt(i), r.captureTimestamp, r.haveResultMetadata ? "true" : "false", r.numBuffersLeft); @@ -755,7 +757,7 @@ status_t Camera3Device::createStream(sp<ANativeWindow> consumer, ATRACE_CALL(); Mutex::Autolock il(mInterfaceLock); Mutex::Autolock l(mLock); - ALOGV("Camera %d: Creating new stream %d: %d x %d, format %d, size %d", + ALOGV("Camera %d: Creating new stream %d: %d x %d, format %d, size %zu", mId, mNextStreamId, width, height, format, size); status_t res; @@ -1101,7 +1103,7 @@ status_t Camera3Device::waitForNextFrame(nsecs_t timeout) { if (res == TIMED_OUT) { return res; } else if (res != OK) { - ALOGW("%s: Camera %d: No frame in %lld ns: %s (%d)", + ALOGW("%s: Camera %d: No frame in %" PRId64 " ns: %s (%d)", __FUNCTION__, mId, timeout, strerror(-res), res); return res; } @@ -1765,7 +1767,7 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { // Sanity check - if we have too many in-flight frames, something has // likely gone wrong if (mInFlightMap.size() > kInFlightWarnLimit) { - CLOGE("In-flight list too large: %d", mInFlightMap.size()); + CLOGE("In-flight list too large: %zu", mInFlightMap.size()); } } @@ -1815,7 +1817,7 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { gotResult = false; } else if (timestamp != entry.data.i64[0]) { SET_ERR("Timestamp mismatch between shutter notify and result" - " metadata for frame %d (%lld vs %lld respectively)", + " metadata for frame %d (%" PRId64 " vs %" PRId64 " respectively)", frameNumber, timestamp, entry.data.i64[0]); gotResult = false; } @@ -1837,7 +1839,7 @@ void Camera3Device::processCaptureResult(const camera3_capture_result *result) { // Note: stream may be deallocated at this point, if this buffer was the // last reference to it. if (res != OK) { - ALOGE("Can't return buffer %d for frame %d to its stream: " + ALOGE("Can't return buffer %zu for frame %d to its stream: " " %s (%d)", i, frameNumber, strerror(-res), res); } } @@ -1927,7 +1929,7 @@ void Camera3Device::notify(const camera3_notify_msg *msg) { frameNumber); break; } - ALOGVV("Camera %d: %s: Shutter fired for frame %d (id %d) at %lld", + ALOGVV("Camera %d: %s: Shutter fired for frame %d (id %d) at %" PRId64, mId, __FUNCTION__, frameNumber, requestId, timestamp); // Call listener, if any if (listener != NULL) { diff --git a/services/camera/libcameraservice/device3/Camera3IOStreamBase.cpp b/services/camera/libcameraservice/device3/Camera3IOStreamBase.cpp index 42e02d8..d662cc2 100644 --- a/services/camera/libcameraservice/device3/Camera3IOStreamBase.cpp +++ b/services/camera/libcameraservice/device3/Camera3IOStreamBase.cpp @@ -18,8 +18,7 @@ #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 -// This is needed for stdint.h to define INT64_MAX in C++ -#define __STDC_LIMIT_MACROS +#include <inttypes.h> #include <utils/Log.h> #include <utils/Trace.h> @@ -54,8 +53,8 @@ Camera3IOStreamBase::~Camera3IOStreamBase() { bool Camera3IOStreamBase::hasOutstandingBuffersLocked() const { nsecs_t signalTime = mCombinedFence->getSignalTime(); - ALOGV("%s: Stream %d: Has %d outstanding buffers," - " buffer signal time is %lld", + ALOGV("%s: Stream %d: Has %zu outstanding buffers," + " buffer signal time is %" PRId64, __FUNCTION__, mId, mDequeuedBufferCount, signalTime); if (mDequeuedBufferCount > 0 || signalTime == INT64_MAX) { return true; @@ -73,7 +72,7 @@ void Camera3IOStreamBase::dump(int fd, const Vector<String16> &args) const { lines.appendFormat(" Max size: %zu\n", mMaxSize); lines.appendFormat(" Usage: %d, max HAL buffers: %d\n", camera3_stream::usage, camera3_stream::max_buffers); - lines.appendFormat(" Frames produced: %d, last timestamp: %lld ns\n", + lines.appendFormat(" Frames produced: %d, last timestamp: %" PRId64 " ns\n", mFrameCount, mLastTimestamp); lines.appendFormat(" Total buffers: %zu, currently dequeued: %zu\n", mTotalBufferCount, mDequeuedBufferCount); @@ -119,7 +118,7 @@ status_t Camera3IOStreamBase::disconnectLocked() { } if (mDequeuedBufferCount > 0) { - ALOGE("%s: Can't disconnect with %d buffers still dequeued!", + ALOGE("%s: Can't disconnect with %zu buffers still dequeued!", __FUNCTION__, mDequeuedBufferCount); return INVALID_OPERATION; } diff --git a/services/camera/libcameraservice/device3/Camera3Stream.cpp b/services/camera/libcameraservice/device3/Camera3Stream.cpp index 6d2cf94..70406f1 100644 --- a/services/camera/libcameraservice/device3/Camera3Stream.cpp +++ b/services/camera/libcameraservice/device3/Camera3Stream.cpp @@ -353,7 +353,7 @@ status_t Camera3Stream::registerBuffersLocked(camera3_device *hal3Device) { } if (bufferIdx == bufferCount) { // Got all buffers, register with HAL - ALOGV("%s: Registering %d buffers with camera HAL", + ALOGV("%s: Registering %zu buffers with camera HAL", __FUNCTION__, bufferCount); ATRACE_BEGIN("camera3->register_stream_buffers"); res = hal3Device->ops->register_stream_buffers(hal3Device, diff --git a/services/camera/libcameraservice/device3/Camera3ZslStream.cpp b/services/camera/libcameraservice/device3/Camera3ZslStream.cpp index 04deac5..09e14c5 100644 --- a/services/camera/libcameraservice/device3/Camera3ZslStream.cpp +++ b/services/camera/libcameraservice/device3/Camera3ZslStream.cpp @@ -18,6 +18,8 @@ #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 +#include <inttypes.h> + #include <utils/Log.h> #include <utils/Trace.h> #include "Camera3ZslStream.h" @@ -299,7 +301,7 @@ status_t Camera3ZslStream::enqueueInputBufferByTimestamp( if (actual != timestamp) { ALOGW("%s: ZSL buffer candidate search didn't find an exact match --" - " requested timestamp = %lld, actual timestamp = %lld", + " requested timestamp = %" PRId64 ", actual timestamp = %" PRId64, __FUNCTION__, timestamp, actual); } diff --git a/services/camera/libcameraservice/device3/StatusTracker.cpp b/services/camera/libcameraservice/device3/StatusTracker.cpp index ab5419f..723b5c2 100644 --- a/services/camera/libcameraservice/device3/StatusTracker.cpp +++ b/services/camera/libcameraservice/device3/StatusTracker.cpp @@ -18,9 +18,6 @@ #define ATRACE_TAG ATRACE_TAG_CAMERA //#define LOG_NDEBUG 0 -// This is needed for stdint.h to define INT64_MAX in C++ -#define __STDC_LIMIT_MACROS - #include <utils/Log.h> #include <utils/Trace.h> #include <ui/Fence.h> @@ -52,7 +49,7 @@ int StatusTracker::addComponent() { ALOGV("%s: Adding new component %d", __FUNCTION__, id); err = mStates.add(id, IDLE); - ALOGE_IF(err < 0, "%s: Can't add new component %d: %s (%d)", + ALOGE_IF(err < 0, "%s: Can't add new component %d: %s (%zd)", __FUNCTION__, id, strerror(-err), err); } |