pipewire/spa/plugins
Barnabás Pőcze 7b4713ec73 spa: libcamera: manager: keep libcamera::CameraManager
At the moment, the camera manager shared pointer is released when the last
listener is removed, and recreated when the first listener is added. This
is the same behaviour that the alsa and v4l2 monitors implement with their
respective udev, inotify monitors.

However, for `libcamera::CameraManager`, this is likely not the best way
for multiple reasons:

  (a) it is a complex object with significant construction and starting cost,
      which includes starting threads and usually loading shared libraries;
  (b) usually one listener is added right after creating, and it is removed
      right before destruction, in which there are real no advantages;
  (c) the camera manager, being a shared resource, might very well be kept
      alive by some other component, in which case there is again not much
      real benefit.

So simplify the code by getting a camera manager reference at the beginning
and keeping it until the libcamera monitor is destroyed.

This also fixes a race condition where a hot-plugged camera might not have
been detected if the libcamera event was emitted between these two:

  collect_existing_devices(impl);
  start_monitor(impl);

(cherry picked from commit 8614fc45f8)
2025-09-26 09:58:10 +02:00
..
aec spa: aec: webrtc: Expose echo canceller mobile_mode 2025-07-09 13:29:23 -04:00
alsa alsa: report extra latency for FireWire drivers 2025-09-10 10:28:42 +02:00
audioconvert audioconvert: add log topic for resampler 2025-09-10 10:28:57 +02:00
audiomixer audiomixer: set change mask correctly 2025-09-10 10:20:34 +02:00
audiotestsrc spa: audiotestsrc: Validate loop and system before using them 2024-10-23 08:25:30 -04:00
avb json: add helper function to parse channel positions 2024-09-18 09:54:34 +02:00
bluez5 bluez5: aac: fix for A2DP v1.4 using rfa bits for more channels 2025-07-10 17:17:22 +03:00
control control: fix event compare function 2025-09-17 10:29:15 +02:00
ffmpeg spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
filter-graph filter-graph: fix index off by one in dsp_delay_c 2025-07-22 15:54:48 +02:00
jack spa: use log topics everywhere 2024-03-11 18:45:21 +02:00
libcamera spa: libcamera: manager: keep libcamera::CameraManager 2025-09-26 09:58:10 +02:00
support Revert "loop: don't call the hooks around blocking wait" 2025-06-26 12:45:29 +02:00
test spa: make the wave, pattern and ditherType Int 2025-06-13 11:53:42 +02:00
v4l2 treewide: map SPA_PROP_exposure to V4L2_CID_EXPOSURE_ABSOLUTE 2025-09-10 10:28:08 +02:00
videoconvert adapter: use the right default when filtering default 2025-06-03 10:54:07 +02:00
videotestsrc Port videotestsrc to LoopUtils 2024-07-01 15:28:14 +00:00
volume spa: fix volume plugin compilation 2024-06-18 15:44:26 +02:00
vulkan spa: vulkan: simplify memcpy() call 2024-12-14 23:28:43 +01:00
meson.build filter-chain: move the filter-graph to plugins 2024-11-13 11:12:06 +01:00