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/api2 | |
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/api2')
-rw-r--r-- | services/camera/libcameraservice/api2/CameraDeviceClient.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp index b8611f8..86f82a3 100644 --- a/services/camera/libcameraservice/api2/CameraDeviceClient.cpp +++ b/services/camera/libcameraservice/api2/CameraDeviceClient.cpp @@ -384,23 +384,7 @@ status_t CameraDeviceClient::createStream(int width, int height, int format, // after each call, but only once we are done with all. int streamId = -1; - if (format == HAL_PIXEL_FORMAT_BLOB) { - // JPEG buffers need to be sized for maximum possible compressed size - CameraMetadata staticInfo = mDevice->info(); - camera_metadata_entry_t entry = staticInfo.find(ANDROID_JPEG_MAX_SIZE); - if (entry.count == 0) { - ALOGE("%s: Camera %d: Can't find maximum JPEG size in " - "static metadata!", __FUNCTION__, mCameraId); - return INVALID_OPERATION; - } - int32_t maxJpegSize = entry.data.i32[0]; - res = mDevice->createStream(anw, width, height, format, maxJpegSize, - &streamId); - } else { - // All other streams are a known size - res = mDevice->createStream(anw, width, height, format, /*size*/0, - &streamId); - } + res = mDevice->createStream(anw, width, height, format, &streamId); if (res == OK) { mStreamMap.add(bufferProducer->asBinder(), streamId); |