summaryrefslogtreecommitdiff
path: root/src/libcamera/pipeline/vimc.cpp
diff options
context:
space:
mode:
authorNiklas Söderlund <niklas.soderlund@ragnatech.se>2019-01-22 16:31:39 +0100
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-01-24 22:24:11 +0200
commit5b02e03199b79165086135236d8fb9b2c673aae1 (patch)
tree84fe12868edf1c9a50d19a96455138975cb751af /src/libcamera/pipeline/vimc.cpp
parenta29b7fc7d5b3cca3738728961cb2f5c9600cc960 (diff)
libcamera: camera: Associate cameras with their pipeline handler
The PipelineHandler which creates a Camera is responsible for serving any operation requested by the user. In order forward the public API calls, the camera needs to store a reference to its pipeline handler. Signed-off-by: Niklas Söderlund <niklas.soderlund@ragnatech.se> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- Changes since v1: - Create pipeline handlers is shared pointers, make them inherit from std::enable_shared_from_this<> and stored them in shared pointers.
Diffstat (limited to 'src/libcamera/pipeline/vimc.cpp')
-rw-r--r--src/libcamera/pipeline/vimc.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp
index f12d007c..68bfe9b1 100644
--- a/src/libcamera/pipeline/vimc.cpp
+++ b/src/libcamera/pipeline/vimc.cpp
@@ -57,14 +57,7 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator)
dev_->acquire();
- /*
- * NOTE: A more complete Camera implementation could
- * be passed the MediaDevice(s) it controls here or
- * a reference to the PipelineHandler. Which method
- * will be chosen depends on how the Camera
- * object is modeled.
- */
- std::shared_ptr<Camera> camera = Camera::create("Dummy VIMC Camera");
+ std::shared_ptr<Camera> camera = Camera::create(this, "Dummy VIMC Camera");
manager_->addCamera(std::move(camera));
return true;