change NULL to (NULL) for GST_ELEMENT_ERROR

Original commit message from CVS:
change NULL to (NULL) for GST_ELEMENT_ERROR
Make sure errors end with "."
parent 062865af
2004-02-02 Thomas Vander Stichele <thomas at apestaart dot org>
reviewed by: <delete if not using a buddy>
* ext/aalib/gstaasink.c: (gst_aasink_open):
* ext/alsa/gstalsa.c: (gst_alsa_link), (gst_alsa_xrun_recovery):
* ext/alsa/gstalsasink.c: (gst_alsa_sink_loop):
* ext/alsa/gstalsasrc.c: (gst_alsa_src_loop):
* ext/audiofile/gstafsink.c: (gst_afsink_open_file),
(gst_afsink_close_file):
* ext/audiofile/gstafsrc.c: (gst_afsrc_open_file),
(gst_afsrc_close_file):
* ext/divx/gstdivxdec.c: (gst_divxdec_setup), (gst_divxdec_chain):
* ext/divx/gstdivxenc.c: (gst_divxenc_setup), (gst_divxenc_chain):
* ext/dv/gstdvdec.c: (gst_dvdec_loop):
* ext/dvdnav/dvdnavsrc.c: (dvdnavsrc_user_op), (dvdnavsrc_get):
* ext/esd/esdmon.c: (gst_esdmon_get):
* ext/esd/esdsink.c: (gst_esdsink_chain), (gst_esdsink_open_audio):
* ext/faac/gstfaac.c: (gst_faac_chain):
* ext/faad/gstfaad.c: (gst_faad_chain):
* ext/ffmpeg/gstffmpegdec.c: (gst_ffmpegdec_chain):
* ext/ffmpeg/gstffmpegdemux.c: (gst_ffmpegdemux_loop):
* ext/ffmpeg/gstffmpegmux.c: (gst_ffmpegmux_loop):
* ext/flac/gstflacdec.c: (gst_flacdec_error_callback),
(gst_flacdec_loop):
* ext/flac/gstflacenc.c: (gst_flacenc_chain):
* ext/flac/gstflactag.c: (gst_flac_tag_chain):
* ext/gdk_pixbuf/gstgdkpixbuf.c: (gst_gdk_pixbuf_chain):
* ext/gnomevfs/gstgnomevfssink.c: (gst_gnomevfssink_open_file),
(gst_gnomevfssink_close_file):
* ext/gnomevfs/gstgnomevfssrc.c: (audiocast_init),
(gst_gnomevfssrc_open_file):
* ext/ivorbis/vorbisfile.c: (gst_ivorbisfile_loop):
* ext/lame/gstlame.c: (gst_lame_sink_link), (gst_lame_chain):
* ext/lcs/gstcolorspace.c: (gst_colorspace_srcconnect_func):
* ext/mad/gstid3tag.c: (gst_id3_tag_handle_event),
(gst_id3_tag_do_typefind), (gst_id3_tag_chain):
* ext/mad/gstmad.c: (gst_mad_chain):
* ext/mikmod/gstmikmod.c: (gst_mikmod_loop):
* ext/mpeg2dec/gstmpeg2dec.c:
* ext/mpeg2enc/gstmpeg2enc.cc:
* ext/mplex/gstmplex.cc:
* ext/mplex/gstmplexibitstream.cc:
* ext/ogg/gstoggdemux.c: (gst_ogg_demux_chain),
(gst_ogg_demux_push):
* ext/raw1394/gstdv1394src.c:
* ext/sdl/sdlvideosink.c: (gst_sdlvideosink_lock),
(gst_sdlvideosink_initsdl), (gst_sdlvideosink_create):
* ext/sndfile/gstsf.c: (gst_sf_open_file), (gst_sf_close_file),
(gst_sf_loop):
* ext/speex/gstspeexenc.c: (gst_speexenc_chain):
* ext/swfdec/gstswfdec.c: (gst_swfdec_loop):
* ext/tarkin/gsttarkindec.c: (gst_tarkindec_chain):
* ext/tarkin/gsttarkinenc.c: (gst_tarkinenc_chain):
* ext/vorbis/vorbisenc.c: (gst_vorbisenc_chain):
* ext/vorbis/vorbisfile.c: (gst_vorbisfile_loop):
* ext/xvid/gstxviddec.c: (gst_xviddec_setup), (gst_xviddec_chain):
* ext/xvid/gstxvidenc.c: (gst_xvidenc_setup), (gst_xvidenc_chain):
* gst-libs/gst/riff/riff-read.c: (gst_riff_peek_head),
(gst_riff_read_element_data), (gst_riff_read_seek),
(gst_riff_peek_list), (gst_riff_read_list), (gst_riff_read_header):
* gst/adder/gstadder.c: (gst_adder_loop):
* gst/asfdemux/gstasfdemux.c: (gst_asf_demux_process_segment),
(gst_asf_demux_process_stream), (gst_asf_demux_get_stream):
* gst/avi/gstavidemux.c: (gst_avi_demux_stream_init),
(gst_avi_demux_add_stream), (gst_avi_demux_stream_header):
* gst/avi/gstavimux.c: (gst_avimux_stop_file):
* gst/flx/gstflxdec.c: (gst_flxdec_loop):
* gst/goom/gstgoom.c: (gst_goom_chain):
* gst/id3/gstid3types.c: (gst_id3types_loop):
* gst/intfloat/float22int.c: (gst_float2_2_int_chain):
* gst/intfloat/gstfloat2int.c: (gst_float2int_loop):
* gst/intfloat/gstint2float.c: (gst_int2float_chain_gint16):
* gst/matroska/ebml-read.c: (gst_ebml_read_element_id),
(gst_ebml_read_element_length), (gst_ebml_read_element_data),
(gst_ebml_read_seek), (gst_ebml_read_uint), (gst_ebml_read_sint),
(gst_ebml_read_float), (gst_ebml_read_header):
* gst/matroska/matroska-demux.c: (gst_matroska_demux_init_stream),
(gst_matroska_demux_parse_blockgroup):
* gst/monoscope/gstmonoscope.c: (gst_monoscope_chain):
* gst/mpegstream/gstmpegparse.c: (gst_mpeg_parse_loop):
* gst/oneton/gstoneton.c: (gst_oneton_chain):
* gst/silence/gstsilence.c: (gst_silence_get):
* gst/sine/gstsinesrc.c: (gst_sinesrc_get):
* gst/smpte/gstsmpte.c: (gst_smpte_loop):
* gst/speed/gstspeed.c: (speed_loop):
* gst/tags/gstvorbistag.c: (gst_vorbis_tag_chain):
* gst/videotestsrc/gstvideotestsrc.c: (gst_videotestsrc_get):
* gst/volenv/gstvolenv.c: (gst_volenv_chain):
* gst/wavenc/gstwavenc.c: (gst_wavenc_chain):
* gst/wavparse/gstwavparse.c: (gst_wavparse_parse_fmt),
(gst_wavparse_loop):
* sys/dxr3/dxr3audiosink.c: (dxr3audiosink_open),
(dxr3audiosink_set_mode_pcm), (dxr3audiosink_set_mode_ac3),
(dxr3audiosink_close):
* sys/dxr3/dxr3spusink.c: (dxr3spusink_open), (dxr3spusink_close):
* sys/dxr3/dxr3videosink.c: (dxr3videosink_open),
(dxr3videosink_close), (dxr3videosink_write_data):
* sys/oss/gstosselement.c: (gst_osselement_open_audio):
* sys/oss/gstosssink.c: (gst_osssink_chain):
* sys/oss/gstosssrc.c: (gst_osssrc_get):
* sys/v4l/gstv4lmjpegsink.c: (gst_v4lmjpegsink_chain):
* sys/v4l/gstv4lmjpegsrc.c: (gst_v4lmjpegsrc_buffer_free):
* sys/v4l/gstv4lsrc.c: (gst_v4lsrc_buffer_free):
* sys/v4l/v4l-overlay_calls.c: (gst_v4l_set_overlay),
(gst_v4l_set_window), (gst_v4l_enable_overlay):
* sys/v4l/v4l_calls.c: (gst_v4l_get_capabilities), (gst_v4l_open),
(gst_v4l_set_chan_norm), (gst_v4l_get_signal),
(gst_v4l_get_frequency), (gst_v4l_set_frequency),
(gst_v4l_get_picture), (gst_v4l_set_picture), (gst_v4l_get_audio),
(gst_v4l_set_audio):
* sys/v4l/v4l_calls.h:
* sys/v4l/v4lmjpegsink_calls.c: (gst_v4lmjpegsink_sync_thread),
(gst_v4lmjpegsink_queue_frame), (gst_v4lmjpegsink_set_playback),
(gst_v4lmjpegsink_playback_init),
(gst_v4lmjpegsink_playback_start):
* sys/v4l/v4lmjpegsrc_calls.c: (gst_v4lmjpegsrc_queue_frame):
* sys/v4l/v4lsrc_calls.c: (gst_v4lsrc_queue_frame),
(gst_v4lsrc_sync_frame), (gst_v4lsrc_capture_init),
(gst_v4lsrc_requeue_frame), (gst_v4lsrc_try_palette):
* sys/v4l2/gstv4l2src.c: (gst_v4l2src_get):
* sys/v4l2/v4l2-overlay_calls.c: (gst_v4l2_set_display),
(gst_v4l2_set_window), (gst_v4l2_enable_overlay):
* sys/v4l2/v4l2_calls.c: (gst_v4l2_get_capabilities),
(gst_v4l2_fill_lists), (gst_v4l2_open), (gst_v4l2_get_norm),
(gst_v4l2_set_norm), (gst_v4l2_get_input), (gst_v4l2_set_input),
(gst_v4l2_get_output), (gst_v4l2_set_output),
(gst_v4l2_get_frequency), (gst_v4l2_set_frequency),
(gst_v4l2_signal_strength), (gst_v4l2_get_attribute),
(gst_v4l2_set_attribute):
* sys/v4l2/v4l2_calls.h:
* sys/v4l2/v4l2src_calls.c: (gst_v4l2src_fill_format_list),
(gst_v4l2src_queue_frame), (gst_v4l2src_grab_frame),
(gst_v4l2src_get_capture), (gst_v4l2src_set_capture),
(gst_v4l2src_capture_init), (gst_v4l2src_capture_start),
(gst_v4l2src_capture_stop):
* sys/vcd/vcdsrc.c: (vcdsrc_open_file):
* sys/ximage/ximagesink.c: (gst_ximagesink_xcontext_get),
(gst_ximagesink_chain):
* sys/xvideo/xvideosink.c: (gst_xvideosink_buffer_new),
(gst_xvideosink_sinkconnect), (gst_xvideosink_chain),
(gst_xvideosink_xwindow_new):
* sys/xvimage/xvimagesink.c: (gst_xvimagesink_xcontext_get),
(gst_xvimagesink_chain):
2004-02-02 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/volume/gstvolume.c: (gst_volume_set_volume),
......
......@@ -658,7 +658,7 @@ gst_alsa_link (GstPad *pad, const 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], old) == GST_PAD_LINK_REFUSED) {
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("could not reset caps to a sane value"));
gst_caps_free (old);
break;
......@@ -680,7 +680,7 @@ gst_alsa_link (GstPad *pad, const GstCaps *caps)
g_free (this->format);
this->format = format;
if (! gst_alsa_start_audio (this)) {
GST_ELEMENT_ERROR (this, RESOURCE, SETTINGS, NULL, NULL);
GST_ELEMENT_ERROR (this, RESOURCE, SETTINGS, (NULL), (NULL));
return GST_PAD_LINK_REFUSED;
}
......@@ -877,7 +877,7 @@ gst_alsa_xrun_recovery (GstAlsa *this)
}
if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
GST_ELEMENT_ERROR (this, RESOURCE, FAILED, NULL,
GST_ELEMENT_ERROR (this, RESOURCE, FAILED, (NULL),
("Error restarting audio after xrun"));
}
}
......
......@@ -351,7 +351,7 @@ sink_restart:
}
/* caps nego failed somewhere */
if (this->format == NULL) {
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("ALSA format not negotiated"));
}
samplestamp = gst_alsa_timestamp_to_samples (this, GST_BUFFER_TIMESTAMP (sink->buf[i]));
......
......@@ -311,7 +311,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_ERROR (element, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL),
("ALSA format not negotiated"));
return;
}
......
......@@ -283,7 +283,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
sink->erase);
}
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open vfs file \"%s\" for writing"), sink->filename),
(_("Could not open vfs file \"%s\" for writing."), sink->filename),
GST_ERROR_SYSTEM);
return FALSE;
}
......@@ -308,7 +308,7 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink *sink)
if (result != GNOME_VFS_OK)
GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Could not close vfs file \"%s\""), sink->filename),
(_("Could not close vfs file \"%s\"."), sink->filename),
GST_ERROR_SYSTEM);
}
......
......@@ -525,7 +525,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
return TRUE;
GST_DEBUG ("audiocast: registering listener");
if (audiocast_register_listener(&src->audiocast_port, &src->audiocast_fd) < 0) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, NULL,
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
("Unable to listen on UDP port %d", src->audiocast_port));
close(src->audiocast_fd);
return FALSE;
......@@ -542,7 +542,7 @@ static int audiocast_init(GstGnomeVFSSrc *src)
GST_DEBUG ("audiocast: creating audiocast thread");
src->audiocast_thread = g_thread_create((GThreadFunc) audiocast_thread_run, src, TRUE, &error);
if (error != NULL) {
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL),
("Unable to create thread: %s", error->message));
close(src->audiocast_fd);
return FALSE;
......@@ -1044,7 +1044,7 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
src->uri = gnome_vfs_uri_new(src->filename);
if (!src->uri) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open vfs file \"%s\" for reading"), src->filename), GST_ERROR_SYSTEM);
(_("Could not open vfs file \"%s\" for reading."), src->filename), GST_ERROR_SYSTEM);
return FALSE;
}
}
......@@ -1067,7 +1067,7 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
escaped = gnome_vfs_unescape_string_for_display (src->filename);
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open vfs file \"%s\" for reading"), escaped),
(_("Could not open vfs file \"%s\" for reading."), escaped),
(gnome_vfs_result_to_string (result)));
g_free (escaped);
return FALSE;
......
......@@ -491,7 +491,7 @@ gst_ogg_demux_chain (GstPad *pad, GstData *buffer)
memcpy (data, GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer));
if (ogg_sync_wrote (&ogg->sync, GST_BUFFER_SIZE (buffer)) != 0) {
gst_data_unref (buffer);
GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, NULL, ("ogg_sync_wrote failed"));
GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, (NULL), ("ogg_sync_wrote failed"));
return;
}
offset_end = GST_BUFFER_OFFSET_IS_VALID (buffer) ?
......@@ -557,7 +557,7 @@ gst_ogg_demux_chain (GstPad *pad, GstData *buffer)
GST_DEBUG_OBJECT (ogg, "stream can seek, try setup now");
if (!gst_pad_send_event (GST_PAD_PEER (ogg->sinkpad),
gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, 0))) {
GST_ELEMENT_ERROR (ogg, CORE, SEEK, NULL,
GST_ELEMENT_ERROR (ogg, CORE, SEEK, (NULL),
("stream can seek to end, but not to start. Can't handle that."));
}
gst_ogg_add_chain (ogg);
......@@ -643,7 +643,7 @@ br:
/* FIXME: monitor if we are still in creation stage? */
cur = gst_ogg_pad_new (ogg, ogg_page_serialno (page));
if (!cur) {
GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, NULL, ("Creating ogg_stream struct failed."));
GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, (NULL), ("Creating ogg_stream struct failed."));
return;
}
if (ogg->current_chain == -1) {
......@@ -654,7 +654,7 @@ br:
}
}
if (cur == NULL) {
GST_ELEMENT_ERROR (ogg, STREAM, DECODE, NULL, ("invalid ogg stream serial no"));
GST_ELEMENT_ERROR (ogg, STREAM, DECODE, (NULL), ("invalid ogg stream serial no"));
return;
}
if (ogg_stream_pagein (&cur->stream, page) != 0) {
......
......@@ -783,7 +783,7 @@ gst_vorbisenc_chain (GstPad * pad, GstData *_data)
if (!vorbisenc->setup) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (vorbisenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not audio?)"));
GST_ELEMENT_ERROR (vorbisenc, CORE, NEGOTIATION, (NULL), ("encoder not initialized (input is not audio?)"));
return;
}
......
......@@ -500,7 +500,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_ERROR (element, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL), (NULL));
return;
}
vorbisfile->need_discont = TRUE;
......
......@@ -168,7 +168,7 @@ gst_riff_peek_head (GstRiffRead *riff,
gst_pad_event_default (riff->sinkpad, event);
} else {
gst_event_unref (event);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
}
}
......@@ -197,7 +197,7 @@ gst_riff_read_element_data (GstRiffRead *riff,
GstBuffer *buf = NULL;
if (gst_bytestream_peek (riff->bs, &buf, length) != length) {
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
if (buf)
gst_buffer_unref (buf);
return NULL;
......@@ -240,7 +240,7 @@ gst_riff_read_seek (GstRiffRead *riff,
/* now seek */
if (!gst_bytestream_seek (riff->bs, offset, GST_SEEK_METHOD_SET)) {
GST_ELEMENT_ERROR (riff, RESOURCE, SEEK, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, SEEK, (NULL), (NULL));
return NULL;
}
......@@ -300,7 +300,7 @@ gst_riff_peek_list (GstRiffRead *riff)
}
if (gst_bytestream_peek_bytes (riff->bs, &data, 12) != 12) {
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return 0;
}
......@@ -660,7 +660,7 @@ gst_riff_read_list (GstRiffRead *riff,
}
gst_bytestream_flush_fast (riff->bs, 8);
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
......@@ -848,14 +848,14 @@ gst_riff_read_header (GstRiffRead *riff,
if (!gst_riff_peek_head (riff, &tag, &length, NULL))
return FALSE;
if (tag != GST_RIFF_TAG_RIFF) {
GST_ELEMENT_ERROR (riff, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (riff, STREAM, WRONG_TYPE, (NULL), (NULL));
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 8);
/* doctype */
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
......
......@@ -312,7 +312,8 @@ gst_adder_loop (GstElement *element)
buf_out = gst_buffer_new_and_alloc (1024);
if (buf_out == NULL) {
GST_ELEMENT_ERROR (adder, CORE, TOO_LAZY, NULL, ("could not get new output buffer"));
GST_ELEMENT_ERROR (adder, CORE, TOO_LAZY, (NULL),
("could not get new output buffer"));
return;
}
......@@ -400,7 +401,7 @@ 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_ERROR (adder, STREAM, FORMAT, NULL,
GST_ELEMENT_ERROR (adder, STREAM, FORMAT, (NULL),
("invalid width (%u) for integer audio in gstadder",
adder->width));
return;
......@@ -417,13 +418,13 @@ 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_ERROR (adder, STREAM, FORMAT, NULL,
GST_ELEMENT_ERROR (adder, STREAM, FORMAT, (NULL),
("invalid width (%u) for float audio in gstadder",
adder->width));
return;
}
} else {
GST_ELEMENT_ERROR (adder, STREAM, FORMAT, NULL,
GST_ELEMENT_ERROR (adder, STREAM, FORMAT, (NULL),
("invalid audio format (%d) in gstadder",
adder->format));
return;
......
......@@ -383,7 +383,7 @@ gst_sinesrc_get (GstPad *pad)
if (!GST_PAD_CAPS (src->srcpad)) {
if (gst_sinesrc_link (src->srcpad,
gst_pad_get_allowed_caps (src->srcpad)) <= 0) {
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL), (NULL));
return NULL;
}
}
......
......@@ -527,7 +527,7 @@ gst_vorbis_tag_chain (GstPad *pad, GstData *data)
}
if (GST_BUFFER_SIZE (buffer) == 0)
GST_ELEMENT_ERROR (tag, CORE, TAG, NULL, ("empty buffers are not allowed in vorbis data"));
GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), ("empty buffers are not allowed in vorbis data"));
if (GST_BUFFER_DATA (buffer)[0] == 3) {
gchar *vendor;
......@@ -535,7 +535,7 @@ gst_vorbis_tag_chain (GstPad *pad, GstData *data)
gst_data_unref (data);
if (list == NULL) {
GST_ELEMENT_ERROR (tag, CORE, TAG, NULL, ("invalid data in vorbis comments"));
GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), ("invalid data in vorbis comments"));
return;
}
gst_element_found_tags_for_pad (GST_ELEMENT (tag), tag->srcpad, 0,
......
......@@ -406,7 +406,7 @@ gst_videotestsrc_get (GstPad * pad)
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
if (videotestsrc->fourcc == NULL) {
GST_ELEMENT_ERROR (videotestsrc, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (videotestsrc, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before get function"));
return NULL;
}
......
......@@ -269,7 +269,7 @@ gst_v4lmjpegsink_chain (GstPad *pad,
/* check size */
if (GST_BUFFER_SIZE(buf) > v4lmjpegsink->breq.size)
{
GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, WRITE, NULL,
GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, WRITE, (NULL),
("Buffer too big (%d KB), max. buffersize is %ld KB",
GST_BUFFER_SIZE(buf)/1024, v4lmjpegsink->breq.size/1024));
return;
......
......@@ -811,6 +811,6 @@ gst_v4lmjpegsrc_buffer_free (GstBuffer *buf)
}
if (n == v4lmjpegsrc->breq.count)
GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, (NULL),
("Couldn't find the buffer"));
}
......@@ -874,7 +874,7 @@ gst_v4lsrc_buffer_free (GstBuffer *buf)
}
if (n == v4lsrc->mbuf.frames)
GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, (NULL),
("Couldn\'t find the buffer"));
}
......
......@@ -66,14 +66,14 @@ gst_v4l_set_overlay (GstV4lElement *v4lelement)
{
case -1:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, FAILED,
(_("Could not start v4l-conf")), GST_ERROR_SYSTEM);
(_("Could not start v4l-conf.")), GST_ERROR_SYSTEM);
g_free(buff);
return FALSE;
case 0:
break;
default:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, FAILED,
(_("Executing v4l-conf failed")), GST_ERROR_SYSTEM);
(_("Executing v4l-conf failed.")), GST_ERROR_SYSTEM);
g_free(buff);
return FALSE;
}
......@@ -126,7 +126,7 @@ gst_v4l_set_window (GstElement *element,
if (ioctl(v4lelement->video_fd, VIDIOCSWIN, &vwin) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, (NULL),
("Failed to set the video window: %s", g_strerror (errno)));
return FALSE;
}
......@@ -153,7 +153,7 @@ gst_v4l_enable_overlay (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCCAPTURE, &doit) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, (NULL),
("Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror (errno)));
return FALSE;
......
......@@ -84,7 +84,7 @@ gst_v4l_get_capabilities (GstV4lElement *v4lelement)
if (ioctl(v4lelement->video_fd, VIDIOCGCAP, &(v4lelement->vcap)) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("error getting capabilities %s of from device %s",
g_strerror (errno), v4lelement->videodev));
return FALSE;
......@@ -112,7 +112,7 @@ gst_v4l_open (GstV4lElement *v4lelement)
/* be sure we have a device */
if (!v4lelement->videodev) {
GST_ELEMENT_ERROR (v4lelement, RESOURCE, NOT_FOUND,
(_("No device specified")), NULL);
(_("No device specified.")), (NULL));
return FALSE;
}
......@@ -121,7 +121,7 @@ gst_v4l_open (GstV4lElement *v4lelement)
if (!GST_V4L_IS_OPEN(v4lelement))
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, OPEN_READ_WRITE,
(_("Could not open device \"%s\" for reading and writing"), v4lelement->videodev),
(_("Could not open device \"%s\" for reading and writing."), v4lelement->videodev),
GST_ERROR_SYSTEM);
return FALSE;
}
......@@ -141,7 +141,7 @@ gst_v4l_open (GstV4lElement *v4lelement)
!(v4lelement->vcap.type & VID_TYPE_MJPEG_ENCODER)) ||
(GST_IS_V4LMJPEGSINK(v4lelement) &&
!(v4lelement->vcap.type & VID_TYPE_MJPEG_DECODER))) {
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Device opened, but wrong type (0x%x)",
v4lelement->vcap.type));
close(v4lelement->video_fd);
......@@ -354,7 +354,7 @@ gst_v4l_set_chan_norm (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCSCHAN, &(v4lelement->vchan)) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting the channel/norm settings: %s",
g_strerror(errno)));
return FALSE;
......@@ -362,7 +362,7 @@ gst_v4l_set_chan_norm (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGCHAN, &(v4lelement->vchan)) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting the channel/norm settings: %s",
g_strerror(errno)));
return FALSE;
......@@ -391,7 +391,7 @@ gst_v4l_get_signal (GstV4lElement *v4lelement,
tuner.tuner = tunernum;
if (ioctl(v4lelement->video_fd, VIDIOCGTUNER, &tuner) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting tuner signal: %s", g_strerror (errno)));
return FALSE;
}
......@@ -427,7 +427,7 @@ gst_v4l_get_frequency (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGFREQ, frequency) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting tuner frequency: %s", g_strerror (errno)));
return FALSE;
}
......@@ -461,7 +461,7 @@ gst_v4l_set_frequency (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCSFREQ, &frequency) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting tuner frequency: %s", g_strerror (errno)));
return FALSE;
}
......@@ -489,7 +489,7 @@ gst_v4l_get_picture (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGPICT, &vpic) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting picture parameters: %s", g_strerror (errno)));
return FALSE;
}
......@@ -509,7 +509,7 @@ gst_v4l_get_picture (GstV4lElement *v4lelement,
*value = vpic.colour;
break;
default:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting picture parameters: unknown type %d", type));
return FALSE;
}
......@@ -537,7 +537,7 @@ gst_v4l_set_picture (GstV4lElement *v4lelement,
if (ioctl(v4lelement->video_fd, VIDIOCGPICT, &vpic) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting picture parameters: %s", g_strerror (errno)));
return FALSE;
}
......@@ -557,14 +557,14 @@ gst_v4l_set_picture (GstV4lElement *v4lelement,
vpic.colour = value;
break;
default:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting picture parameters: unknown type %d", type));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSPICT, &vpic) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting picture parameters: %s", g_strerror (errno)));
return FALSE;
}
......@@ -594,7 +594,7 @@ gst_v4l_get_audio (GstV4lElement *v4lelement,
vau.audio = audionum;
if (ioctl(v4lelement->video_fd, VIDIOCGAUDIO, &vau) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting audio parameters: %s", g_strerror (errno)));
return FALSE;
}
......@@ -611,7 +611,7 @@ gst_v4l_get_audio (GstV4lElement *v4lelement,
*value = vau.mode;
break;
default:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting audio parameters: unknown type %d", type));
return FALSE;
}
......@@ -641,7 +641,7 @@ gst_v4l_set_audio (GstV4lElement *v4lelement,
vau.audio = audionum;
if (ioctl(v4lelement->video_fd, VIDIOCGAUDIO, &vau) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting audio parameters: %s", g_strerror (errno)));
return FALSE;
}
......@@ -651,7 +651,7 @@ gst_v4l_set_audio (GstV4lElement *v4lelement,
case V4L_AUDIO_MUTE:
if (!(vau.flags & VIDEO_AUDIO_MUTABLE))
{
GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, NULL,
GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, (NULL),
("Error setting audio mute: (un)setting mute is not supported"));
return FALSE;
}
......@@ -663,7 +663,7 @@ gst_v4l_set_audio (GstV4lElement *v4lelement,
case V4L_AUDIO_VOLUME:
if (!(vau.flags & VIDEO_AUDIO_VOLUME))
{
GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, NULL,
GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, (NULL),
("Error setting audio volume: setting volume is not supported"));
return FALSE;
}
......@@ -673,14 +673,14 @@ gst_v4l_set_audio (GstV4lElement *v4lelement,
vau.mode = value;
break;
default:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting audio parameters: unknown type %d", type));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSAUDIO, &vau) < 0)
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting audio parameters: %s", g_strerror (errno)));
return FALSE;
}
......
......@@ -44,7 +44,7 @@ extern "C" {
if (element->video_fd <= 0) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is not open")), NULL); \
(_("Device is not open.")), (NULL)); \