libcamera: camera: Inherit from Extensible

Use the d-pointer infrastructure offered by the Extensible class to
replace the custom implementation.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>
This commit is contained in:
Laurent Pinchart 2020-09-21 04:06:34 +03:00
parent 549d982f61
commit 68d2c41835
2 changed files with 80 additions and 52 deletions

View file

@ -13,6 +13,7 @@
#include <string>
#include <libcamera/controls.h>
#include <libcamera/extensible.h>
#include <libcamera/object.h>
#include <libcamera/request.h>
#include <libcamera/signal.h>
@ -70,8 +71,11 @@ protected:
std::vector<StreamConfiguration> config_;
};
class Camera final : public Object, public std::enable_shared_from_this<Camera>
class Camera final : public Object, public std::enable_shared_from_this<Camera>,
public Extensible
{
LIBCAMERA_DECLARE_PRIVATE(Camera)
public:
static std::shared_ptr<Camera> create(PipelineHandler *pipe,
const std::string &id,
@ -107,9 +111,6 @@ private:
const std::set<Stream *> &streams);
~Camera();
class Private;
std::unique_ptr<Private> p_;
friend class PipelineHandler;
void disconnect();
void requestComplete(Request *request);