devicemonitor: Stop only the already started providers
authorPhilippe Normand <philn@igalia.com>
Wed, 21 Oct 2020 08:43:43 +0000 (09:43 +0100)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 22 Oct 2020 11:48:05 +0000 (11:48 +0000)
commit41677a526b83bb2493087af1d93b50c297cf97cd
tree7d6cd671c513b61b0f6a060d8b489eaa6c06b7b9
parent61703625f6212b0c8f2e450fd4ec7463e1e60493
devicemonitor: Stop only the already started providers

If a device provider fails to start (for instance the pulseaudio provider unable
to connect to the PulseAudio daemon) then the monitor should not keep track of
it in its `started` providers list. Otherwise a false positive critical warning
would be raised.

This patch also switches the started_count type from bool to int, for
consistency. This is a counter, after all.

API: gst_device_provider_is_started
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/679>
gst/gstdevicemonitor.c
gst/gstdeviceprovider.c
gst/gstdeviceprovider.h
tests/check/gst/gstdevice.c