Don't block during probing...
authorRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 13 Mar 2004 05:38:13 +0000 (05:38 +0000)
committerRonald S. Bultje <rbultje@ronald.bitfreak.net>
Sat, 13 Mar 2004 05:38:13 +0000 (05:38 +0000)
Original commit message from CVS:
* ext/alsa/gstalsa.c: (gst_alsa_class_probe_devices):
* sys/oss/gstosselement.c: (gst_osselement_class_probe_devices):
Don't block during probing...

ChangeLog
ext/alsa/gstalsa.c

index 674ca71c237900ede8cdec781965620d2c1a9842..a9847c1fbb092a1ff9c2edb093c0bc045dd9c1d3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2004-03-13  Ronald Bultje  <rbultje@ronald.bitfreak.net>
+
+       * ext/alsa/gstalsa.c: (gst_alsa_class_probe_devices):
+       * sys/oss/gstosselement.c: (gst_osselement_class_probe_devices):
+         Don't block during probing...
+
 2004-03-12  Ronald Bultje  <rbultje@ronald.bitfreak.net>
 
        * ext/alsa/gstalsa.c: (gst_alsa_get_type), (gst_alsa_class_init),
index d5e03278f806616c79bf8cca74172a90a219114b..42a402057de0679586200952809fb3ef62376583 100644 (file)
@@ -348,7 +348,8 @@ gst_alsa_class_probe_devices (GstAlsaClass *klass,
     for (num = 0; num < MAX_DEVICES; num++) {
       dev = g_strdup_printf ("hw:%d", num);
 
-      if (!(res = snd_pcm_open (&pcm, dev, 0, 0))) {
+      if (!(res = snd_pcm_open (&pcm, dev, 0, SND_PCM_NONBLOCK)) ||
+          res == -EBUSY) {
         klass->devices = g_list_append (klass->devices, dev);
 
         snd_pcm_close (pcm);