[libcamera-devel,03/14] qcam: Remove double stop of the camera manager

Message ID 20190818011329.14499-4-laurent.pinchart@ideasonboard.com
State Accepted
Headers show
Series
  • Assorted fixes for Android camera HAL
Related show

Commit Message

Laurent Pinchart Aug. 18, 2019, 1:13 a.m. UTC
The camera manager is stopped both in the destructor of the MainWindow
class and in the main() function. This double stop isn't needed, remove
the former and keep the latter as the manager is started in the main()
function.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
---
 src/qcam/main_window.cpp | 2 --
 1 file changed, 2 deletions(-)

Comments

Jacopo Mondi Aug. 19, 2019, 8:58 a.m. UTC | #1
Hi Laurent,

On Sun, Aug 18, 2019 at 04:13:18AM +0300, Laurent Pinchart wrote:
> The camera manager is stopped both in the destructor of the MainWindow
> class and in the main() function. This double stop isn't needed, remove
> the former and keep the latter as the manager is started in the main()
> function.
>

Regardless the discussion on the CameraManager::instance() method,
this is a good change.

Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>

Thanks
   j

> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> ---
>  src/qcam/main_window.cpp | 2 --
>  1 file changed, 2 deletions(-)
>
> diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
> index dcb653e81a29..33fde8b10fd8 100644
> --- a/src/qcam/main_window.cpp
> +++ b/src/qcam/main_window.cpp
> @@ -51,8 +51,6 @@ MainWindow::~MainWindow()
>  		camera_->release();
>  		camera_.reset();
>  	}
> -
> -	CameraManager::instance()->stop();
>  }
>
>  void MainWindow::updateTitle()
> --
> Regards,
>
> Laurent Pinchart
>
> _______________________________________________
> libcamera-devel mailing list
> libcamera-devel@lists.libcamera.org
> https://lists.libcamera.org/listinfo/libcamera-devel

Patch

diff --git a/src/qcam/main_window.cpp b/src/qcam/main_window.cpp
index dcb653e81a29..33fde8b10fd8 100644
--- a/src/qcam/main_window.cpp
+++ b/src/qcam/main_window.cpp
@@ -51,8 +51,6 @@  MainWindow::~MainWindow()
 		camera_->release();
 		camera_.reset();
 	}
-
-	CameraManager::instance()->stop();
 }
 
 void MainWindow::updateTitle()