Skip to content

devicemonitor: Only fail start() if no provider at all could be started

Sebastian Dröge requested to merge slomo/gstreamer:device-monitor-cleanup into main

Also refactor various internals of the monitor code:

  • Don't allow starting twice but just return directly when starting a second time.
  • Don't end up in an inconsistent state if call start() a second time while the monitor is starting up.
  • Remove complicated cookie code: it was not possible to add/remove filters while the monitor was started anyway so this was only useful in the very small time-window while starting the monitor or while getting the devices. Instead disallow adding/removing filters while the monitor is starting, and when getting devices work on a snapshot of providers/filters.

Fixes #667 (closed)

Merge request reports