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.
This commit is contained in:
parent
a29b7fc7d5
commit
5b02e03199
9 changed files with 44 additions and 31 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue