summaryrefslogtreecommitdiffstats
path: root/sys
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2004-01-29 23:20:45 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2004-01-29 23:20:45 +0000
commit92eb19b993e4e1bdd7fef71c1264e0092f4accac (patch)
tree7055360715831c903e6ae5ca7df13bcf3093be4c /sys
parent7c858cbf0f10a48386f7098420fde939eda25eb5 (diff)
downloadgst-plugins-bad-92eb19b993e4e1bdd7fef71c1264e0092f4accac.tar.gz
gst-plugins-bad-92eb19b993e4e1bdd7fef71c1264e0092f4accac.tar.bz2
gst-plugins-bad-92eb19b993e4e1bdd7fef71c1264e0092f4accac.zip
GST_ELEMENT_ERROR
Original commit message from CVS: GST_ELEMENT_ERROR
Diffstat (limited to 'sys')
-rw-r--r--sys/dxr3/dxr3audiosink.c14
-rw-r--r--sys/dxr3/dxr3spusink.c8
-rw-r--r--sys/dxr3/dxr3videosink.c10
-rw-r--r--sys/v4l2/gstv4l2src.c2
-rw-r--r--sys/v4l2/v4l2-overlay_calls.c8
-rw-r--r--sys/v4l2/v4l2_calls.c40
-rw-r--r--sys/v4l2/v4l2_calls.h10
-rw-r--r--sys/v4l2/v4l2src_calls.c22
-rw-r--r--sys/vcd/vcdsrc.c2
9 files changed, 58 insertions, 58 deletions
diff --git a/sys/dxr3/dxr3audiosink.c b/sys/dxr3/dxr3audiosink.c
index 5e986e21..362ed17a 100644
--- a/sys/dxr3/dxr3audiosink.c
+++ b/sys/dxr3/dxr3audiosink.c
@@ -310,7 +310,7 @@ dxr3audiosink_open (Dxr3AudioSink *sink)
sink->audio_fd = open (sink->audio_filename, O_WRONLY);
if (sink->audio_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open audio device \"%s\" for writing"), sink->audio_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -322,7 +322,7 @@ dxr3audiosink_open (Dxr3AudioSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open control device \"%s\" for writing"), sink->control_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -356,7 +356,7 @@ dxr3audiosink_set_mode_pcm (Dxr3AudioSink *sink)
tmp = oss_mode;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SETFMT, &tmp) < 0 ||
tmp != oss_mode) {
- gst_element_error (sink, RESOURCE, SETTINGS,
+ GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not configure audio device \"%s\""), sink->audio_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -370,7 +370,7 @@ dxr3audiosink_set_mode_pcm (Dxr3AudioSink *sink)
/* Set the sampling rate. */
tmp = sink->rate;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0) {
- gst_element_error (sink, RESOURCE, SETTINGS,
+ GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not set audio device \"%s\" to %d Hz"), sink->audio_filename, sink->rate),
GST_ERROR_SYSTEM);
return FALSE;
@@ -407,7 +407,7 @@ dxr3audiosink_set_mode_ac3 (Dxr3AudioSink *sink)
tmp = AC3_BYTE_RATE;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0 ||
tmp != AC3_BYTE_RATE) {
- gst_element_error (sink, RESOURCE, SETTINGS,
+ GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not set audio device \"%s\" to %d Hz"), sink->audio_filename, AC3_BYTE_RATE),
GST_ERROR_SYSTEM);
return FALSE;
@@ -435,14 +435,14 @@ dxr3audiosink_close (Dxr3AudioSink *sink)
g_return_if_fail (GST_FLAG_IS_SET (sink, DXR3AUDIOSINK_OPEN));
if (close (sink->audio_fd) != 0) {
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close audio device \"%s\""), sink->audio_filename),
GST_ERROR_SYSTEM);
return;
}
if (close (sink->control_fd) != 0) {
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close control device \"%s\""), sink->audio_filename),
GST_ERROR_SYSTEM);
return;
diff --git a/sys/dxr3/dxr3spusink.c b/sys/dxr3/dxr3spusink.c
index d66ea949..e34e56e9 100644
--- a/sys/dxr3/dxr3spusink.c
+++ b/sys/dxr3/dxr3spusink.c
@@ -281,7 +281,7 @@ dxr3spusink_open (Dxr3SpuSink *sink)
sink->spu_fd = open (sink->spu_filename, O_WRONLY);
if (sink->spu_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open spu device \"%s\" for writing"), sink->spu_filename), GST_ERROR_SYSTEM);
return FALSE;
}
@@ -292,7 +292,7 @@ dxr3spusink_open (Dxr3SpuSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open control device \"%s\" for writing"), sink->control_filename), GST_ERROR_SYSTEM);
return FALSE;
}
@@ -309,7 +309,7 @@ dxr3spusink_close (Dxr3SpuSink *sink)
g_return_if_fail (GST_FLAG_IS_SET (sink, DXR3SPUSINK_OPEN));
if (close (sink->spu_fd) != 0) {
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close spu device \"%s\""), sink->spu_filename),
GST_ERROR_SYSTEM);
return;
@@ -317,7 +317,7 @@ dxr3spusink_close (Dxr3SpuSink *sink)
if (close (sink->control_fd) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close control device \"%s\""), sink->control_filename),
GST_ERROR_SYSTEM);
return;
diff --git a/sys/dxr3/dxr3videosink.c b/sys/dxr3/dxr3videosink.c
index 84816a51..36ce36dd 100644
--- a/sys/dxr3/dxr3videosink.c
+++ b/sys/dxr3/dxr3videosink.c
@@ -277,7 +277,7 @@ dxr3videosink_open (Dxr3VideoSink *sink)
sink->video_fd = open (sink->video_filename, O_WRONLY);
if (sink->video_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open video device \"%s\" for writing"), sink->video_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -289,7 +289,7 @@ dxr3videosink_open (Dxr3VideoSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) {
- gst_element_error (sink, RESOURCE, OPEN_WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open control device \"%s\" for writing"), sink->control_filename),
GST_ERROR_SYSTEM);
return FALSE;
@@ -308,7 +308,7 @@ dxr3videosink_close (Dxr3VideoSink *sink)
if (close (sink->video_fd) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close video device \"%s\""), sink->video_filename),
GST_ERROR_SYSTEM);
return;
@@ -316,7 +316,7 @@ dxr3videosink_close (Dxr3VideoSink *sink)
if (close (sink->control_fd) != 0)
{
- gst_element_error (sink, RESOURCE, CLOSE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close control device \"%s\""), sink->control_filename),
GST_ERROR_SYSTEM);
return;
@@ -464,7 +464,7 @@ dxr3videosink_write_data (Dxr3VideoSink *sink, guint cut)
while (size > 0) {
written = write (sink->video_fd, data, size);
if (written < 0) {
- gst_element_error (sink, RESOURCE, WRITE,
+ GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
(_("Could not write to device \"%s\""), sink->video_filename),
GST_ERROR_SYSTEM);
break;
diff --git a/sys/v4l2/gstv4l2src.c b/sys/v4l2/gstv4l2src.c
index d0b480f9..697fe421 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 b455ba3c..4e5fb9f0 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 1ef03f91..c206d987 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 c40100d9..fecfa93f 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 a329bd5e..082e000f 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;
diff --git a/sys/vcd/vcdsrc.c b/sys/vcd/vcdsrc.c
index 3a3d13a8..b5d6a777 100644
--- a/sys/vcd/vcdsrc.c
+++ b/sys/vcd/vcdsrc.c
@@ -303,7 +303,7 @@ vcdsrc_open_file(VCDSrc *src)
/* open the device */
src->fd = open(src->device,O_RDONLY);
if (src->fd < 0) {
- gst_element_error (src, RESOURCE, OPEN_READ, NULL, GST_ERROR_SYSTEM);
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, NULL, GST_ERROR_SYSTEM);
return FALSE;
}