diff options
author | Jacopo Mondi <jacopo@jmondi.org> | 2018-12-26 11:15:55 +0100 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2019-01-02 12:59:04 +0200 |
commit | d83269aae0f7449a710d255735d1d26ee849d240 (patch) | |
tree | 1fc5e54b0e4dadc2daf7d75c1382f611ffe9a759 /src/libcamera/pipeline/vimc.cpp | |
parent | d4af90d72901b1c6c2609ea8a3c0da76facf6c2e (diff) |
libcamera: device_enumerator: Use MediaDevice
Replace usage of the DeviceInfo class with MediaDevice in the
DeviceEnumerator and remove the DeviceInfo class.
Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'src/libcamera/pipeline/vimc.cpp')
-rw-r--r-- | src/libcamera/pipeline/vimc.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp index b1e2d32c..720d9c20 100644 --- a/src/libcamera/pipeline/vimc.cpp +++ b/src/libcamera/pipeline/vimc.cpp @@ -8,6 +8,7 @@ #include <libcamera/camera.h> #include "device_enumerator.h" +#include "media_device.h" #include "pipeline_handler.h" namespace libcamera { @@ -24,12 +25,12 @@ public: Camera *camera(unsigned int id) final; private: - DeviceInfo *info_; + MediaDevice *dev_; Camera *camera_; }; PipeHandlerVimc::PipeHandlerVimc() - : info_(nullptr), camera_(nullptr) + : dev_(nullptr), camera_(nullptr) { } @@ -38,8 +39,8 @@ PipeHandlerVimc::~PipeHandlerVimc() if (camera_) camera_->put(); - if (info_) - info_->release(); + if (dev_) + dev_->release(); } unsigned int PipeHandlerVimc::count() @@ -69,15 +70,15 @@ bool PipeHandlerVimc::match(DeviceEnumerator *enumerator) dm.add("RGB/YUV Input"); dm.add("Scaler"); - info_ = enumerator->search(dm); - if (!info_) + dev_ = enumerator->search(dm); + if (!dev_) return false; - info_->acquire(); + dev_->acquire(); /* * NOTE: A more complete Camera implementation could - * be passed the DeviceInfo(s) it controls here or + * 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. |