mirror of
https://gitlab.freedesktop.org/pipewire/pipewire.git
synced 2025-10-31 22:25:38 -04:00
spa: libcamera: manage libcamera::CameraManager via a shared_ptr
Using a shared_ptr removes the need for manually calling `libcamera_manager_release()` to drop the reference as it is done automatically whenever the shared_ptr is destroyed or reset.
This commit is contained in:
parent
330686d3aa
commit
13357fec20
4 changed files with 38 additions and 78 deletions
|
|
@ -22,11 +22,8 @@
|
|||
* DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <libcamera/camera_manager.h>
|
||||
|
||||
#include <linux/media.h>
|
||||
|
||||
using namespace libcamera;
|
||||
|
||||
CameraManager *libcamera_manager_acquire(void);
|
||||
int libcamera_manager_release(CameraManager *manager);
|
||||
std::shared_ptr<libcamera::CameraManager> libcamera_manager_acquire(int& res);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue