summaryrefslogtreecommitdiff
path: root/src/cam/camera_session.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-06 07:33:10 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-22 17:13:47 +0300
commit8519df23a9b8fbc4d845787bc4ad443792736347 (patch)
treed2da6c60f76402e7946ae5bead517bee6b1572b4 /src/cam/camera_session.h
parent8e716be52900389215344577112e88df0d8616df (diff)
cam: Move camera acquire to the CameraSession class
Continue moving towards making the CameraSession class the central point to handle a camera by moving the camera acquire operation. A new CameraSession::camera() function is needed to allow access to the camera from CamApp. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Diffstat (limited to 'src/cam/camera_session.h')
-rw-r--r--src/cam/camera_session.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/cam/camera_session.h b/src/cam/camera_session.h
index 39dbbdf3..88baf906 100644
--- a/src/cam/camera_session.h
+++ b/src/cam/camera_session.h
@@ -14,6 +14,7 @@
#include <libcamera/base/signal.h>
#include <libcamera/camera.h>
+#include <libcamera/camera_manager.h>
#include <libcamera/framebuffer.h>
#include <libcamera/framebuffer_allocator.h>
#include <libcamera/request.h>
@@ -25,10 +26,13 @@
class CameraSession
{
public:
- CameraSession(std::shared_ptr<libcamera::Camera> camera,
+ CameraSession(libcamera::CameraManager *cm,
const OptionsParser::Options &options);
+ ~CameraSession();
bool isValid() const { return config_ != nullptr; }
+
+ libcamera::Camera *camera() { return camera_.get(); }
libcamera::CameraConfiguration *config() { return config_.get(); }
int start(const OptionsParser::Options &options);