summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2012-09-10 13:30:43 -0700
committerEino-Ville Talvala <etalvala@google.com>2012-09-10 13:30:43 -0700
commit47512a7da600ababdfd052b574488b9e499c22f6 (patch)
tree420a5bf7b929c78628d915fc8bbfa97858d34941 /services
parent66765846726c02db16a0f024f2217990a90802c0 (diff)
downloadframeworks_av-47512a7da600ababdfd052b574488b9e499c22f6.zip
frameworks_av-47512a7da600ababdfd052b574488b9e499c22f6.tar.gz
frameworks_av-47512a7da600ababdfd052b574488b9e499c22f6.tar.bz2
Camera2: Clean up the right streams.
Change-Id: I780c3e8e255f6a185e0edf1d76f35afdc74dff48
Diffstat (limited to 'services')
-rw-r--r--services/camera/libcameraservice/camera2/ZslProcessor.cpp19
1 files changed, 16 insertions, 3 deletions
diff --git a/services/camera/libcameraservice/camera2/ZslProcessor.cpp b/services/camera/libcameraservice/camera2/ZslProcessor.cpp
index ac02afc..ea1c2b9 100644
--- a/services/camera/libcameraservice/camera2/ZslProcessor.cpp
+++ b/services/camera/libcameraservice/camera2/ZslProcessor.cpp
@@ -134,7 +134,7 @@ status_t ZslProcessor::updateStream(const Parameters &params) {
}
if (currentWidth != (uint32_t)params.pictureWidth ||
currentHeight != (uint32_t)params.pictureHeight) {
- res = device->deleteStream(mZslReprocessStreamId);
+ res = device->deleteReprocessStream(mZslReprocessStreamId);
if (res != OK) {
ALOGE("%s: Camera %d: Unable to delete old reprocess stream "
"for ZSL: %s (%d)", __FUNCTION__,
@@ -189,9 +189,22 @@ status_t ZslProcessor::deleteStream() {
if (client == 0) return OK;
sp<Camera2Device> device = client->getCameraDevice();
- device->deleteStream(mZslReprocessStreamId);
+ res = device->deleteReprocessStream(mZslReprocessStreamId);
+ if (res != OK) {
+ ALOGE("%s: Camera %d: Cannot delete ZSL reprocessing stream %d: "
+ "%s (%d)", __FUNCTION__, client->getCameraId(),
+ mZslReprocessStreamId, strerror(-res), res);
+ return res;
+ }
+
mZslReprocessStreamId = NO_STREAM;
- device->deleteStream(mZslStreamId);
+ res = device->deleteStream(mZslStreamId);
+ if (res != OK) {
+ ALOGE("%s: Camera %d: Cannot delete ZSL output stream %d: "
+ "%s (%d)", __FUNCTION__, client->getCameraId(),
+ mZslStreamId, strerror(-res), res);
+ return res;
+ }
mZslWindow.clear();
mZslConsumer.clear();