diff options
author | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2002-10-24 12:04:14 +0000 |
---|---|---|
committer | Ronald S. Bultje <rbultje@ronald.bitfreak.net> | 2002-10-24 12:04:14 +0000 |
commit | 9c93c6f34113f70519158efaccc8c3add2849b87 (patch) | |
tree | 1bfdd3eda8372502b1cfc63d5f285366f77116ba /sys/v4l2 | |
parent | 945a43139b558088e45f21628c8f31388b223025 (diff) | |
download | gst-plugins-bad-9c93c6f34113f70519158efaccc8c3add2849b87.tar.gz gst-plugins-bad-9c93c6f34113f70519158efaccc8c3add2849b87.tar.bz2 gst-plugins-bad-9c93c6f34113f70519158efaccc8c3add2849b87.zip |
Use strerror() instead of sys_errlist[] (deprecated)
Original commit message from CVS:
Use strerror() instead of sys_errlist[] (deprecated)
Diffstat (limited to 'sys/v4l2')
-rw-r--r-- | sys/v4l2/v4l2-overlay_calls.c | 8 | ||||
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 38 | ||||
-rw-r--r-- | sys/v4l2/v4l2src_calls.c | 16 |
3 files changed, 31 insertions, 31 deletions
diff --git a/sys/v4l2/v4l2-overlay_calls.c b/sys/v4l2/v4l2-overlay_calls.c index 7eecb49d..a99250e4 100644 --- a/sys/v4l2/v4l2-overlay_calls.c +++ b/sys/v4l2/v4l2-overlay_calls.c @@ -57,14 +57,14 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element, switch (system(buff)) { case -1: gst_element_error(GST_ELEMENT(v4l2element), - "Could not start v4l-conf: %s", sys_errlist[errno]); + "Could not start v4l-conf: %s", strerror(errno)); g_free(buff); return FALSE; case 0: break; default: gst_element_error(GST_ELEMENT(v4l2element), - "v4l-conf failed to run correctly: %s", sys_errlist[errno]); + "v4l-conf failed to run correctly: %s", strerror(errno)); g_free(buff); return FALSE; } @@ -106,7 +106,7 @@ gst_v4l2_set_window (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_S_WIN, &vwin) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set the video window on device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -133,7 +133,7 @@ gst_v4l2_enable_overlay (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_PREVIEW, &doit) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to %s overlay display for device %s: %s", - enable?"enable":"disable", v4l2element->device, sys_errlist[errno]); + enable?"enable":"disable", v4l2element->device, strerror(errno)); return FALSE; } diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index 82ef14f4..19a0547a 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -51,7 +51,7 @@ gst_v4l2_get_capabilities (GstV4l2Element *v4l2element) if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Error getting %s capabilities: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -83,7 +83,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get no. %d in pixelformat enumeration for %s: %s", - n, v4l2element->device, sys_errlist[errno]); + n, v4l2element->device, strerror(errno)); return FALSE; } } @@ -102,7 +102,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get no. %d in input enumeration for %s: %s", - n, v4l2element->device, sys_errlist[errno]); + n, v4l2element->device, strerror(errno)); return FALSE; } } @@ -121,7 +121,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get no. %d in output enumeration for %s: %s", - n, v4l2element->device, sys_errlist[errno]); + n, v4l2element->device, strerror(errno)); return FALSE; } } @@ -140,7 +140,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get no. %d in norm enumeration for %s: %s", - n, v4l2element->device, sys_errlist[errno]); + n, v4l2element->device, strerror(errno)); return FALSE; } } @@ -160,7 +160,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get no. %d in control enumeration for %s: %s", - n, v4l2element->device, sys_errlist[errno]); + n, v4l2element->device, strerror(errno)); return FALSE; } } @@ -179,7 +179,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get no. %d in menu %d enumeration for %s: %s", - i, n, v4l2element->device, sys_errlist[errno]); + i, n, v4l2element->device, strerror(errno)); return FALSE; } } @@ -261,7 +261,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element) if (!GST_V4L2_IS_OPEN(v4l2element)) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to open device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); goto error; } @@ -335,7 +335,7 @@ gst_v4l2_get_norm (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, &standard) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get the current norm for device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -383,7 +383,7 @@ gst_v4l2_set_norm (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &standard->std) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set norm '%s' (%d) for device %s: %s", - standard->std.name, norm, v4l2element->device, sys_errlist[errno]); + standard->std.name, norm, v4l2element->device, strerror(errno)); return FALSE; } @@ -432,7 +432,7 @@ gst_v4l2_get_input (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get current input on device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -466,7 +466,7 @@ gst_v4l2_set_input (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set input %d on device %s: %s", - input, v4l2element->device, sys_errlist[errno]); + input, v4l2element->device, strerror(errno)); return FALSE; } @@ -515,7 +515,7 @@ gst_v4l2_get_output (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get current output on device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -549,7 +549,7 @@ gst_v4l2_set_output (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set output %d on device %s: %s", - output, v4l2element->device, sys_errlist[errno]); + output, v4l2element->device, strerror(errno)); return FALSE; } @@ -626,7 +626,7 @@ gst_v4l2_get_frequency (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQ, &n) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get current tuner frequency for device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -658,7 +658,7 @@ gst_v4l2_set_frequency (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQ, &n) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set tuner frequency to %lu for device %s: %s", - frequency, v4l2element->device, sys_errlist[errno]); + frequency, v4l2element->device, strerror(errno)); return FALSE; } @@ -684,7 +684,7 @@ gst_v4l2_signal_strength (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set signal strength for device %s: %s", - v4l2element->device, sys_errlist[errno]); + v4l2element->device, strerror(errno)); return FALSE; } @@ -806,7 +806,7 @@ gst_v4l2_get_attribute (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to get value for control %d on device %s: %s", - attribute_num, v4l2element->device, sys_errlist[errno]); + attribute_num, v4l2element->device, strerror(errno)); return FALSE; } @@ -844,7 +844,7 @@ gst_v4l2_set_attribute (GstV4l2Element *v4l2element, if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) { gst_element_error(GST_ELEMENT(v4l2element), "Failed to set value %d for control %d on device %s: %s", - value, attribute_num, v4l2element->device, sys_errlist[errno]); + value, attribute_num, v4l2element->device, strerror(errno)); return FALSE; } diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index a992e889..7a99b3d4 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -57,7 +57,7 @@ gst_v4l2src_queue_frame (GstV4l2Src *v4l2src, if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QBUF, &v4l2src->bufsettings) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Error queueing buffer %d on device %s: %s", - num, GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + num, GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } @@ -78,7 +78,7 @@ gst_v4l2src_sync_next_frame (GstV4l2Src *v4l2src, if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &v4l2src->bufsettings) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Error syncing on a buffer on device %s: %s", - GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } DEBUG("synced on frame %d", v4l2src->bufsettings.index); @@ -104,7 +104,7 @@ gst_v4l2src_get_capture (GstV4l2Src *v4l2src) if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_G_FMT, &v4l2src->format) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Failed to get pixel format for device %s: %s", - GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } @@ -145,7 +145,7 @@ gst_v4l2src_set_capture (GstV4l2Src *v4l2src, gst_element_error(GST_ELEMENT(v4l2src), "Failed to set pixel format to %s @ %dx%d for device %s: %s", fmt->description, width, height, - GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } @@ -177,7 +177,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src) if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Error requesting buffers (%d) for %s: %s", - v4l2src->breq.count, GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + v4l2src->breq.count, GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } @@ -207,7 +207,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src) if (GST_V4L2ELEMENT(v4l2src)->buffer[n] == MAP_FAILED) { gst_element_error(GST_ELEMENT(v4l2src), "Error mapping video buffer %d on device %s: %s", - n, GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + n, GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); GST_V4L2ELEMENT(v4l2src)->buffer[n] = NULL; return FALSE; } @@ -240,7 +240,7 @@ gst_v4l2src_capture_start (GstV4l2Src *v4l2src) if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMON, &n) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Error starting streaming capture for %s: %s", - GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } @@ -312,7 +312,7 @@ gst_v4l2src_capture_stop (GstV4l2Src *v4l2src) if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMOFF, &n) < 0) { gst_element_error(GST_ELEMENT(v4l2src), "Error stopping streaming capture for %s: %s", - GST_V4L2ELEMENT(v4l2src)->device, sys_errlist[errno]); + GST_V4L2ELEMENT(v4l2src)->device, strerror(errno)); return FALSE; } |