diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-29 23:20:45 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-29 23:20:45 +0000 |
commit | 51e5863a97bdfc80b5c2024236f990210f4541f8 (patch) | |
tree | a405601ca4a288858cdb43a438f31d5e5969674b /sys | |
parent | 9925c8d04217e7e41993ee98fe77ddd02eb857a1 (diff) |
GST_ELEMENT_ERROR
Original commit message from CVS:
GST_ELEMENT_ERROR
Diffstat (limited to 'sys')
-rw-r--r-- | sys/oss/gstosselement.c | 12 | ||||
-rw-r--r-- | sys/oss/gstosssink.c | 2 | ||||
-rw-r--r-- | sys/oss/gstosssrc.c | 6 | ||||
-rw-r--r-- | sys/v4l2/gstv4l2src.c | 2 | ||||
-rw-r--r-- | sys/v4l2/v4l2-overlay_calls.c | 8 | ||||
-rw-r--r-- | sys/v4l2/v4l2_calls.c | 40 | ||||
-rw-r--r-- | sys/v4l2/v4l2_calls.h | 10 | ||||
-rw-r--r-- | sys/v4l2/v4l2src_calls.c | 22 |
8 files changed, 51 insertions, 51 deletions
diff --git a/sys/oss/gstosselement.c b/sys/oss/gstosselement.c index 1219cc4f7..e044ba925 100644 --- a/sys/oss/gstosselement.c +++ b/sys/oss/gstosselement.c @@ -698,31 +698,31 @@ gst_osselement_open_audio (GstOssElement *oss) if (oss->fd < 0) { switch (errno) { case EBUSY: - gst_element_error (oss, RESOURCE, BUSY, + GST_ELEMENT_ERROR (oss, RESOURCE, BUSY, (_("OSS device \"%s\" is already in use by another program"), oss->device), NULL); break; case EACCES: case ETXTBSY: if (mode == GST_OSSELEMENT_WRITE) - gst_element_error (oss, RESOURCE, OPEN_WRITE, + GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE, (_("Could not access device \"%s\", check its permissions"), oss->device), GST_ERROR_SYSTEM); else - gst_element_error (oss, RESOURCE, OPEN_READ, + GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ, (_("Could not access device \"%s\", check its permissions"), oss->device), GST_ERROR_SYSTEM); break; case ENXIO: case ENODEV: case ENOENT: - gst_element_error (oss, RESOURCE, NOT_FOUND, + GST_ELEMENT_ERROR (oss, RESOURCE, NOT_FOUND, (_("Device \"%s\" does not exist"), oss->device), GST_ERROR_SYSTEM); break; default: /* FIXME: strerror is not threadsafe */ if (mode == GST_OSSELEMENT_WRITE) - gst_element_error (oss, RESOURCE, OPEN_WRITE, + GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE, (_("Could not open device \"%s\" for writing"), oss->device), GST_ERROR_SYSTEM); else - gst_element_error (oss, RESOURCE, OPEN_READ, + GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ, (_("Could not open device \"%s\" for reading"), oss->device), GST_ERROR_SYSTEM); break; } diff --git a/sys/oss/gstosssink.c b/sys/oss/gstosssink.c index 497c595a3..ebb92ca1c 100644 --- a/sys/oss/gstosssink.c +++ b/sys/oss/gstosssink.c @@ -350,7 +350,7 @@ gst_osssink_chain (GstPad *pad, GstData *_data) if (!GST_OSSELEMENT (osssink)->bps) { gst_buffer_unref (buf); - gst_element_error (osssink, CORE, NEGOTIATION, NULL, ("format wasn't negotiated before chain function")); + GST_ELEMENT_ERROR (osssink, CORE, NEGOTIATION, NULL, ("format wasn't negotiated before chain function")); return; } diff --git a/sys/oss/gstosssrc.c b/sys/oss/gstosssrc.c index fbe04cc2e..c927605fc 100644 --- a/sys/oss/gstosssrc.c +++ b/sys/oss/gstosssrc.c @@ -305,13 +305,13 @@ gst_osssrc_get (GstPad *pad) /* nothing was negotiated, we can decide on a format */ if (!gst_osssrc_negotiate (pad)) { gst_buffer_unref (buf); - gst_element_error (src, CORE, NEGOTIATION, NULL, NULL); + GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, NULL, NULL); return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } } if (GST_OSSELEMENT (src)->bps == 0) { gst_buffer_unref (buf); - gst_element_error (src, CORE, NEGOTIATION, NULL, + GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, NULL, ("format wasn't negotiated before chain function")); return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } @@ -320,7 +320,7 @@ gst_osssrc_get (GstPad *pad) src->buffersize); if (readbytes < 0) { gst_buffer_unref (buf); - gst_element_error (src, RESOURCE, READ, NULL, GST_ERROR_SYSTEM); + GST_ELEMENT_ERROR (src, RESOURCE, READ, NULL, GST_ERROR_SYSTEM); return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT)); } diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c index d0b480f9e..697fe4211 100644 --- a/sys/v4l2/gstv4l2src.c +++ b/sys/v4l2/gstv4l2src.c @@ -817,7 +817,7 @@ gst_v4l2src_get (GstPad *pad) if (v4l2src->use_fixed_fps && (fps = gst_v4l2src_get_fps(v4l2src)) == 0) { - gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL, ("could not get frame rate for element")); + GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("could not get frame rate for element")); return NULL; } diff --git a/sys/v4l2/v4l2-overlay_calls.c b/sys/v4l2/v4l2-overlay_calls.c index b455ba3c5..4e5fb9f03 100644 --- a/sys/v4l2/v4l2-overlay_calls.c +++ b/sys/v4l2/v4l2-overlay_calls.c @@ -59,7 +59,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element) switch (system(buff)) { case -1: - gst_element_error (v4l2element, RESOURCE, FAILED, + GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED, (_("Could not start v4l-conf")), GST_ERROR_SYSTEM); g_free(buff); @@ -67,7 +67,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element) case 0: break; default: - gst_element_error (v4l2element, RESOURCE, FAILED, + GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED, (_("Executing v4l-conf failed")), GST_ERROR_SYSTEM); g_free(buff); @@ -112,7 +112,7 @@ gst_v4l2_set_window (GstElement *element, fmt.fmt.win.bitmap = NULL; if (ioctl(v4l2element->video_fd, VIDIOC_S_FMT, &fmt) < 0) { - gst_element_error (v4l2element, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, NULL, ("Failed to set the video window: %s", g_strerror (errno))); return FALSE; } @@ -138,7 +138,7 @@ gst_v4l2_enable_overlay (GstV4l2Element *v4l2element, GST_V4L2_CHECK_OVERLAY(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_OVERLAY, &doit) < 0) { - gst_element_error (v4l2element, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (v4l2element, RESOURCE, TOO_LAZY, NULL, ("Failed to %s overlay display: %s", enable?"enable":"disable", g_strerror (errno))); return FALSE; diff --git a/sys/v4l2/v4l2_calls.c b/sys/v4l2/v4l2_calls.c index 1ef03f918..c206d9870 100644 --- a/sys/v4l2/v4l2_calls.c +++ b/sys/v4l2/v4l2_calls.c @@ -55,7 +55,7 @@ gst_v4l2_get_capabilities (GstV4l2Element *v4l2element) GST_V4L2_CHECK_OPEN(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Error getting %s capabilities: %s", v4l2element->device, g_strerror(errno))); return FALSE; @@ -99,7 +99,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) if (errno == EINVAL) break; /* end of enumeration */ else { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get %d in input enumeration for %s: %s", n, v4l2element->device, g_strerror (errno))); @@ -122,7 +122,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) vtun.index = input.tuner; if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &vtun) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get tuner %d settings on %s: %s", input.tuner, v4l2element->device, @@ -161,7 +161,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) if (errno == EINVAL) break; /* end of enumeration */ else { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get %d in output enumeration for %s: %s", n, v4l2element->device, g_strerror (errno))); @@ -200,7 +200,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) if (errno == EINVAL) break; /* end of enumeration */ else { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get %d in norm enumeration for %s: %s", n, v4l2element->device, g_strerror (errno))); @@ -237,7 +237,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) else break; } else { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get %d in control enumeration for %s: %s", n, v4l2element->device, g_strerror (errno))); @@ -289,7 +289,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element) if (errno == EINVAL) break; /* end of enumeration */ else { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get %d in menu enumeration for %s: %s", n, v4l2element->device, g_strerror (errno))); @@ -409,7 +409,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element) /* open the device */ v4l2element->video_fd = open(v4l2element->device, O_RDWR); if (!GST_V4L2_IS_OPEN(v4l2element)) { - gst_element_error (v4l2element, RESOURCE, OPEN_READ_WRITE, + GST_ELEMENT_ERROR (v4l2element, RESOURCE, OPEN_READ_WRITE, (_("Could not open device \"%s\" for reading and writing"), v4l2element->device), GST_ERROR_SYSTEM); goto error; @@ -423,7 +423,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element) /* do we need to be a capture device? */ if (GST_IS_V4L2SRC(v4l2element) && !(v4l2element->vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { - gst_element_error (v4l2element, RESOURCE, NOT_FOUND, + GST_ELEMENT_ERROR (v4l2element, RESOURCE, NOT_FOUND, (_("Device \"%s\" is not a capture device"), v4l2element->device), ("Capabilities: 0x%x", v4l2element->vcap.capabilities)); goto error; @@ -492,7 +492,7 @@ gst_v4l2_get_norm (GstV4l2Element *v4l2element, GST_V4L2_CHECK_OPEN(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, norm) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get the current norm for device %s: %s", v4l2element->device, g_strerror(errno))); return FALSE; @@ -517,7 +517,7 @@ gst_v4l2_set_norm (GstV4l2Element *v4l2element, GST_V4L2_CHECK_NOT_ACTIVE(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &norm) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to set norm 0x%llx for device %s: %s", norm, v4l2element->device, g_strerror(errno))); return FALSE; @@ -543,7 +543,7 @@ gst_v4l2_get_input (GstV4l2Element *v4l2element, GST_V4L2_CHECK_OPEN(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get current input on device %s: %s", v4l2element->device, g_strerror(errno))); return FALSE; @@ -570,7 +570,7 @@ gst_v4l2_set_input (GstV4l2Element *v4l2element, GST_V4L2_CHECK_NOT_ACTIVE(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to set input %d on device %s: %s", input, v4l2element->device, g_strerror(errno))); return FALSE; @@ -596,7 +596,7 @@ gst_v4l2_get_output (GstV4l2Element *v4l2element, GST_V4L2_CHECK_OPEN(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get current output on device %s: %s", v4l2element->device, g_strerror(errno))); return FALSE; @@ -623,7 +623,7 @@ gst_v4l2_set_output (GstV4l2Element *v4l2element, GST_V4L2_CHECK_NOT_ACTIVE(v4l2element); if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to set output %d on device %s: %s", output, v4l2element->device, g_strerror(errno))); return FALSE; @@ -651,7 +651,7 @@ gst_v4l2_get_frequency (GstV4l2Element *v4l2element, freq.tuner = tunernum; if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQUENCY, &freq) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get current tuner frequency for device %s: %s", v4l2element->device, g_strerror(errno))); return FALSE; @@ -686,7 +686,7 @@ gst_v4l2_set_frequency (GstV4l2Element *v4l2element, freq.frequency = frequency; if (ioctl(v4l2element->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to set tuner frequency to %lu for device %s: %s", frequency, v4l2element->device, g_strerror(errno))); return FALSE; @@ -714,7 +714,7 @@ gst_v4l2_signal_strength (GstV4l2Element *v4l2element, tuner.index = tunernum; if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get signal strength for device %s: %s", v4l2element->device, g_strerror(errno))); return FALSE; @@ -746,7 +746,7 @@ gst_v4l2_get_attribute (GstV4l2Element *v4l2element, control.id = attribute_num; if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to get value for control %d on device %s: %s", attribute_num, v4l2element->device, g_strerror(errno))); return FALSE; @@ -779,7 +779,7 @@ gst_v4l2_set_attribute (GstV4l2Element *v4l2element, control.value = value; if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) { - gst_element_error (v4l2element, RESOURCE, SETTINGS, (""), + GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), ("Failed to set value %d for control %d on device %s: %s", value, attribute_num, v4l2element->device, g_strerror(errno))); return FALSE; diff --git a/sys/v4l2/v4l2_calls.h b/sys/v4l2/v4l2_calls.h index c40100d97..fecfa93fc 100644 --- a/sys/v4l2/v4l2_calls.h +++ b/sys/v4l2/v4l2_calls.h @@ -39,7 +39,7 @@ #define GST_V4L2_CHECK_OPEN(element) \ if (!GST_V4L2_IS_OPEN(element)) \ { \ - gst_element_error (element, RESOURCE, TOO_LAZY, \ + GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \ (_("Device is not open")), NULL); \ return FALSE; \ } @@ -48,7 +48,7 @@ #define GST_V4L2_CHECK_NOT_OPEN(element) \ if (GST_V4L2_IS_OPEN(element)) \ { \ - gst_element_error (element, RESOURCE, TOO_LAZY, \ + GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \ (_("Device is open")), NULL); \ return FALSE; \ } @@ -57,7 +57,7 @@ #define GST_V4L2_CHECK_OVERLAY(element) \ if (!GST_V4L2_IS_OVERLAY(element)) \ { \ - gst_element_error (element, RESOURCE, TOO_LAZY, \ + GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \ NULL, ("Device cannot handle overlay")); \ return FALSE; \ } @@ -66,7 +66,7 @@ #define GST_V4L2_CHECK_ACTIVE(element) \ if (!GST_V4L2_IS_ACTIVE(element)) \ { \ - gst_element_error (element, RESOURCE, SETTINGS, \ + GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \ NULL, ("Device is not in streaming mode")); \ return FALSE; \ } @@ -75,7 +75,7 @@ #define GST_V4L2_CHECK_NOT_ACTIVE(element) \ if (GST_V4L2_IS_ACTIVE(element)) \ { \ - gst_element_error (element, RESOURCE, SETTINGS, \ + GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \ NULL, ("Device is in streaming mode")); \ return FALSE; \ } diff --git a/sys/v4l2/v4l2src_calls.c b/sys/v4l2/v4l2src_calls.c index a329bd5e0..082e000f5 100644 --- a/sys/v4l2/v4l2src_calls.c +++ b/sys/v4l2/v4l2src_calls.c @@ -72,7 +72,7 @@ gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src) if (errno == EINVAL) { break; /* end of enumeration */ } else { - gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("failed to get number %d in pixelformat enumeration for %s: %s", n, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); g_free (format); @@ -117,7 +117,7 @@ gst_v4l2src_queue_frame (GstV4l2Src *v4l2src, GST_LOG_OBJECT (v4l2src, "queueing frame %u", i); if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QBUF, &v4l2src->pool->buffers[i].buffer) < 0) { - gst_element_error (v4l2src, RESOURCE, WRITE, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, WRITE, (_("Could not write to device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device), ("Error queueing buffer %u on device %s", i, g_strerror(errno))); return FALSE; @@ -142,7 +142,7 @@ gst_v4l2src_grab_frame (GstV4l2Src *v4l2src) while (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &buffer) < 0) { /* if the sync() got interrupted, we can retry */ if (errno != EINTR) { - gst_element_error (v4l2src, RESOURCE, SYNC, NULL, ("could not sync on a buffer on device %s: %s", + GST_ELEMENT_ERROR (v4l2src, RESOURCE, SYNC, NULL, ("could not sync on a buffer on device %s: %s", GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); return -1; } @@ -170,7 +170,7 @@ gst_v4l2src_get_capture (GstV4l2Src *v4l2src) v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_G_FMT, &v4l2src->format) < 0) { - gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("failed to get pixelformat for device %s: %s", GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); return FALSE; @@ -206,7 +206,7 @@ gst_v4l2src_set_capture (GstV4l2Src *v4l2src, v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_S_FMT, &v4l2src->format) < 0) { - gst_element_error (v4l2src, RESOURCE, SETTINGS, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("failed to set pixelformat to %s @ %dx%d for device %s: %s", fmt->description, width, height, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); return FALSE; @@ -245,14 +245,14 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src) v4l2src->breq.type = v4l2src->format.type; v4l2src->breq.memory = V4L2_MEMORY_MMAP; if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) { - gst_element_error (v4l2src, RESOURCE, READ, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, (_("Could not get buffers from device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device), ("error requesting %d buffers: %s", v4l2src->breq.count, g_strerror (errno))); return FALSE; } if (v4l2src->breq.count < GST_V4L2_MIN_BUFFERS) { - gst_element_error (v4l2src, RESOURCE, READ, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, (_("Could not get enough buffers from device \"%s\""), GST_V4L2ELEMENT(v4l2src)->device), ("we received %d, we want at least %d", v4l2src->breq.count, GST_V4L2_MIN_BUFFERS)); v4l2src->breq.count = buffers; @@ -280,7 +280,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src) buffer->buffer.index = n; buffer->buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QUERYBUF, &buffer->buffer) < 0) { - gst_element_error (v4l2src, RESOURCE, READ, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, NULL, ("Could not get buffer properties of buffer %d: %s", n, g_strerror (errno))); gst_v4l2src_capture_deinit(v4l2src); return FALSE; @@ -288,7 +288,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src) buffer->start = mmap (0, buffer->buffer.length, PROT_READ|PROT_WRITE, MAP_SHARED, GST_V4L2ELEMENT(v4l2src)->video_fd, buffer->buffer.m.offset); if (buffer->start == MAP_FAILED) { - gst_element_error (v4l2src, RESOURCE, READ, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, READ, NULL, ("Could not mmap video buffer %d: %s", n, g_strerror (errno))); buffer->start = 0; gst_v4l2src_capture_deinit (v4l2src); @@ -328,7 +328,7 @@ gst_v4l2src_capture_start (GstV4l2Src *v4l2src) v4l2src->quit = FALSE; if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMON, &type) < 0) { - gst_element_error (v4l2src, RESOURCE, OPEN_READ, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, OPEN_READ, NULL, ("Error starting streaming capture from device %s: %s", GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno))); return FALSE; @@ -356,7 +356,7 @@ gst_v4l2src_capture_stop (GstV4l2Src *v4l2src) /* we actually need to sync on all queued buffers but not * on the non-queued ones */ if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMOFF, &type) < 0) { - gst_element_error (v4l2src, RESOURCE, CLOSE, NULL, + GST_ELEMENT_ERROR (v4l2src, RESOURCE, CLOSE, NULL, ("Error stopping streaming capture from device %s: %s", GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); return FALSE; |