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 5f3c3bb051d80f127e585d989fbc63c12876c317..e5b21c3edd53d6447d226f06138b7f935c36c186 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 0f92c4ee6cc6bcc9b3894c9fc0e65db05540bb89..285ac26e04381609f5c9d106e84061417fc731ce 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);