[libcamera-devel] [RFC v2 1/4] hack: Camera public destructor
Laurent Pinchart
laurent.pinchart at ideasonboard.com
Mon Nov 30 00:27:08 CET 2020
Hi Tomi,
Thank you for the patch.
On Fri, Nov 27, 2020 at 03:37:35PM +0200, Tomi Valkeinen wrote:
> Not clear why we need this with pybind11...
We'll have to figure it out :-)
I've been considering a while ago handling camera instances a bit
differently, with a facade object create by libcamera (and returned a
unique pointer), with a reference-counted (through shared_ptr) backend
object not visible to applications. We could implement this, either in
the libcamera core, or in the python bindings, if it helps.
> Signed-off-by: Tomi Valkeinen <tomi.valkeinen at iki.fi>
> ---
> include/libcamera/camera.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/include/libcamera/camera.h b/include/libcamera/camera.h
> index 5c5f1a05..d8e0bdbc 100644
> --- a/include/libcamera/camera.h
> +++ b/include/libcamera/camera.h
> @@ -106,10 +106,10 @@ public:
> int start();
> int stop();
>
> + ~Camera();
> private:
> Camera(PipelineHandler *pipe, const std::string &id,
> const std::set<Stream *> &streams);
> - ~Camera();
>
> friend class PipelineHandler;
> void disconnect();
--
Regards,
Laurent Pinchart
More information about the libcamera-devel
mailing list