Loading services/camera/libcameraservice/CameraFlashlight.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -359,7 +359,7 @@ CameraDeviceClientFlashControl::~CameraDeviceClientFlashControl() { delete mMetadata; } mAnw.clear(); mSurface.clear(); mSurfaceTexture.clear(); mProducer.clear(); mConsumer.clear(); Loading Loading @@ -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; Loading Loading @@ -653,7 +653,7 @@ CameraHardwareInterfaceFlashControl::CameraHardwareInterfaceFlashControl( CameraHardwareInterfaceFlashControl::~CameraHardwareInterfaceFlashControl() { disconnectCameraDevice(); mAnw.clear(); mSurface.clear(); mSurfaceTexture.clear(); mProducer.clear(); mConsumer.clear(); Loading Loading @@ -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( Loading Loading @@ -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)", Loading services/camera/libcameraservice/CameraFlashlight.h +2 −2 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ class CameraDeviceClientFlashControl : public FlashControlBase { sp<IGraphicBufferProducer> mProducer; sp<IGraphicBufferConsumer> mConsumer; sp<GLConsumer> mSurfaceTexture; sp<ANativeWindow> mAnw; sp<Surface> mSurface; int32_t mStreamId; Mutex mLock; Loading Loading @@ -215,7 +215,7 @@ class CameraHardwareInterfaceFlashControl : public FlashControlBase { sp<IGraphicBufferProducer> mProducer; sp<IGraphicBufferConsumer> mConsumer; sp<GLConsumer> mSurfaceTexture; sp<ANativeWindow> mAnw; sp<Surface> mSurface; Mutex mLock; }; Loading services/camera/libcameraservice/api1/Camera2Client.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -529,7 +529,7 @@ status_t Camera2Client::setPreviewTarget( if ( (res = checkPid(__FUNCTION__) ) != OK) return res; sp<IBinder> binder; sp<ANativeWindow> window; sp<Surface> window; if (bufferProducer != 0) { binder = IInterface::asBinder(bufferProducer); // Using controlledByApp flag to ensure that the buffer queue remains in Loading @@ -541,7 +541,7 @@ status_t Camera2Client::setPreviewTarget( } status_t Camera2Client::setPreviewWindowL(const sp<IBinder>& binder, sp<ANativeWindow> window) { sp<Surface> window) { ATRACE_CALL(); status_t res; Loading Loading @@ -666,7 +666,7 @@ status_t Camera2Client::setPreviewCallbackTarget( status_t res; if ( (res = checkPid(__FUNCTION__) ) != OK) return res; sp<ANativeWindow> window; sp<Surface> window; if (callbackProducer != 0) { window = new Surface(callbackProducer); } Loading services/camera/libcameraservice/api1/Camera2Client.h +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ private: typedef camera2::Parameters Parameters; status_t setPreviewWindowL(const sp<IBinder>& binder, sp<ANativeWindow> window); sp<Surface> window); status_t startPreviewL(Parameters ¶ms, bool restart); void stopPreviewL(); status_t startRecordingL(Parameters ¶ms, bool restart); Loading services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ void CallbackProcessor::onFrameAvailable(const BufferItem& /*item*/) { } status_t CallbackProcessor::setCallbackWindow( sp<ANativeWindow> callbackWindow) { sp<Surface> callbackWindow) { ATRACE_CALL(); status_t res; Loading Loading @@ -115,7 +115,7 @@ status_t CallbackProcessor::updateStream(const Parameters ¶ms) { BufferQueue::createBufferQueue(&producer, &consumer); mCallbackConsumer = new CpuConsumer(consumer, kCallbackHeapCount); mCallbackConsumer->setFrameAvailableListener(this); mCallbackConsumer->setName(String8("Camera2Client::CallbackConsumer")); mCallbackConsumer->setName(String8("Camera2-CallbackConsumer")); mCallbackWindow = new Surface(producer); } Loading Loading
services/camera/libcameraservice/CameraFlashlight.cpp +10 −10 Original line number Diff line number Diff line Loading @@ -359,7 +359,7 @@ CameraDeviceClientFlashControl::~CameraDeviceClientFlashControl() { delete mMetadata; } mAnw.clear(); mSurface.clear(); mSurfaceTexture.clear(); mProducer.clear(); mConsumer.clear(); Loading Loading @@ -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; Loading Loading @@ -653,7 +653,7 @@ CameraHardwareInterfaceFlashControl::CameraHardwareInterfaceFlashControl( CameraHardwareInterfaceFlashControl::~CameraHardwareInterfaceFlashControl() { disconnectCameraDevice(); mAnw.clear(); mSurface.clear(); mSurfaceTexture.clear(); mProducer.clear(); mConsumer.clear(); Loading Loading @@ -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( Loading Loading @@ -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)", Loading
services/camera/libcameraservice/CameraFlashlight.h +2 −2 Original line number Diff line number Diff line Loading @@ -166,7 +166,7 @@ class CameraDeviceClientFlashControl : public FlashControlBase { sp<IGraphicBufferProducer> mProducer; sp<IGraphicBufferConsumer> mConsumer; sp<GLConsumer> mSurfaceTexture; sp<ANativeWindow> mAnw; sp<Surface> mSurface; int32_t mStreamId; Mutex mLock; Loading Loading @@ -215,7 +215,7 @@ class CameraHardwareInterfaceFlashControl : public FlashControlBase { sp<IGraphicBufferProducer> mProducer; sp<IGraphicBufferConsumer> mConsumer; sp<GLConsumer> mSurfaceTexture; sp<ANativeWindow> mAnw; sp<Surface> mSurface; Mutex mLock; }; Loading
services/camera/libcameraservice/api1/Camera2Client.cpp +3 −3 Original line number Diff line number Diff line Loading @@ -529,7 +529,7 @@ status_t Camera2Client::setPreviewTarget( if ( (res = checkPid(__FUNCTION__) ) != OK) return res; sp<IBinder> binder; sp<ANativeWindow> window; sp<Surface> window; if (bufferProducer != 0) { binder = IInterface::asBinder(bufferProducer); // Using controlledByApp flag to ensure that the buffer queue remains in Loading @@ -541,7 +541,7 @@ status_t Camera2Client::setPreviewTarget( } status_t Camera2Client::setPreviewWindowL(const sp<IBinder>& binder, sp<ANativeWindow> window) { sp<Surface> window) { ATRACE_CALL(); status_t res; Loading Loading @@ -666,7 +666,7 @@ status_t Camera2Client::setPreviewCallbackTarget( status_t res; if ( (res = checkPid(__FUNCTION__) ) != OK) return res; sp<ANativeWindow> window; sp<Surface> window; if (callbackProducer != 0) { window = new Surface(callbackProducer); } Loading
services/camera/libcameraservice/api1/Camera2Client.h +1 −1 Original line number Diff line number Diff line Loading @@ -150,7 +150,7 @@ private: typedef camera2::Parameters Parameters; status_t setPreviewWindowL(const sp<IBinder>& binder, sp<ANativeWindow> window); sp<Surface> window); status_t startPreviewL(Parameters ¶ms, bool restart); void stopPreviewL(); status_t startRecordingL(Parameters ¶ms, bool restart); Loading
services/camera/libcameraservice/api1/client2/CallbackProcessor.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ void CallbackProcessor::onFrameAvailable(const BufferItem& /*item*/) { } status_t CallbackProcessor::setCallbackWindow( sp<ANativeWindow> callbackWindow) { sp<Surface> callbackWindow) { ATRACE_CALL(); status_t res; Loading Loading @@ -115,7 +115,7 @@ status_t CallbackProcessor::updateStream(const Parameters ¶ms) { BufferQueue::createBufferQueue(&producer, &consumer); mCallbackConsumer = new CpuConsumer(consumer, kCallbackHeapCount); mCallbackConsumer->setFrameAvailableListener(this); mCallbackConsumer->setName(String8("Camera2Client::CallbackConsumer")); mCallbackConsumer->setName(String8("Camera2-CallbackConsumer")); mCallbackWindow = new Surface(producer); } Loading