diff options
author | Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> | 2023-05-30 15:01:33 +0300 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2023-05-31 19:48:02 +0300 |
commit | ad4719c10c6a401a30784c2bfc83345b1af60b31 (patch) | |
tree | 948a9db737211c7137c84907105c842bf003878f /test/gstreamer/gstreamer_test.h | |
parent | 51dc505d63fb2fd1255bcc71b5927488aadaf78c (diff) |
py: Move to mainline pybind11 version
We are using pybind11 'smart_holder' branch to solve the Camera
destructor issue (see the comment in this patch, or the commit
that originally added Python bindings support).
As it would be very nice to use the mainline pybind11 (which is packaged
in distributions), this patch adds a workaround allowing us to move to
the mainline pybind11 version.
The workaround is simply creating a custom holder class
(PyCameraSmartPtr), used only for the Camera, which wraps around the
shared_ptr. This makes the compiler happy.
Moving to mainline pybind11 is achieved with:
- Change the pybind11 wrap to point to the mainline pybdind11 version
- Tell pybind11 to always use shared_ptr<> as the holder for
PyCameraManager, as we use the singleton pattern for the
PyCameraManager, and using shared_ptr<> to manage it is a requirement
- Tell pybind11 to always use PyCameraSmartPtr<> as the holder for Camera
- Change the meson.build file to use a system-installed pybind11
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/gstreamer/gstreamer_test.h')
0 files changed, 0 insertions, 0 deletions