diff options
Diffstat (limited to 'services/camera/libcameraservice/device3')
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.cpp | 11 | ||||
-rw-r--r-- | services/camera/libcameraservice/device3/Camera3Device.h | 14 |
2 files changed, 8 insertions, 17 deletions
diff --git a/services/camera/libcameraservice/device3/Camera3Device.cpp b/services/camera/libcameraservice/device3/Camera3Device.cpp index a6214cc..ed350c1 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.cpp +++ b/services/camera/libcameraservice/device3/Camera3Device.cpp @@ -793,12 +793,12 @@ status_t Camera3Device::createZslStream( } status_t Camera3Device::createStream(sp<ANativeWindow> consumer, - uint32_t width, uint32_t height, int format, size_t size, int *id) { + uint32_t width, uint32_t height, int format, int *id) { ATRACE_CALL(); Mutex::Autolock il(mInterfaceLock); Mutex::Autolock l(mLock); - ALOGV("Camera %d: Creating new stream %d: %d x %d, format %d, size %zu", - mId, mNextStreamId, width, height, format, size); + ALOGV("Camera %d: Creating new stream %d: %d x %d, format %d", + mId, mNextStreamId, width, height, format); status_t res; bool wasActive = false; @@ -832,10 +832,7 @@ status_t Camera3Device::createStream(sp<ANativeWindow> consumer, sp<Camera3OutputStream> newStream; if (format == HAL_PIXEL_FORMAT_BLOB) { ssize_t jpegBufferSize = getJpegBufferSize(width, height); - if (jpegBufferSize > 0) { - ALOGV("%s: Overwrite Jpeg output buffer size from %zu to %zu", - __FUNCTION__, size, jpegBufferSize); - } else { + if (jpegBufferSize <= 0) { SET_ERR_L("Invalid jpeg buffer size %zd", jpegBufferSize); return BAD_VALUE; } diff --git a/services/camera/libcameraservice/device3/Camera3Device.h b/services/camera/libcameraservice/device3/Camera3Device.h index b1b0033..7656237 100644 --- a/services/camera/libcameraservice/device3/Camera3Device.h +++ b/services/camera/libcameraservice/device3/Camera3Device.h @@ -93,11 +93,9 @@ class Camera3Device : // Actual stream creation/deletion is delayed until first request is submitted // If adding streams while actively capturing, will pause device before adding - // stream, reconfiguring device, and unpausing. Note that, for JPEG stream, the - // buffer size may be overwritten by an more accurate value calculated by Camera3Device. + // stream, reconfiguring device, and unpausing. virtual status_t createStream(sp<ANativeWindow> consumer, - uint32_t width, uint32_t height, int format, size_t size, - int *id); + uint32_t width, uint32_t height, int format, int *id); virtual status_t createInputStream( uint32_t width, uint32_t height, int format, int *id); @@ -137,6 +135,8 @@ class Camera3Device : virtual uint32_t getDeviceVersion(); + virtual ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const; + // Methods called by subclasses void notifyStatus(bool idle); // updates from StatusTracker @@ -316,12 +316,6 @@ class Camera3Device : */ Size getMaxJpegResolution() const; - /** - * Get Jpeg buffer size for a given jpeg resolution. - * Negative values are error codes. - */ - ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const; - struct RequestTrigger { // Metadata tag number, e.g. android.control.aePrecaptureTrigger uint32_t metadataTag; |