summaryrefslogtreecommitdiff
path: root/src/cam/camera_session.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cam/camera_session.h')
-rw-r--r--src/cam/camera_session.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/cam/camera_session.h b/src/cam/camera_session.h
index 31e8d6db..39dbbdf3 100644
--- a/src/cam/camera_session.h
+++ b/src/cam/camera_session.h
@@ -26,7 +26,10 @@ class CameraSession
{
public:
CameraSession(std::shared_ptr<libcamera::Camera> camera,
- libcamera::CameraConfiguration *config);
+ const OptionsParser::Options &options);
+
+ bool isValid() const { return config_ != nullptr; }
+ libcamera::CameraConfiguration *config() { return config_.get(); }
int start(const OptionsParser::Options &options);
void stop();
@@ -41,7 +44,7 @@ private:
void processRequest(libcamera::Request *request);
std::shared_ptr<libcamera::Camera> camera_;
- libcamera::CameraConfiguration *config_;
+ std::unique_ptr<libcamera::CameraConfiguration> config_;
std::map<const libcamera::Stream *, std::string> streamName_;
std::unique_ptr<BufferWriter> writer_;