[libcamera-devel,v4,1/5] HACK: libcamera: Camera public destructor
diff mbox series

Message ID 20220204133814.303217-2-tomi.valkeinen@ideasonboard.com
State Superseded
Headers show
Series
  • Python bindings
Related show

Commit Message

Tomi Valkeinen Feb. 4, 2022, 1:38 p.m. UTC
pybind11 needs a public destructor for Camera to be able to manage the
shared_ptr. It's not clear why this is needed, and can it be fixed in
pybind11.

Looks like there's a suggested fix, which has not been merged:

https://github.com/pybind/pybind11/pull/2067

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
---
 include/libcamera/camera.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch
diff mbox series

diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
index 5bb06584..e753cd23 100644
--- a/include/libcamera/camera.h
+++ b/include/libcamera/camera.h
@@ -114,12 +114,12 @@  public:
 	int start(const ControlList *controls = nullptr);
 	int stop();
 
+	~Camera();
 private:
 	LIBCAMERA_DISABLE_COPY(Camera)
 
 	Camera(std::unique_ptr<Private> d, const std::string &id,
 	       const std::set<Stream *> &streams);
-	~Camera();
 
 	friend class PipelineHandler;
 	void disconnect();