diff options
author | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-01-26 20:43:22 +0100 |
---|---|---|
committer | Niklas Söderlund <niklas.soderlund@ragnatech.se> | 2019-02-01 08:11:33 +0100 |
commit | 75476f86d2eb5074e3e6713b193f7a31a6b8ac52 (patch) | |
tree | 5deee8cb0d32fcef13b4b08889df5871fc50634c /include | |
parent | ff96eb2ebb714cef37de8e2ff19c3e56ba8bc91b (diff) |
libcamera: camera: extend camera object to support streams
A camera consists of one or more video streams originating from the same
video source. The different streams could for example have access to
different hardware blocks in the video pipeline and therefore be able to
process the video source in different ways.
All static information describing each stream need to be recorded at
camera creation. After a camera is created an application can retrieve
the static information about its streams at any time.
Update all pipeline handlers to register one stream per camera, this
will be extended in the future for some of the pipelines.
Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
Reviewed-by: Kieran Bingham <kieran.bingham@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/libcamera/camera.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h index a2635402..cee96e9a 100644 --- a/include/libcamera/camera.h +++ b/include/libcamera/camera.h @@ -15,12 +15,14 @@ namespace libcamera { class PipelineHandler; +class Stream; class Camera final { public: static std::shared_ptr<Camera> create(PipelineHandler *pipe, - const std::string &name); + const std::string &name, + const std::vector<Stream *> &streams); Camera(const Camera &) = delete; Camera &operator=(const Camera &) = delete; @@ -32,6 +34,8 @@ public: int acquire(); void release(); + const std::vector<Stream *> &streams() const; + private: Camera(PipelineHandler *pipe, const std::string &name); ~Camera(); @@ -41,6 +45,7 @@ private: std::shared_ptr<PipelineHandler> pipe_; std::string name_; + std::vector<Stream *> streams_; bool acquired_; }; |