reverting error patch before making a branch.

Original commit message from CVS:
reverting error patch before making a branch.
parent 26a16e00
......@@ -708,9 +708,7 @@ sink_restart:
}
/* caps nego failed somewhere */
if (this->format == NULL) {
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("alsasink: No caps available"));
gst_element_error (GST_ELEMENT (this), "alsasink: No caps available");
return;
}
samplestamp = gst_alsa_timestamp_to_samples (this, GST_BUFFER_TIMESTAMP (sink->buf[i]));
......@@ -1087,9 +1085,7 @@ gst_alsa_src_loop (GstElement *element)
/* set the caps on all pads */
if (!this->format) {
if (!gst_alsa_src_set_caps (src, FALSE)) {
gst_element_gerror(element, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("Could not set caps"));
gst_element_error (element, "Could not set caps");
return;
}
/* get the bufferpool going */
......@@ -1536,9 +1532,7 @@ gst_alsa_link (GstPad *pad, GstCaps *caps)
GstCaps *old = gst_alsa_caps (this->format->format, this->format->rate, this->format->channels);
for (--i; i >= 0; i--) {
if (gst_pad_try_set_caps (this->pad[i], gst_caps_ref (old)) == GST_PAD_LINK_REFUSED) {
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("error resetting caps to sane value"));
gst_element_error (GST_ELEMENT (this), "error resetting caps to sane value");
gst_caps_unref (old);
break;
}
......@@ -1559,9 +1553,7 @@ gst_alsa_link (GstPad *pad, GstCaps *caps)
g_free (this->format);
this->format = format;
if (!gst_alsa_start_audio (this)) {
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("Probed format doesn't work"));
gst_element_error (GST_ELEMENT (this), "Probed format doesn't work");
return GST_PAD_LINK_REFUSED;
}
}
......@@ -1878,9 +1870,7 @@ gst_alsa_xrun_recovery (GstAlsa *this)
}
if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("alsasink: Error restarting audio after xrun"));
gst_element_error (GST_ELEMENT (this), "alsasink: Error restarting audio after xrun");
}
}
......
......@@ -250,9 +250,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
/* create the GnomeVFSURI from the url */
sink->uri = gnome_vfs_uri_new(sink->filename);
if (!sink->uri) {
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("opening file \"%s\" (%s)", sink->filename, strerror (errno)));
gst_element_error (GST_ELEMENT (sink), "opening file \"%s\" (%s)", sink->filename, strerror (errno));
return FALSE;
}
......@@ -268,9 +266,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
gst_gnomevfssink_signals[SIGNAL_ERASE_ASK], 0,
sink->erase);
}
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("opening file \"%s\" (%s)", sink->filename, strerror (errno)));
gst_element_error (GST_ELEMENT (sink), "opening file \"%s\" (%s)", sink->filename, strerror (errno));
return FALSE;
}
......@@ -295,9 +291,7 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink *sink)
if (result != GNOME_VFS_OK)
{
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("closing file \"%s\" (%s)", sink->filename, strerror (errno)));
gst_element_error (GST_ELEMENT (sink), "closing file \"%s\" (%s)", sink->filename, strerror (errno));
}
else {
GST_FLAG_UNSET (sink, GST_GNOMEVFSSINK_OPEN);
......
......@@ -510,11 +510,10 @@ static int audiocast_init(GstGnomeVFSSrc *src)
char *escaped;
escaped = gnome_vfs_unescape_string_for_display (src->filename);
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("opening vfs file \"%s\" (%s)",
gst_element_error(GST_ELEMENT(src),
"opening vfs file \"%s\" (%s)",
escaped,
"unable to register UDP port"));
"unable to register UDP port");
g_free (escaped);
close(src->audiocast_fd);
return FALSE;
......@@ -533,11 +532,10 @@ static int audiocast_init(GstGnomeVFSSrc *src)
if (error != NULL) {
char *escaped;
escaped = gnome_vfs_unescape_string_for_display (src->filename);
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("opening vfs file \"%s\" (unable to create thread: %s)",
gst_element_error(GST_ELEMENT(src),
"opening vfs file \"%s\" (unable to create thread: %s)",
escaped,
error->message));
error->message);
g_free (escaped);
close(src->audiocast_fd);
return FALSE;
......@@ -1043,9 +1041,8 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
/* create the uri */
src->uri = gnome_vfs_uri_new(src->filename);
if (!src->uri) {
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("error crerating uri \"%s\" (%s)", src->filename, strerror (errno)));
gst_element_error(GST_ELEMENT(src), "creating uri \"%s\" (%s)",
src->filename, strerror (errno));
return FALSE;
}
......@@ -1064,11 +1061,10 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
audiocast_thread_kill(src);
escaped = gnome_vfs_unescape_string_for_display (src->filename);
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("opening vfs file \"%s\" (%s)",
gst_element_error(GST_ELEMENT(src),
"opening vfs file \"%s\" (%s)",
escaped,
gnome_vfs_result_to_string(result)));
gnome_vfs_result_to_string(result));
g_free (escaped);
return FALSE;
}
......
......@@ -699,9 +699,7 @@ gst_vorbisenc_chain (GstPad * pad, GstBuffer * buf)
if (!vorbisenc->setup) {
gst_buffer_unref (buf);
gst_element_gerror(GST_ELEMENT (vorbisenc), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("encoder not initialized (input is not audio?)"));
gst_element_error (GST_ELEMENT (vorbisenc), "encoder not initialized (input is not audio?)");
return;
}
......
......@@ -508,9 +508,7 @@ gst_vorbisfile_loop (GstElement *element)
/* open our custom vorbisfile data object with the callbacks we provide */
if (ov_open_callbacks (vorbisfile, &vorbisfile->vf, NULL, 0,
vorbisfile_ov_callbacks) < 0) {
gst_element_gerror(element, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("this is not a vorbis file"));
gst_element_error (element, "this is not a vorbis file");
return;
}
vorbisfile->need_discont = TRUE;
......
......@@ -149,38 +149,29 @@ gst_adder_parse_caps (GstAdder *adder, GstCaps *caps)
/* provide an error message if we can't link */
if (adder->format != GST_ADDER_FORMAT_INT) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("can't link a non-int pad to an int adder"));
gst_element_error (el, "can't link a non-int pad to an int adder");
return FALSE;
}
if (adder->channels != channels) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf( "can't link %d-channel pad with %d-channel adder",
channels, adder->channels));
gst_element_error (el,
"can't link %d-channel pad with %d-channel adder",
channels, adder->channels);
return FALSE;
}
if (adder->rate != rate) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("can't link %d Hz pad with %d Hz adder",
rate, adder->rate));
gst_element_error (el, "can't link %d Hz pad with %d Hz adder",
rate, adder->rate);
return FALSE;
}
if (adder->width != width) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("can't link %d-bit pad with %d-bit adder",
width, adder->width));
gst_element_error (el, "can't link %d-bit pad with %d-bit adder",
width, adder->width);
return FALSE;
}
if (adder->is_signed != is_signed) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("can't link %ssigned pad with %ssigned adder",
gst_element_error (el, "can't link %ssigned pad with %ssigned adder",
adder->is_signed ? "" : "un",
is_signed ? "" : "un"));
is_signed ? "" : "un");
return FALSE;
}
} else if (strcmp (mimetype, "audio/x-raw-float") == 0) {
......@@ -191,30 +182,23 @@ gst_adder_parse_caps (GstAdder *adder, GstCaps *caps)
gst_caps_get_int (caps, "rate", &rate);
if (adder->format != GST_ADDER_FORMAT_FLOAT) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("can't link a non-float pad to a float adder"));
gst_element_error (el, "can't link a non-float pad to a float adder");
return FALSE;
}
if (adder->channels != channels) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("can't link %d-channel pad with %d-channel adder",
channels, adder->channels));
gst_element_error (el,
"can't link %d-channel pad with %d-channel adder",
channels, adder->channels);
return FALSE;
}
if (adder->rate != rate) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf( "can't link %d Hz pad with %d Hz adder",
rate, adder->rate));
gst_element_error (el, "can't link %d Hz pad with %d Hz adder",
rate, adder->rate);
return FALSE;
}
if (adder->width != width) {
gst_element_gerror(el, GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf( "can't link %d bit float pad with %d bit adder",
width, adder->width));
gst_element_error (el, "can't link %d bit float pad with %d bit adder",
width, adder->width);
return FALSE;
}
}
......@@ -423,9 +407,7 @@ gst_adder_loop (GstElement *element)
buf_out = gst_buffer_new_from_pool (adder->bufpool, 0, 0);
if (buf_out == NULL) {
gst_element_gerror(GST_ELEMENT (adder), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("could not get new output buffer"));
gst_element_error (GST_ELEMENT (adder), "could not get new output buffer");
return;
}
......@@ -513,10 +495,9 @@ gst_adder_loop (GstElement *element)
for (i = 0; i < GST_BUFFER_SIZE (buf_out); i++)
out[i] = CLAMP(out[i] + in[i], 0x80, 0x7f);
} else {
gst_element_gerror(GST_ELEMENT (adder), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("invalid width (%u) for integer audio in gstadder",
adder->width));
gst_element_error (GST_ELEMENT (adder),
"invalid width (%u) for integer audio in gstadder",
adder->width);
return;
}
} else if (adder->format == GST_ADDER_FORMAT_FLOAT) {
......@@ -531,17 +512,15 @@ gst_adder_loop (GstElement *element)
for (i = 0; i < GST_BUFFER_SIZE (buf_out) / sizeof (gfloat); i++)
out[i] = CLAMP(out[i] + in[i], -1.0, 1.0);
} else {
gst_element_gerror(GST_ELEMENT (adder), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf ("invalid width (%u) for float audio in gstadder",
adder->width));
gst_element_error (GST_ELEMENT (adder),
"invalid width (%u) for float audio in gstadder",
adder->width);
return;
}
} else {
gst_element_gerror(GST_ELEMENT (adder), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("invalid audio format (%d) in gstadder",
adder->format));
gst_element_error (GST_ELEMENT (adder),
"invalid audio format (%d) in gstadder",
adder->format);
return;
}
......@@ -558,9 +537,9 @@ gst_adder_loop (GstElement *element)
GST_AUDIO_INT_PAD_TEMPLATE_PROPS);
if (gst_pad_try_set_caps (adder->srcpad, caps) < 0) {
gst_element_gerror(GST_ELEMENT (adder), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup ("Couldn't set the default caps, use link_filtered instead"));
gst_element_error (GST_ELEMENT (adder),
"Couldn't set the default caps, "
"use link_filtered instead");
return;
}
......
......@@ -334,10 +334,9 @@ gst_audio_convert_chain (GstPad *pad, GstBuffer *buf)
if (!this->caps_set[1]) {
if (!gst_audio_convert_set_caps (this->src)) {
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("AudioConvert: could not set caps on pad %s",
GST_PAD_NAME(this->src)));
gst_element_error (GST_ELEMENT (this),
"AudioConvert: could not set caps on pad %s",
GST_PAD_NAME(this->src));
return;
}
}
......
......@@ -140,7 +140,7 @@ gst_v4l_get_attribute (GstElement *element,
return gst_v4l_get_audio(v4lelement, n, value);
}
g_warning("Unknown attribute %s", name);
gst_element_error(element, "Unknown attribute %s", name);
return FALSE;
}
......@@ -170,7 +170,7 @@ gst_v4l_set_attribute (GstElement *element,
return gst_v4l_set_audio(v4lelement, n, value);
}
g_warning("Unknown attribute %s", name);
gst_element_error(element, "Unknown attribute %s", name);
return FALSE;
}
......
......@@ -294,11 +294,9 @@ gst_v4lmjpegsink_chain (GstPad *pad,
/* check size */
if (GST_BUFFER_SIZE(buf) > v4lmjpegsink->breq.size)
{
gst_element_error(GST_ELEMENT(v4lmjpegsink), GST_ERROR_UNKNOWN,
g_strdup(_("An unknown error occured")),
g_strdup_printf("Buffer too big (%d KB), max. buffersize is %lu KB",
GST_BUFFER_SIZE(buf)/1024,
v4lmjpegsink->breq.size/1024));
gst_element_error(GST_ELEMENT(v4lmjpegsink),
"Buffer too big (%d KB), max. buffersize is %d KB",
GST_BUFFER_SIZE(buf)/1024, v4lmjpegsink->breq.size/1024);
return;
}
......
......@@ -502,9 +502,8 @@ gst_v4lmjpegsrc_get (GstPad *pad)
buf = gst_buffer_new_from_pool(v4lmjpegsrc->bufferpool, 0, 0);
if (!buf)
{
gst_element_error(GST_ELEMENT(v4lmjpegsrc), GST_ERROR_UNKNOWN,
g_strdup(_("An unknown error occured")),
g_strdup("Failed to create a new GstBuffer"));
gst_element_error(GST_ELEMENT(v4lmjpegsrc),
"Failed to create a new GstBuffer");
return NULL;
}
......@@ -841,9 +840,8 @@ gst_v4lmjpegsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_
}
if (n == v4lmjpegsrc->breq.count)
gst_element_error(GST_ELEMENT(v4lmjpegsrc), GST_ERROR_UNKNOWN,
g_strdup(_("An unknown error occured")),
g_strdup("Couldn't find the buffer"));
gst_element_error(GST_ELEMENT(v4lmjpegsrc),
"Couldn't find the buffer");
/* free the buffer struct et all */
gst_buffer_default_free(buf);
......
......@@ -578,9 +578,8 @@ gst_v4lsrc_get (GstPad *pad)
buf = gst_buffer_new_from_pool(v4lsrc->bufferpool, 0, 0);
if (!buf)
{
gst_element_error(GST_ELEMENT(v4lsrc), GST_ERROR_INTERNAL,
g_strdup(_("An internal error occured")),
g_strdup("Failed to create a new GstBuffer"));
gst_element_error(GST_ELEMENT(v4lsrc),
"Failed to create a new GstBuffer");
return NULL;
}
......@@ -812,9 +811,8 @@ gst_v4lsrc_buffer_free (GstBufferPool *pool, GstBuffer *buf, gpointer user_data)
}
if (n == v4lsrc->mbuf.frames)
gst_element_error(GST_ELEMENT(v4lsrc), GST_ERROR_INTERNAL,
g_strdup(_("An internal error occured")),
g_strdup("Couldn\'t find the buffer"));
gst_element_error(GST_ELEMENT(v4lsrc),
"Couldn\'t find the buffer");
/* free struct */
gst_buffer_default_free(buf);
......
......@@ -59,18 +59,15 @@ gst_v4l_set_overlay (GstV4lElement *v4lelement,
switch (system(buff))
{
case -1:
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_UNKNOWN,
g_strdup(_("Unknown error occured")),
g_strdup_printf("Could not start v4l-conf: %s", g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Could not start v4l-conf: %s", g_strerror(errno));
g_free(buff);
return FALSE;
case 0:
break;
default:
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_UNKNOWN,
g_strdup(_("Unknown error occured")),
g_strdup_printf("v4l-conf failed to run correctly: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"v4l-conf failed to run correctly: %s", g_strerror(errno));
g_free(buff);
return FALSE;
}
......@@ -123,10 +120,9 @@ gst_v4l_set_window (GstElement *element,
if (ioctl(v4lelement->video_fd, VIDIOCSWIN, &vwin) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup (_("Unable to set parameters on video device")),
g_strdup_printf("Failed to set the video window: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Failed to set the video window: %s",
g_strerror(errno));
return FALSE;
}
......@@ -152,10 +148,9 @@ gst_v4l_enable_overlay (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCCAPTURE, &doit) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to set parameters on video device")),
g_strdup_printf("Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror(errno));
return FALSE;
}
......
......@@ -74,10 +74,9 @@ gst_v4l_get_capabilities (GstV4lElement *v4lelement)
if (ioctl(v4lelement->video_fd, VIDIOCGCAP, &(v4lelement->vcap)) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to get informations from video device")),
g_strdup_printf("Error getting \'%s\' capabilities: %s",
v4lelement->videodev, g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting \'%s\' capabilities: %s",
v4lelement->videodev, g_strerror(errno));
return FALSE;
}
......@@ -109,10 +108,9 @@ gst_v4l_open (GstV4lElement *v4lelement)
v4lelement->video_fd = open(v4lelement->videodev, O_RDWR);
if (!GST_V4L_IS_OPEN(v4lelement))
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to open video device")),
g_strdup_printf("Failed to open device (\'%s\'): %s",
v4lelement->videodev, g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Failed to open device (\'%s\'): %s",
v4lelement->videodev, g_strerror(errno));
return FALSE;
}
......@@ -273,19 +271,17 @@ gst_v4l_set_chan_norm (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCSCHAN, &(v4lelement->vchan)) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to set parameters on video device")),
g_strdup_printf("Error setting the channel/norm settings: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error setting the channel/norm settings: %s",
g_strerror(errno));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCGCHAN, &(v4lelement->vchan)) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to set parameters on video device")),
g_strdup_printf("Error getting the channel/norm settings: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting the channel/norm settings: %s",
g_strerror(errno));
return FALSE;
}
......@@ -329,9 +325,9 @@ gst_v4l_get_signal (GstV4lElement *v4lelement,
tuner.tuner = 0;
if (ioctl(v4lelement->video_fd, VIDIOCGTUNER, &tuner) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to get informations from video device")),
g_strdup_printf("Error getting tuner signal: %s", sys_errlist[errno]));
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting tuner signal: %s",
sys_errlist[errno]);
return FALSE;
}
......@@ -359,9 +355,9 @@ gst_v4l_get_frequency (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGFREQ, frequency) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to get informations from video device")),
g_strdup_printf("Error getting tuner frequency: %s", g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting tuner frequency: %s",
g_strerror(errno));
return FALSE;
}
......@@ -387,9 +383,9 @@ gst_v4l_set_frequency (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCSFREQ, &frequency) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to set parameters on video device")),
g_strdup_printf("Error setting tuner frequency: %s", g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error setting tuner frequency: %s",
g_strerror(errno));
return FALSE;
}
......@@ -416,10 +412,9 @@ gst_v4l_get_picture (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGPICT, &vpic) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to get informations from video device")),
g_strdup_printf("Error getting picture parameters: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting picture parameters: %s",
g_strerror(errno));
return FALSE;
}
......@@ -438,7 +433,9 @@ gst_v4l_get_picture (GstV4lElement *v4lelement,
*value = vpic.colour;
break;
default:
g_warning("Error getting picture parameters: unknown type %d", type);
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting picture parameters: unknown type %d",
type);
return FALSE;
}
......@@ -465,10 +462,9 @@ gst_v4l_set_picture (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGPICT, &vpic) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to get informations from video device")),
g_strdup_printf("Error getting picture parameters: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error getting picture parameters: %s",
g_strerror(errno));
return FALSE;
}
......@@ -487,16 +483,17 @@ gst_v4l_set_picture (GstV4lElement *v4lelement,
vpic.colour = value;
break;
default:
g_warning("Error setting picture parameters: unknown type %d", type);
gst_element_error(GST_ELEMENT(v4lelement),
"Error setting picture parameters: unknown type %d",
type);
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSPICT, &vpic) < 0)
{
gst_element_error(GST_ELEMENT(v4lelement), GST_ERROR_DEVICE,
g_strdup(_("Unable to set parameters on video device")),
g_strdup_printf("Error setting picture parameters: %s",
g_strerror(errno)));
gst_element_error(GST_ELEMENT(v4lelement),
"Error setting picture parameters: %s",
g_strerror(errno));
return FALSE;
}
......@@ -541,10 +538,9 @@ gst_v4l_get_audio (GstV4lElement *v4lelement,