pipewire/spa/plugins/libcamera
Barnabás Pőcze cc229d4b05 spa: libcamera: properly construct/deconstruct libcamera device impl
Previously, the "impl" object was never properly constructed or
destructed, but it more or less worked out since the memory was initialized
to zero bytes and each member had trivial constructors. Except std::shared_ptr,
but an all zero storage happened to be equivalent to a default constructed
shared_ptr.

However, there was the still the problem that the shared_ptr was never
destructed, so it kept the referenced `Camera` object alive, which lead
to memory leaks.

An additional, somewhat unrelated change is that the "props" struct
is removed, and the device identifier is now stored in an `std::string`.
The reason is that `CameraManager::get()` already takes a const std::string reference,
so an std::string must be constructed in any case, so we might as well
take advantage of that and use `std::string` in the "impl" object as well.

Furthermore, wrap the `impl` struct in an anonymous namespace
to avoid name resolution problems.
2022-09-15 11:17:47 +00:00
..
libcamera-client.c libcamera: work on rewrite 2021-11-03 17:49:10 +01:00
libcamera-device.cpp spa: libcamera: properly construct/deconstruct libcamera device impl 2022-09-15 11:17:47 +00:00
libcamera-manager.cpp spa: libcamera: remove main loop from manager 2022-09-15 11:17:47 +00:00
libcamera-manager.hpp libcamera: work on rewrite 2021-11-03 17:49:10 +01:00
libcamera-source.cpp spa: libcamera: indent with tabs instead of spaces 2022-09-15 11:17:47 +00:00
libcamera-utils.cpp spa: libcamera: indent with tabs instead of spaces 2022-09-15 11:17:47 +00:00
libcamera.c libcamera: work on rewrite 2021-11-03 17:49:10 +01:00
libcamera.h libcamera: work on rewrite 2021-11-03 17:49:10 +01:00
meson.build treewide: meson.build: use dependency variable for SPA 2021-12-28 18:34:06 +01:00