diff options
author | Zhijun He <zhijunhe@google.com> | 2014-08-08 12:00:47 -0700 |
---|---|---|
committer | Zhijun He <zhijunhe@google.com> | 2014-08-11 04:32:14 +0000 |
commit | 28c9b6f298134624cb52b1af4ed8716dddb983d3 (patch) | |
tree | 4a9fb69c4b4f9783b8f1efe6369f5862633eddbb /services/camera/libcameraservice/common | |
parent | 2dfe8ea7c131a045067c123efc934ef6ccdb8821 (diff) | |
download | frameworks_av-28c9b6f298134624cb52b1af4ed8716dddb983d3.zip frameworks_av-28c9b6f298134624cb52b1af4ed8716dddb983d3.tar.gz frameworks_av-28c9b6f298134624cb52b1af4ed8716dddb983d3.tar.bz2 |
Camera2/3: Cleanup the jpeg buffer size calcaulation logic
- Only one place calculating the jpeg size-the device layer, Camera2Device and
Camera3Device.
- Remove size argument for CameraDeviceBase and cleanup related code.
Bug: 14327010
Change-Id: I45d2ab4859ee0cc9273e579254f0569108c748f1
Diffstat (limited to 'services/camera/libcameraservice/common')
-rw-r--r-- | services/camera/libcameraservice/common/CameraDeviceBase.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/services/camera/libcameraservice/common/CameraDeviceBase.h b/services/camera/libcameraservice/common/CameraDeviceBase.h index 037695d..9e124b0 100644 --- a/services/camera/libcameraservice/common/CameraDeviceBase.h +++ b/services/camera/libcameraservice/common/CameraDeviceBase.h @@ -109,8 +109,7 @@ class CameraDeviceBase : public virtual RefBase { * other formats, the size parameter is ignored. */ virtual status_t createStream(sp<ANativeWindow> consumer, - uint32_t width, uint32_t height, int format, size_t size, - int *id) = 0; + uint32_t width, uint32_t height, int format, int *id) = 0; /** * Create an input reprocess stream that uses buffers from an existing @@ -156,6 +155,12 @@ class CameraDeviceBase : public virtual RefBase { virtual status_t waitUntilDrained() = 0; /** + * Get Jpeg buffer size for a given jpeg resolution. + * Negative values are error codes. + */ + virtual ssize_t getJpegBufferSize(uint32_t width, uint32_t height) const = 0; + + /** * Abstract class for HAL notification listeners */ class NotificationListener { |