summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-07-23 00:19:09 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2021-08-03 23:05:09 +0300
commita0143dc8939829639c7c4f1e023dae93be578744 (patch)
tree765489f448e1538b24968adbda7ffe1d39470926 /src
parentc46f82fd1bd23f6f5aef71b82ff90486898458c9 (diff)
libcamera: camera: Move Camera::Private to header file
The Camera::Private class is defined in camera.cpp. To prepare for allowing it to be subclassed by pipeline handlers, move it to a new internal/camera.h header. The \file comment block in camera.cpp now needs to explicitly tell which camera.h file it refers to. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Reviewed-by: Jacopo Mondi <jacopo@jmondi.org>
Diffstat (limited to 'src')
-rw-r--r--src/libcamera/camera.cpp40
1 files changed, 2 insertions, 38 deletions
diff --git a/src/libcamera/camera.cpp b/src/libcamera/camera.cpp
index c126b492..4b5bc891 100644
--- a/src/libcamera/camera.cpp
+++ b/src/libcamera/camera.cpp
@@ -18,10 +18,11 @@
#include <libcamera/request.h>
#include <libcamera/stream.h>
+#include "libcamera/internal/camera.h"
#include "libcamera/internal/pipeline_handler.h"
/**
- * \file camera.h
+ * \file libcamera/camera.h
* \brief Camera device handling
*
* \page camera-model Camera Model
@@ -331,43 +332,6 @@ std::size_t CameraConfiguration::size() const
* \brief The vector of stream configurations
*/
-class Camera::Private : public Extensible::Private
-{
- LIBCAMERA_DECLARE_PUBLIC(Camera)
-
-public:
- enum State {
- CameraAvailable,
- CameraAcquired,
- CameraConfigured,
- CameraStopping,
- CameraRunning,
- };
-
- Private(PipelineHandler *pipe, const std::string &id,
- const std::set<Stream *> &streams);
- ~Private();
-
- bool isRunning() const;
- int isAccessAllowed(State state, bool allowDisconnected = false,
- const char *from = __builtin_FUNCTION()) const;
- int isAccessAllowed(State low, State high,
- bool allowDisconnected = false,
- const char *from = __builtin_FUNCTION()) const;
-
- void disconnect();
- void setState(State state);
-
- std::shared_ptr<PipelineHandler> pipe_;
- std::string id_;
- std::set<Stream *> streams_;
- std::set<const Stream *> activeStreams_;
-
-private:
- bool disconnected_;
- std::atomic<State> state_;
-};
-
Camera::Private::Private(PipelineHandler *pipe,
const std::string &id,
const std::set<Stream *> &streams)