[vlc-commits] udev: do not list ALSA SD if PulseAudio SD exists (refs #7221)
Rémi Denis-Courmont
git at videolan.org
Wed Jul 25 16:25:54 CEST 2012
vlc/vlc-2.0 | branch: master | Rémi Denis-Courmont <remi at remlab.net> | Wed Jul 25 17:16:10 2012 +0300| [c85689ef654f8f75940030924dc1528acd457cac] | committer: Rémi Denis-Courmont
udev: do not list ALSA SD if PulseAudio SD exists (refs #7221)
(cherry picked from commit fbe71a6680fd1b91ce3a69b43f250b1704ff93d0)
> http://git.videolan.org/gitweb.cgi/vlc/vlc-2.0.git/?a=commit;h=c85689ef654f8f75940030924dc1528acd457cac
---
modules/services_discovery/udev.c | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/modules/services_discovery/udev.c b/modules/services_discovery/udev.c
index 56b42e2..826801c 100644
--- a/modules/services_discovery/udev.c
+++ b/modules/services_discovery/udev.c
@@ -24,16 +24,19 @@
# include <config.h>
#endif
+#include <errno.h>
+#include <search.h>
+#include <poll.h>
+
#include <libudev.h>
+
#include <vlc_common.h>
#include <vlc_services_discovery.h>
#include <vlc_plugin.h>
-#include <vlc_url.h>
-#ifdef HAVE_SEARCH_H
-# include <search.h>
+#ifdef HAVE_ALSA
+# include <vlc_modules.h>
#endif
-#include <poll.h>
-#include <errno.h>
+#include <vlc_url.h>
static int OpenV4L (vlc_object_t *);
#ifdef HAVE_ALSA
@@ -91,8 +94,9 @@ static int vlc_sd_probe_Open (vlc_object_t *obj)
vlc_sd_probe_Add (probe, "v4l{longname=\"Video capture\"}",
N_("Video capture"), SD_CAT_DEVICES);
#ifdef HAVE_ALSA
- vlc_sd_probe_Add (probe, "alsa{longname=\"Audio capture\"}",
- N_("Audio capture"), SD_CAT_DEVICES);
+ if (!module_exists ("pulselist"))
+ vlc_sd_probe_Add (probe, "alsa{longname=\"Audio capture\"}",
+ N_("Audio capture"), SD_CAT_DEVICES);
#endif
vlc_sd_probe_Add (probe, "disc{longname=\"Discs\"}", N_("Discs"),
SD_CAT_DEVICES);
More information about the vlc-commits
mailing list