summaryrefslogtreecommitdiffstats
path: root/services/camera/libcameraservice/CameraFlashlight.cpp
diff options
context:
space:
mode:
authorEino-Ville Talvala <etalvala@google.com>2015-06-09 13:44:19 -0700
committerEino-Ville Talvala <etalvala@google.com>2015-06-09 14:52:26 -0700
commit727d172137b4f32681c098de8e2623c0b65a6406 (patch)
tree8e7a403274d5a770ecd473d6ef66f3a5f32f45da /services/camera/libcameraservice/CameraFlashlight.cpp
parent9a17941fa70e43119d2c3464bc00a3cd30b2bd14 (diff)
downloadframeworks_av-727d172137b4f32681c098de8e2623c0b65a6406.zip
frameworks_av-727d172137b4f32681c098de8e2623c0b65a6406.tar.gz
frameworks_av-727d172137b4f32681c098de8e2623c0b65a6406.tar.bz2
CameraService: Add consumer name to output stream dumpsys
Also switch use of ANativeWindow to Surface, to get to the getConsumerName() method where necessary. Surface can always be cast to ANativeWindow, but not the other way around, so it's a better option anyway. Change-Id: Ie5c2d30821c1a754f9e382699ff50b4b328288b3
Diffstat (limited to 'services/camera/libcameraservice/CameraFlashlight.cpp')
-rw-r--r--services/camera/libcameraservice/CameraFlashlight.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/services/camera/libcameraservice/CameraFlashlight.cpp b/services/camera/libcameraservice/CameraFlashlight.cpp
index 8613ac6..280bb9d 100644
--- a/services/camera/libcameraservice/CameraFlashlight.cpp
+++ b/services/camera/libcameraservice/CameraFlashlight.cpp
@@ -359,7 +359,7 @@ CameraDeviceClientFlashControl::~CameraDeviceClientFlashControl() {
delete mMetadata;
}
- mAnw.clear();
+ mSurface.clear();
mSurfaceTexture.clear();
mProducer.clear();
mConsumer.clear();
@@ -395,11 +395,11 @@ status_t CameraDeviceClientFlashControl::initializeSurface(
return res;
}
- mAnw = new Surface(mProducer, /*useAsync*/ true);
- if (mAnw == NULL) {
+ mSurface = new Surface(mProducer, /*useAsync*/ true);
+ if (mSurface == NULL) {
return NO_MEMORY;
}
- res = device->createStream(mAnw, width, height, format,
+ res = device->createStream(mSurface, width, height, format,
HAL_DATASPACE_UNKNOWN, CAMERA3_STREAM_ROTATION_0, &mStreamId);
if (res) {
return res;
@@ -653,7 +653,7 @@ CameraHardwareInterfaceFlashControl::CameraHardwareInterfaceFlashControl(
CameraHardwareInterfaceFlashControl::~CameraHardwareInterfaceFlashControl() {
disconnectCameraDevice();
- mAnw.clear();
+ mSurface.clear();
mSurfaceTexture.clear();
mProducer.clear();
mConsumer.clear();
@@ -810,18 +810,18 @@ status_t CameraHardwareInterfaceFlashControl::initializePreviewWindow(
return res;
}
- mAnw = new Surface(mProducer, /*useAsync*/ true);
- if (mAnw == NULL) {
+ mSurface = new Surface(mProducer, /*useAsync*/ true);
+ if (mSurface == NULL) {
return NO_MEMORY;
}
- res = native_window_api_connect(mAnw.get(), NATIVE_WINDOW_API_CAMERA);
+ res = native_window_api_connect(mSurface.get(), NATIVE_WINDOW_API_CAMERA);
if (res) {
ALOGE("%s: Unable to connect to native window", __FUNCTION__);
return res;
}
- return device->setPreviewWindow(mAnw);
+ return device->setPreviewWindow(mSurface);
}
status_t CameraHardwareInterfaceFlashControl::connectCameraDevice(
@@ -870,7 +870,7 @@ status_t CameraHardwareInterfaceFlashControl::disconnectCameraDevice() {
CameraParameters::FLASH_MODE_OFF);
mDevice->setParameters(mParameters);
mDevice->stopPreview();
- status_t res = native_window_api_disconnect(mAnw.get(),
+ status_t res = native_window_api_disconnect(mSurface.get(),
NATIVE_WINDOW_API_CAMERA);
if (res) {
ALOGW("%s: native_window_api_disconnect failed: %s (%d)",