sys/v4l/v4l_calls.c: check for and throw RESOURCE_BUSY
authorThomas Vander Stichele <thomas@apestaart.org>
Sat, 28 Jan 2006 16:35:47 +0000 (16:35 +0000)
committerThomas Vander Stichele <thomas@apestaart.org>
Sat, 28 Jan 2006 16:35:47 +0000 (16:35 +0000)
Original commit message from CVS:

* sys/v4l/v4l_calls.c: (gst_v4l_open):
check for and throw RESOURCE_BUSY

ChangeLog
sys/v4l/v4l_calls.c

index 5f3c3bb..e5b21c3 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-01-28  Thomas Vander Stichele  <thomas at apestaart dot org>
+
+       * sys/v4l/v4l_calls.c: (gst_v4l_open):
+         check for and throw RESOURCE_BUSY
+
 2006-01-27  David Schleef  <ds@schleef.org>
 
        * gst/videoscale/vs_scanline.c: Oops, *that's* why I never
index 0f92c4e..285ac26 100644 (file)
@@ -168,6 +168,12 @@ gst_v4l_open (GstV4lElement * v4lelement)
           (_("Device \"%s\" does not exist."), v4lelement->videodev), (NULL));
       return FALSE;
     }
+    if (errno == EBUSY) {
+      GST_ELEMENT_ERROR (v4lelement, RESOURCE, BUSY,
+          (_("Device \"%s\" is already being used."), v4lelement->videodev),
+          (NULL));
+      return FALSE;
+    }
     GST_ELEMENT_ERROR (v4lelement, RESOURCE, OPEN_READ_WRITE,
         (_("Could not open device \"%s\" for reading and writing."),
             v4lelement->videodev), GST_ERROR_SYSTEM);