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 "."
This commit is contained in:
Thomas Vander Stichele 2004-02-02 17:23:33 +00:00
parent 921fe7a35f
commit 7fa1c52301
32 changed files with 262 additions and 116 deletions

145
ChangeLog
View file

@ -1,3 +1,148 @@
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> 2004-02-02 Thomas Vander Stichele <thomas at apestaart dot org>
* gst/volume/gstvolume.c: (gst_volume_set_volume), * gst/volume/gstvolume.c: (gst_volume_set_volume),

View file

@ -347,7 +347,7 @@ gst_afsink_open_file (GstAFSink *sink)
if (sink->file == AF_NULL_FILEHANDLE) if (sink->file == AF_NULL_FILEHANDLE)
{ {
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
(_("Could not open file \"%s\" for writing"), sink->filename), (_("Could not open file \"%s\" for writing."), sink->filename),
("system error: %s", strerror (errno))); ("system error: %s", strerror (errno)));
return FALSE; return FALSE;
} }
@ -370,7 +370,7 @@ gst_afsink_close_file (GstAFSink *sink)
if (afCloseFile (sink->file) != 0) if (afCloseFile (sink->file) != 0)
{ {
GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), sink->filename), (_("Error closing file \"%s\"."), sink->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
} }
else { else {

View file

@ -317,7 +317,7 @@ gst_afsrc_open_file (GstAFSrc *src)
if (src->file == AF_NULL_FILEHANDLE) if (src->file == AF_NULL_FILEHANDLE)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
(_("Could not open file \"%s\" for reading"), src->filename), (_("Could not open file \"%s\" for reading."), src->filename),
("system error: %s", strerror (errno))); ("system error: %s", strerror (errno)));
return FALSE; return FALSE;
} }
@ -375,7 +375,7 @@ gst_afsrc_close_file (GstAFSrc *src)
if (afCloseFile (src->file) != 0) if (afCloseFile (src->file) != 0)
{ {
GST_ELEMENT_ERROR (src, RESOURCE, CLOSE, GST_ELEMENT_ERROR (src, RESOURCE, CLOSE,
(_("Error closing file \"%s\""), src->filename), (_("Error closing file \"%s\"."), src->filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
} else { } else {
GST_FLAG_UNSET (src, GST_AFSRC_OPEN); GST_FLAG_UNSET (src, GST_AFSRC_OPEN);

View file

@ -229,7 +229,7 @@ gst_divxdec_setup (GstDivxDec *divxdec)
break; break;
} }
if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) { if ((ret = decore(&handle, DEC_OPT_INIT, &xinit, NULL)) != 0) {
GST_ELEMENT_ERROR (divxdec, LIBRARY, INIT, NULL, GST_ELEMENT_ERROR (divxdec, LIBRARY, INIT, (NULL),
("divx library error: %s (%d)", gst_divxdec_error (ret), ret)); ("divx library error: %s (%d)", gst_divxdec_error (ret), ret));
return FALSE; return FALSE;
} }
@ -247,7 +247,7 @@ gst_divxdec_setup (GstDivxDec *divxdec)
if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT, if ((ret = decore(divxdec->handle, DEC_OPT_SETOUT,
&output, NULL)) != 0) { &output, NULL)) != 0) {
GST_ELEMENT_ERROR (divxdec, LIBRARY, SETTINGS, NULL, GST_ELEMENT_ERROR (divxdec, LIBRARY, SETTINGS, (NULL),
("error setting output: %s (%d)", ("error setting output: %s (%d)",
gst_divxdec_error (ret), ret)); gst_divxdec_error (ret), ret));
gst_divxdec_unset(divxdec); gst_divxdec_unset(divxdec);
@ -285,7 +285,7 @@ gst_divxdec_chain (GstPad *pad,
if (!divxdec->handle) { if (!divxdec->handle) {
if (gst_divxdec_negotiate(divxdec) <= 0) { if (gst_divxdec_negotiate(divxdec) <= 0) {
GST_ELEMENT_ERROR (divxdec, CORE, TOO_LAZY, NULL, GST_ELEMENT_ERROR (divxdec, CORE, TOO_LAZY, (NULL),
("No format set - aborting")); ("No format set - aborting"));
gst_buffer_unref(buf); gst_buffer_unref(buf);
return; return;
@ -309,7 +309,7 @@ gst_divxdec_chain (GstPad *pad,
if ((ret = decore(divxdec->handle, DEC_OPT_FRAME, if ((ret = decore(divxdec->handle, DEC_OPT_FRAME,
&xframe, NULL))) { &xframe, NULL))) {
GST_ELEMENT_ERROR (divxdec, STREAM, DECODE, NULL, GST_ELEMENT_ERROR (divxdec, STREAM, DECODE, (NULL),
("Error decoding divx frame: %s (%d)", ("Error decoding divx frame: %s (%d)",
gst_divxdec_error(ret), ret)); gst_divxdec_error(ret), ret));
gst_buffer_unref(buf); gst_buffer_unref(buf);

View file

@ -295,7 +295,7 @@ gst_divxenc_setup (GstDivxEnc *divxenc)
output.temporal_level = 1.0; output.temporal_level = 1.0;
if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) { if ((ret = encore(&handle, ENC_OPT_INIT, &input, &output))) {
GST_ELEMENT_ERROR (divxenc, LIBRARY, SETTINGS, NULL, GST_ELEMENT_ERROR (divxenc, LIBRARY, SETTINGS, (NULL),
("Error setting up divx encoder: %s (%d)", ("Error setting up divx encoder: %s (%d)",
gst_divxenc_error(ret), ret)); gst_divxenc_error(ret), ret));
return FALSE; return FALSE;
@ -357,7 +357,7 @@ gst_divxenc_chain (GstPad *pad,
if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE, if ((ret = encore(divxenc->handle, ENC_OPT_ENCODE,
&xframe, &xres))) { &xframe, &xres))) {
GST_ELEMENT_ERROR (divxenc, LIBRARY, ENCODE, NULL, GST_ELEMENT_ERROR (divxenc, LIBRARY, ENCODE, (NULL),
("Error encoding divx frame: %s (%d)", ("Error encoding divx frame: %s (%d)",
gst_divxenc_error(ret), ret)); gst_divxenc_error(ret), ret));
gst_buffer_unref(buf); gst_buffer_unref(buf);

View file

@ -417,7 +417,7 @@ gst_faac_chain (GstPad *pad,
NULL, 0, NULL, 0,
GST_BUFFER_DATA (outbuf), GST_BUFFER_DATA (outbuf),
faac->bytes)) < 0) { faac->bytes)) < 0) {
GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, NULL, NULL); GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, (NULL), (NULL));
gst_event_unref (event); gst_event_unref (event);
gst_buffer_unref (outbuf); gst_buffer_unref (outbuf);
return; return;
@ -445,7 +445,7 @@ gst_faac_chain (GstPad *pad,
inbuf = GST_BUFFER (data); inbuf = GST_BUFFER (data);
if (!faac->handle) { if (!faac->handle) {
GST_ELEMENT_ERROR (faac, CORE, NEGOTIATION, NULL, GST_ELEMENT_ERROR (faac, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function")); ("format wasn't negotiated before chain function"));
gst_buffer_unref (inbuf); gst_buffer_unref (inbuf);
return; return;
@ -454,7 +454,7 @@ gst_faac_chain (GstPad *pad,
if (!GST_PAD_CAPS (faac->srcpad)) { if (!GST_PAD_CAPS (faac->srcpad)) {
if (gst_faac_srcconnect (faac->srcpad, if (gst_faac_srcconnect (faac->srcpad,
gst_pad_get_allowed_caps (faac->srcpad)) <= 0) { gst_pad_get_allowed_caps (faac->srcpad)) <= 0) {
GST_ELEMENT_ERROR (faac, CORE, NEGOTIATION, NULL, GST_ELEMENT_ERROR (faac, CORE, NEGOTIATION, (NULL),
("failed to negotiate MPEG/AAC format with next element")); ("failed to negotiate MPEG/AAC format with next element"));
gst_buffer_unref (inbuf); gst_buffer_unref (inbuf);
return; return;
@ -516,7 +516,7 @@ gst_faac_chain (GstPad *pad,
GST_BUFFER_SIZE (subbuf) / faac->bps, GST_BUFFER_SIZE (subbuf) / faac->bps,
GST_BUFFER_DATA (outbuf), GST_BUFFER_DATA (outbuf),
faac->bytes)) < 0) { faac->bytes)) < 0) {
GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, NULL, NULL); GST_ELEMENT_ERROR (faac, LIBRARY, ENCODE, (NULL), (NULL));
gst_buffer_unref (inbuf); gst_buffer_unref (inbuf);
gst_buffer_unref (subbuf); gst_buffer_unref (subbuf);
return; return;

View file

@ -359,7 +359,7 @@ gst_faad_chain (GstPad *pad,
faad->channels = channels; faad->channels = channels;
if (gst_faad_srcconnect (faad->srcpad, if (gst_faad_srcconnect (faad->srcpad,
gst_pad_get_allowed_caps (faad->srcpad)) <= 0) { gst_pad_get_allowed_caps (faad->srcpad)) <= 0) {
GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, NULL, NULL); GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, (NULL), (NULL));
gst_buffer_unref (buf); gst_buffer_unref (buf);
return; return;
} }
@ -368,7 +368,7 @@ gst_faad_chain (GstPad *pad,
out = faacDecDecode (faad->handle, &info, out = faacDecDecode (faad->handle, &info,
GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf)); GST_BUFFER_DATA (buf), GST_BUFFER_SIZE (buf));
if (info.error) { if (info.error) {
GST_ELEMENT_ERROR (faad, STREAM, DECODE, NULL, GST_ELEMENT_ERROR (faad, STREAM, DECODE, (NULL),
("Failed to decode buffer: %s", ("Failed to decode buffer: %s",
faacDecGetErrorMessage (info.error))); faacDecGetErrorMessage (info.error)));
gst_buffer_unref (buf); gst_buffer_unref (buf);
@ -381,7 +381,7 @@ gst_faad_chain (GstPad *pad,
faad->channels = info.channels; faad->channels = info.channels;
if (gst_faad_srcconnect (faad->srcpad, if (gst_faad_srcconnect (faad->srcpad,
gst_pad_get_allowed_caps (faad->srcpad)) <= 0) { gst_pad_get_allowed_caps (faad->srcpad)) <= 0) {
GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, NULL, NULL); GST_ELEMENT_ERROR (faad, CORE, NEGOTIATION, (NULL), (NULL));
gst_buffer_unref (buf); gst_buffer_unref (buf);
return; return;
} }

View file

@ -569,7 +569,7 @@ gst_ivorbisfile_loop (GstElement *element)
/* open our custom ivorbisfile data object with the callbacks we provide */ /* open our custom ivorbisfile data object with the callbacks we provide */
if (ov_open_callbacks (ivorbisfile, &ivorbisfile->vf, NULL, 0, if (ov_open_callbacks (ivorbisfile, &ivorbisfile->vf, NULL, 0,
ivorbisfile_ov_callbacks) < 0) { ivorbisfile_ov_callbacks) < 0) {
GST_ELEMENT_ERROR (element, STREAM, DECODE, NULL, NULL); GST_ELEMENT_ERROR (element, STREAM, DECODE, (NULL), (NULL));
return; return;
} }
ivorbisfile->need_discont = TRUE; ivorbisfile->need_discont = TRUE;
@ -633,7 +633,7 @@ gst_ivorbisfile_loop (GstElement *element)
/* we update the caps for each logical stream */ /* we update the caps for each logical stream */
if (ivorbisfile->vf.current_link != ivorbisfile->current_link) { if (ivorbisfile->vf.current_link != ivorbisfile->current_link) {
if (!gst_ivorbisfile_new_link (ivorbisfile, ivorbisfile->vf.current_link)) { if (!gst_ivorbisfile_new_link (ivorbisfile, ivorbisfile->vf.current_link)) {
GST_ELEMENT_ERROR (ivorbisfile, CORE, NEGOTIATION, NULL, NULL); GST_ELEMENT_ERROR (ivorbisfile, CORE, NEGOTIATION, (NULL), (NULL));
} }
return; return;
} }

View file

@ -316,7 +316,7 @@ gst_colorspace_srcconnect_func (GstPad *pad, GstCaps *caps, gboolean newcaps)
peercaps = peercaps->next; peercaps = peercaps->next;
} }
GST_ELEMENT_ERROR (space, CORE, NEGOTIATION, NULL, NULL); GST_ELEMENT_ERROR (space, CORE, NEGOTIATION, (NULL), (NULL));
/* we disable ourself here */ /* we disable ourself here */
space->disabled = TRUE; space->disabled = TRUE;

View file

@ -239,7 +239,7 @@ gst_mpeg2enc_loop (GstElement *element)
gst_pad_set_element_private (enc->sinkpad, data); gst_pad_set_element_private (enc->sinkpad, data);
if (!(caps = GST_PAD_CAPS (enc->sinkpad))) { if (!(caps = GST_PAD_CAPS (enc->sinkpad))) {
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (""), GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before loop function")); ("format wasn't negotiated before loop function"));
return; return;
} }
@ -251,7 +251,7 @@ gst_mpeg2enc_loop (GstElement *element)
/* and set caps on other side */ /* and set caps on other side */
othercaps = enc->encoder->getFormat (); othercaps = enc->encoder->getFormat ();
if (gst_pad_set_explicit_caps (enc->srcpad, othercaps) <= 0) { if (gst_pad_set_explicit_caps (enc->srcpad, othercaps) <= 0) {
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (""), ("")); GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL), (NULL));
delete enc->encoder; delete enc->encoder;
enc->encoder = NULL; enc->encoder = NULL;
return; return;

View file

@ -279,7 +279,7 @@ gst_mplex_loop (GstElement *element)
} }
if (!mplex->job->video_tracks && !mplex->job->audio_tracks) { if (!mplex->job->video_tracks && !mplex->job->audio_tracks) {
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (""), GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL),
("no input video or audio tracks set up before loop function")); ("no input video or audio tracks set up before loop function"));
return; return;
} }

View file

@ -53,7 +53,7 @@ GstMplexIBitStream::GstMplexIBitStream (GstPad *_pad,
gst_bytestream_peek_bytes (bs, &data, 1); gst_bytestream_peek_bytes (bs, &data, 1);
if (!ReadIntoBuffer () && buffered == 0) { if (!ReadIntoBuffer () && buffered == 0) {
GST_ELEMENT_ERROR (gst_pad_get_parent (_pad), RESOURCE, READ, (""), GST_ELEMENT_ERROR (gst_pad_get_parent (_pad), RESOURCE, READ, (NULL),
("Failed to read from input pad %s", ("Failed to read from input pad %s",
gst_pad_get_name (pad))); gst_pad_get_name (pad)));
} }

View file

@ -366,7 +366,7 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
{ {
/* assure that we've got a screen */ /* assure that we've got a screen */
if (!sdlvideosink->screen || !sdlvideosink->overlay) { if (!sdlvideosink->screen || !sdlvideosink->overlay) {
GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL, GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, (NULL),
("Tried to lock screen without being set-up")); ("Tried to lock screen without being set-up"));
return FALSE; return FALSE;
} }
@ -376,14 +376,14 @@ gst_sdlvideosink_lock (GstSDLVideoSink *sdlvideosink)
{ {
if (SDL_LockSurface(sdlvideosink->screen) < 0) if (SDL_LockSurface(sdlvideosink->screen) < 0)
{ {
GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL, GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, (NULL),
("SDL: couldn't lock the SDL video window: %s", SDL_GetError())); ("SDL: couldn't lock the SDL video window: %s", SDL_GetError()));
return FALSE; return FALSE;
} }
} }
if (SDL_LockYUVOverlay(sdlvideosink->overlay) < 0) if (SDL_LockYUVOverlay(sdlvideosink->overlay) < 0)
{ {
GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL, GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, (NULL),
("SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError())); ("SDL: couldn\'t lock the SDL YUV overlay: %s", SDL_GetError()));
return FALSE; return FALSE;
} }
@ -427,7 +427,7 @@ gst_sdlvideosink_initsdl (GstSDLVideoSink *sdlvideosink)
/* Initialize the SDL library */ /* Initialize the SDL library */
if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 ) { if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_NOPARACHUTE) < 0 ) {
GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, INIT, NULL, GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, INIT, (NULL),
("Couldn't initialize SDL: %s", SDL_GetError())); ("Couldn't initialize SDL: %s", SDL_GetError()));
return FALSE; return FALSE;
} }
@ -464,7 +464,7 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink)
GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_HWSURFACE | SDL_RESIZABLE); GST_VIDEOSINK_HEIGHT (sdlvideosink), 0, SDL_HWSURFACE | SDL_RESIZABLE);
if (sdlvideosink->screen == NULL) if (sdlvideosink->screen == NULL)
{ {
GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL, GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, (NULL),
("SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink), ("SDL: Couldn't set %dx%d: %s", GST_VIDEOSINK_WIDTH (sdlvideosink),
GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError())); GST_VIDEOSINK_HEIGHT (sdlvideosink), SDL_GetError()));
return FALSE; return FALSE;
@ -475,7 +475,7 @@ gst_sdlvideosink_create (GstSDLVideoSink *sdlvideosink)
sdlvideosink->height, sdlvideosink->format, sdlvideosink->screen); sdlvideosink->height, sdlvideosink->format, sdlvideosink->screen);
if ( sdlvideosink->overlay == NULL ) if ( sdlvideosink->overlay == NULL )
{ {
GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, NULL, GST_ELEMENT_ERROR (sdlvideosink, LIBRARY, TOO_LAZY, (NULL),
("SDL: Couldn't create SDL YUV overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s", ("SDL: Couldn't create SDL YUV overlay (%dx%d \'" GST_FOURCC_FORMAT "\'): %s",
sdlvideosink->width, sdlvideosink->height, sdlvideosink->width, sdlvideosink->height,
GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError())); GST_FOURCC_ARGS(sdlvideosink->format), SDL_GetError()));

View file

@ -560,8 +560,8 @@ gst_sf_open_file (GstSF *this)
if (!this->filename) { if (!this->filename) {
GST_ELEMENT_ERROR (this, RESOURCE, NOT_FOUND, GST_ELEMENT_ERROR (this, RESOURCE, NOT_FOUND,
(_("No filename specified")), (_("No filename specified.")),
NULL); (NULL));
return FALSE; return FALSE;
} }
@ -587,7 +587,7 @@ gst_sf_open_file (GstSF *this)
this->filename, info.samplerate, info.channels, info.format); this->filename, info.samplerate, info.channels, info.format);
if (!sf_format_check (&info)) { if (!sf_format_check (&info)) {
GST_ELEMENT_ERROR (this, STREAM, ENCODE, NULL, GST_ELEMENT_ERROR (this, STREAM, ENCODE, (NULL),
("Input parameters (rate:%d, channels:%d, format:0x%x) invalid", ("Input parameters (rate:%d, channels:%d, format:0x%x) invalid",
info.samplerate, info.channels, info.format)); info.samplerate, info.channels, info.format));
return FALSE; return FALSE;
@ -598,7 +598,7 @@ gst_sf_open_file (GstSF *this)
if (!this->file) { if (!this->file) {
GST_ELEMENT_ERROR (this, RESOURCE, OPEN_WRITE, GST_ELEMENT_ERROR (this, RESOURCE, OPEN_WRITE,
(_("Could not open file \"%s\" for writing"), this->filename), (_("Could not open file \"%s\" for writing."), this->filename),
("soundfile error: %s", sf_strerror (NULL))); ("soundfile error: %s", sf_strerror (NULL)));
return FALSE; return FALSE;
} }
@ -637,7 +637,7 @@ gst_sf_close_file (GstSF *this)
if ((err = sf_close (this->file))) if ((err = sf_close (this->file)))
GST_ELEMENT_ERROR (this, RESOURCE, CLOSE, GST_ELEMENT_ERROR (this, RESOURCE, CLOSE,
("Could not close file file \"%s\"", this->filename), ("Could not close file file \"%s\".", this->filename),
("soundfile error: %s", strerror (err))); ("soundfile error: %s", strerror (err)));
else else
GST_FLAG_UNSET (this, GST_SF_OPEN); GST_FLAG_UNSET (this, GST_SF_OPEN);
@ -657,7 +657,7 @@ gst_sf_loop (GstElement *element)
this = (GstSF*)element; this = (GstSF*)element;
if (this->channels == NULL) { if (this->channels == NULL) {
GST_ELEMENT_ERROR (element, CORE, PAD, NULL, ("You must connect at least one pad to sndfile elements.")); GST_ELEMENT_ERROR (element, CORE, PAD, (NULL), ("You must connect at least one pad to sndfile elements."));
return; return;
} }
@ -707,7 +707,7 @@ gst_sf_loop (GstElement *element)
"buffer-frames", G_TYPE_INT, this->buffer_frames, "buffer-frames", G_TYPE_INT, this->buffer_frames,
NULL); NULL);
if (!gst_pad_try_set_caps (GST_SF_CHANNEL (l)->pad, caps)) { if (!gst_pad_try_set_caps (GST_SF_CHANNEL (l)->pad, caps)) {
GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL, GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("Opened file with sample rate %d, but could not set caps", this->rate)); ("Opened file with sample rate %d, but could not set caps", this->rate));
gst_sf_close_file (this); gst_sf_close_file (this);
return; return;
@ -763,7 +763,7 @@ gst_sf_loop (GstElement *element)
which then would set this->buffer_frames to a new value */ which then would set this->buffer_frames to a new value */
buffer_frames = this->buffer_frames; buffer_frames = this->buffer_frames;
if (buffer_frames == 0) { if (buffer_frames == 0) {
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, NULL, GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function")); ("format wasn't negotiated before chain function"));
return; return;
} }
@ -790,7 +790,7 @@ gst_sf_loop (GstElement *element)
written = sf_writef_float (this->file, buf, num_to_write); written = sf_writef_float (this->file, buf, num_to_write);
if (written != num_to_write) if (written != num_to_write)
GST_ELEMENT_ERROR (element, RESOURCE, WRITE, GST_ELEMENT_ERROR (element, RESOURCE, WRITE,
(_("Could not write to file \"%s\""), this->filename), (_("Could not write to file \"%s\"."), this->filename),
("soundfile error: %s", sf_strerror (this->file))); ("soundfile error: %s", sf_strerror (this->file)));
} }

View file

@ -288,7 +288,7 @@ gst_swfdec_loop(GstElement *element)
if (GST_PAD_LINK_SUCCESSFUL (link_ret)){ if (GST_PAD_LINK_SUCCESSFUL (link_ret)){
/* good */ /* good */
} else { } else {
GST_ELEMENT_ERROR (swfdec, CORE, NEGOTIATION, NULL, NULL); GST_ELEMENT_ERROR (swfdec, CORE, NEGOTIATION, (NULL), (NULL));
return; return;
} }
swfdec->have_format = TRUE; swfdec->have_format = TRUE;

View file

@ -209,7 +209,7 @@ gst_tarkindec_chain (GstPad *pad, GstData *_data)
tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad)); tarkindec = GST_TARKINDEC (gst_pad_get_parent (pad));
if (!tarkindec->setup) { if (!tarkindec->setup) {
GST_ELEMENT_ERROR (tarkindec, CORE, NEGOTATION, NULL, ("decoder not initialized (input is not tarkin?)")); GST_ELEMENT_ERROR (tarkindec, CORE, NEGOTATION, (NULL), ("decoder not initialized (input is not tarkin?)"));
if (GST_IS_BUFFER (buf)) if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf); gst_buffer_unref (buf);
else else
@ -278,7 +278,7 @@ gst_tarkindec_chain (GstPad *pad, GstData *_data)
"framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */ "framerate", GST_PROPS_FLOAT (0.) /* FIXME!!! */
)) <= 0) )) <= 0)
{ {
GST_ELEMENT_ERROR (tarkindec, CORE, NEGOTATION, NULL, ("could not output format")); GST_ELEMENT_ERROR (tarkindec, CORE, NEGOTATION, (NULL), ("could not output format"));
gst_buffer_unref (buf); gst_buffer_unref (buf);
return; return;
} }

View file

@ -319,7 +319,7 @@ gst_tarkinenc_chain (GstPad *pad, GstData *_data)
tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad)); tarkinenc = GST_TARKINENC (gst_pad_get_parent (pad));
if (!tarkinenc->setup) { if (!tarkinenc->setup) {
GST_ELEMENT_ERROR (tarkinenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not tarkin?)")); GST_ELEMENT_ERROR (tarkinenc, CORE, NEGOTIATION, (NULL), ("encoder not initialized (input is not tarkin?)"));
if (GST_IS_BUFFER (buf)) if (GST_IS_BUFFER (buf))
gst_buffer_unref (buf); gst_buffer_unref (buf);
else else

View file

@ -201,7 +201,7 @@ gst_xviddec_setup (GstXvidDec *xviddec)
if ((ret = xvid_decore(NULL, XVID_DEC_CREATE, if ((ret = xvid_decore(NULL, XVID_DEC_CREATE,
&xdec, NULL)) < 0) { &xdec, NULL)) < 0) {
GST_ELEMENT_ERROR (xviddec, LIBRARY, SETTINGS, NULL, GST_ELEMENT_ERROR (xviddec, LIBRARY, SETTINGS, (NULL),
("Setting parameters %dx%d@%d failed: %s (%d)", ("Setting parameters %dx%d@%d failed: %s (%d)",
xviddec->width, xviddec->height, xviddec->csp, xviddec->width, xviddec->height, xviddec->csp,
gst_xvid_error(ret), ret)); gst_xvid_error(ret), ret));
@ -228,7 +228,7 @@ gst_xviddec_chain (GstPad *pad,
g_return_if_fail(GST_IS_PAD(pad)); g_return_if_fail(GST_IS_PAD(pad));
if (!xviddec->handle) { if (!xviddec->handle) {
GST_ELEMENT_ERROR (xviddec, CORE, NEGOTIATION, NULL, GST_ELEMENT_ERROR (xviddec, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function")); ("format wasn't negotiated before chain function"));
gst_buffer_unref(buf); gst_buffer_unref(buf);
return; return;
@ -263,7 +263,7 @@ gst_xviddec_chain (GstPad *pad,
if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE, if ((ret = xvid_decore(xviddec->handle, XVID_DEC_DECODE,
&xframe, NULL)) < 0) { &xframe, NULL)) < 0) {
GST_ELEMENT_ERROR (xviddec, STREAM, DECODE, NULL, GST_ELEMENT_ERROR (xviddec, STREAM, DECODE, (NULL),
("Error decoding xvid frame: %s (%d)\n", ("Error decoding xvid frame: %s (%d)\n",
gst_xvid_error(ret), ret)); gst_xvid_error(ret), ret));
gst_buffer_unref(buf); gst_buffer_unref(buf);

View file

@ -299,7 +299,7 @@ gst_xvidenc_setup (GstXvidEnc *xvidenc)
if ((ret = xvid_encore(NULL, XVID_ENC_CREATE, if ((ret = xvid_encore(NULL, XVID_ENC_CREATE,
&xenc, NULL)) < 0) { &xenc, NULL)) < 0) {
GST_ELEMENT_ERROR (xvidenc, LIBRARY, INIT, NULL, GST_ELEMENT_ERROR (xvidenc, LIBRARY, INIT, (NULL),
("Error setting up xvid encoder: %s (%d)", ("Error setting up xvid encoder: %s (%d)",
gst_xvid_error(ret), ret)); gst_xvid_error(ret), ret));
return FALSE; return FALSE;
@ -355,7 +355,7 @@ gst_xvidenc_chain (GstPad *pad,
if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE, if ((ret = xvid_encore(xvidenc->handle, XVID_ENC_ENCODE,
&xframe, &xstats)) < 0) { &xframe, &xstats)) < 0) {
GST_ELEMENT_ERROR (xvidenc, LIBRARY, ENCODE, NULL, GST_ELEMENT_ERROR (xvidenc, LIBRARY, ENCODE, (NULL),
("Error encoding xvid frame: %s (%d)", ("Error encoding xvid frame: %s (%d)",
gst_xvid_error(ret), ret)); gst_xvid_error(ret), ret));
gst_buffer_unref(buf); gst_buffer_unref(buf);

View file

@ -168,7 +168,7 @@ gst_riff_peek_head (GstRiffRead *riff,
gst_pad_event_default (riff->sinkpad, event); gst_pad_event_default (riff->sinkpad, event);
} else { } else {
gst_event_unref (event); gst_event_unref (event);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL); GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE; return FALSE;
} }
} }
@ -197,7 +197,7 @@ gst_riff_read_element_data (GstRiffRead *riff,
GstBuffer *buf = NULL; GstBuffer *buf = NULL;
if (gst_bytestream_peek (riff->bs, &buf, length) != length) { 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) if (buf)
gst_buffer_unref (buf); gst_buffer_unref (buf);
return NULL; return NULL;
@ -240,7 +240,7 @@ gst_riff_read_seek (GstRiffRead *riff,
/* now seek */ /* now seek */
if (!gst_bytestream_seek (riff->bs, offset, GST_SEEK_METHOD_SET)) { 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; return NULL;
} }
@ -300,7 +300,7 @@ gst_riff_peek_list (GstRiffRead *riff)
} }
if (gst_bytestream_peek_bytes (riff->bs, &data, 12) != 12) { 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; return 0;
} }
@ -660,7 +660,7 @@ gst_riff_read_list (GstRiffRead *riff,
} }
gst_bytestream_flush_fast (riff->bs, 8); gst_bytestream_flush_fast (riff->bs, 8);
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) { 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; return FALSE;
} }
gst_bytestream_flush_fast (riff->bs, 4); 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)) if (!gst_riff_peek_head (riff, &tag, &length, NULL))
return FALSE; return FALSE;
if (tag != GST_RIFF_TAG_RIFF) { 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; return FALSE;
} }
gst_bytestream_flush_fast (riff->bs, 8); gst_bytestream_flush_fast (riff->bs, 8);
/* doctype */ /* doctype */
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) { 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; return FALSE;
} }
gst_bytestream_flush_fast (riff->bs, 4); gst_bytestream_flush_fast (riff->bs, 4);

View file

@ -463,7 +463,7 @@ gst_flxdec_loop (GstElement *element)
if (flxh->type != FLX_MAGICHDR_FLI && if (flxh->type != FLX_MAGICHDR_FLI &&
flxh->type != FLX_MAGICHDR_FLC && flxh->type != FLX_MAGICHDR_FLC &&
flxh->type != FLX_MAGICHDR_FLX) { flxh->type != FLX_MAGICHDR_FLX) {
GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, NULL, ("not a flx file (type %d)\n", flxh->type)); GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL), ("not a flx file (type %d)\n", flxh->type));
return; return;
} }

View file

@ -371,7 +371,7 @@ gst_smpte_loop (GstElement *element)
"framerate", G_TYPE_DOUBLE, smpte->fps, NULL); "framerate", G_TYPE_DOUBLE, smpte->fps, NULL);
if (!gst_pad_try_set_caps (smpte->srcpad, caps)) { if (!gst_pad_try_set_caps (smpte->srcpad, caps)) {
GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, NULL, NULL); GST_ELEMENT_ERROR (smpte, CORE, NEGOTIATION, (NULL), (NULL));
return; return;
} }
} }

View file

@ -245,7 +245,7 @@ speed_loop (GstElement *element)
#include "filter.func" #include "filter.func"
#undef _FORMAT #undef _FORMAT
} else { } else {
GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION, NULL, GST_ELEMENT_ERROR (filter, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function")); ("format wasn't negotiated before chain function"));
gst_element_yield (element); gst_element_yield (element);
} }

View file

@ -311,7 +311,7 @@ dxr3audiosink_open (Dxr3AudioSink *sink)
sink->audio_fd = open (sink->audio_filename, O_WRONLY); sink->audio_fd = open (sink->audio_filename, O_WRONLY);
if (sink->audio_fd < 0) { 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), (_("Could not open audio device \"%s\" for writing."), sink->audio_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -323,7 +323,7 @@ dxr3audiosink_open (Dxr3AudioSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY); sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) { 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), (_("Could not open control device \"%s\" for writing."), sink->control_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -357,7 +357,7 @@ dxr3audiosink_set_mode_pcm (Dxr3AudioSink *sink)
if (ioctl (sink->audio_fd, SNDCTL_DSP_SETFMT, &tmp) < 0 || if (ioctl (sink->audio_fd, SNDCTL_DSP_SETFMT, &tmp) < 0 ||
tmp != oss_mode) { tmp != oss_mode) {
GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS, GST_ELEMENT_ERROR (sink, RESOURCE, SETTINGS,
(_("Could not configure audio device \"%s\""), sink->audio_filename), (_("Could not configure audio device \"%s\"."), sink->audio_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -371,7 +371,7 @@ dxr3audiosink_set_mode_pcm (Dxr3AudioSink *sink)
tmp = sink->rate; tmp = sink->rate;
if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0) { 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), (_("Could not set audio device \"%s\" to %d Hz."), sink->audio_filename, sink->rate),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -408,7 +408,7 @@ dxr3audiosink_set_mode_ac3 (Dxr3AudioSink *sink)
if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0 || if (ioctl (sink->audio_fd, SNDCTL_DSP_SPEED, &tmp) < 0 ||
tmp != AC3_BYTE_RATE) { 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), (_("Could not set audio device \"%s\" to %d Hz."), sink->audio_filename, AC3_BYTE_RATE),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -436,14 +436,14 @@ dxr3audiosink_close (Dxr3AudioSink *sink)
if (close (sink->audio_fd) != 0) { 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), (_("Could not close audio device \"%s\"."), sink->audio_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return; return;
} }
if (close (sink->control_fd) != 0) { 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), (_("Could not close control device \"%s\"."), sink->audio_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return; return;
} }

View file

@ -282,7 +282,7 @@ dxr3spusink_open (Dxr3SpuSink *sink)
sink->spu_fd = open (sink->spu_filename, O_WRONLY); sink->spu_fd = open (sink->spu_filename, O_WRONLY);
if (sink->spu_fd < 0) { 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); (_("Could not open spu device \"%s\" for writing."), sink->spu_filename), GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -293,7 +293,8 @@ dxr3spusink_open (Dxr3SpuSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY); sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) { 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); (_("Could not open control device \"%s\" for writing."), sink->control_filename),
GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -310,7 +311,7 @@ dxr3spusink_close (Dxr3SpuSink *sink)
if (close (sink->spu_fd) != 0) { 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), (_("Could not close spu device \"%s\"."), sink->spu_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return; return;
} }
@ -318,7 +319,7 @@ dxr3spusink_close (Dxr3SpuSink *sink)
if (close (sink->control_fd) != 0) 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), (_("Could not close control device \"%s\"."), sink->control_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return; return;
} }

View file

@ -278,7 +278,7 @@ dxr3videosink_open (Dxr3VideoSink *sink)
sink->video_fd = open (sink->video_filename, O_WRONLY); sink->video_fd = open (sink->video_filename, O_WRONLY);
if (sink->video_fd < 0) { 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), (_("Could not open video device \"%s\" for writing."), sink->video_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -290,7 +290,7 @@ dxr3videosink_open (Dxr3VideoSink *sink)
sink->control_fd = open (sink->control_filename, O_WRONLY); sink->control_fd = open (sink->control_filename, O_WRONLY);
if (sink->control_fd < 0) { 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), (_("Could not open control device \"%s\" for writing."), sink->control_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return FALSE; return FALSE;
} }
@ -309,7 +309,7 @@ dxr3videosink_close (Dxr3VideoSink *sink)
if (close (sink->video_fd) != 0) 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), (_("Could not close video device \"%s\"."), sink->video_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return; return;
} }
@ -317,7 +317,7 @@ dxr3videosink_close (Dxr3VideoSink *sink)
if (close (sink->control_fd) != 0) 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), (_("Could not close control device \"%s\"."), sink->control_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
return; return;
} }
@ -465,7 +465,7 @@ dxr3videosink_write_data (Dxr3VideoSink *sink, guint cut)
written = write (sink->video_fd, data, size); written = write (sink->video_fd, data, size);
if (written < 0) { if (written < 0) {
GST_ELEMENT_ERROR (sink, RESOURCE, WRITE, GST_ELEMENT_ERROR (sink, RESOURCE, WRITE,
(_("Could not write to device \"%s\""), sink->video_filename), (_("Could not write to device \"%s\"."), sink->video_filename),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
break; break;
} }

View file

@ -817,7 +817,7 @@ gst_v4l2src_get (GstPad *pad)
if (v4l2src->use_fixed_fps && if (v4l2src->use_fixed_fps &&
(fps = gst_v4l2src_get_fps(v4l2src)) == 0) { (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; return NULL;
} }

View file

@ -60,7 +60,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element)
switch (system(buff)) { switch (system(buff)) {
case -1: case -1:
GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED, GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED,
(_("Could not start v4l-conf")), (_("Could not start v4l-conf.")),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
g_free(buff); g_free(buff);
return FALSE; return FALSE;
@ -68,7 +68,7 @@ gst_v4l2_set_display (GstV4l2Element *v4l2element)
break; break;
default: default:
GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED, GST_ELEMENT_ERROR (v4l2element, RESOURCE, FAILED,
(_("Executing v4l-conf failed")), (_("Executing v4l-conf failed.")),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
g_free(buff); g_free(buff);
return FALSE; return FALSE;
@ -112,7 +112,7 @@ gst_v4l2_set_window (GstElement *element,
fmt.fmt.win.bitmap = NULL; fmt.fmt.win.bitmap = NULL;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FMT, &fmt) < 0) { 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))); ("Failed to set the video window: %s", g_strerror (errno)));
return FALSE; return FALSE;
} }
@ -138,7 +138,7 @@ gst_v4l2_enable_overlay (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OVERLAY(v4l2element); GST_V4L2_CHECK_OVERLAY(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_OVERLAY, &doit) < 0) { 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", ("Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror (errno))); enable?"enable":"disable", g_strerror (errno)));
return FALSE; return FALSE;

View file

@ -55,7 +55,7 @@ gst_v4l2_get_capabilities (GstV4l2Element *v4l2element)
GST_V4L2_CHECK_OPEN(v4l2element); GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_QUERYCAP, &(v4l2element->vcap)) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Error getting %s capabilities: %s", ("Error getting %s capabilities: %s",
v4l2element->device, g_strerror(errno))); v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -99,7 +99,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL) if (errno == EINVAL)
break; /* end of enumeration */ break; /* end of enumeration */
else { else {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in input enumeration for %s: %s", ("Failed to get %d in input enumeration for %s: %s",
n, v4l2element->device, n, v4l2element->device,
g_strerror (errno))); g_strerror (errno)));
@ -122,7 +122,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
vtun.index = input.tuner; vtun.index = input.tuner;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER,
&vtun) < 0) { &vtun) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get tuner %d settings on %s: %s", ("Failed to get tuner %d settings on %s: %s",
input.tuner, input.tuner,
v4l2element->device, v4l2element->device,
@ -161,7 +161,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL) if (errno == EINVAL)
break; /* end of enumeration */ break; /* end of enumeration */
else { else {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in output enumeration for %s: %s", ("Failed to get %d in output enumeration for %s: %s",
n, v4l2element->device, n, v4l2element->device,
g_strerror (errno))); g_strerror (errno)));
@ -200,7 +200,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL) if (errno == EINVAL)
break; /* end of enumeration */ break; /* end of enumeration */
else { else {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in norm enumeration for %s: %s", ("Failed to get %d in norm enumeration for %s: %s",
n, v4l2element->device, n, v4l2element->device,
g_strerror (errno))); g_strerror (errno)));
@ -237,7 +237,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
else else
break; break;
} else { } else {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in control enumeration for %s: %s", ("Failed to get %d in control enumeration for %s: %s",
n, v4l2element->device, n, v4l2element->device,
g_strerror (errno))); g_strerror (errno)));
@ -289,7 +289,7 @@ gst_v4l2_fill_lists (GstV4l2Element *v4l2element)
if (errno == EINVAL) if (errno == EINVAL)
break; /* end of enumeration */ break; /* end of enumeration */
else { else {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get %d in menu enumeration for %s: %s", ("Failed to get %d in menu enumeration for %s: %s",
n, v4l2element->device, n, v4l2element->device,
g_strerror (errno))); g_strerror (errno)));
@ -410,7 +410,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
v4l2element->video_fd = open(v4l2element->device, O_RDWR); v4l2element->video_fd = open(v4l2element->device, O_RDWR);
if (!GST_V4L2_IS_OPEN(v4l2element)) { 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), (_("Could not open device \"%s\" for reading and writing."), v4l2element->device),
GST_ERROR_SYSTEM); GST_ERROR_SYSTEM);
goto error; goto error;
} }
@ -424,7 +424,7 @@ gst_v4l2_open (GstV4l2Element *v4l2element)
if (GST_IS_V4L2SRC(v4l2element) && if (GST_IS_V4L2SRC(v4l2element) &&
!(v4l2element->vcap.capabilities & V4L2_CAP_VIDEO_CAPTURE)) { !(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), (_("Device \"%s\" is not a capture device."), v4l2element->device),
("Capabilities: 0x%x", v4l2element->vcap.capabilities)); ("Capabilities: 0x%x", v4l2element->vcap.capabilities));
goto error; goto error;
} }
@ -492,7 +492,7 @@ gst_v4l2_get_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element); GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, norm) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_G_STD, norm) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get the current norm for device %s: %s", ("Failed to get the current norm for device %s: %s",
v4l2element->device, g_strerror(errno))); v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -517,7 +517,7 @@ gst_v4l2_set_norm (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element); GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &norm) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_S_STD, &norm) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set norm 0x%llx for device %s: %s", ("Failed to set norm 0x%llx for device %s: %s",
norm, v4l2element->device, g_strerror(errno))); norm, v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -543,7 +543,7 @@ gst_v4l2_get_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element); GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_G_INPUT, &n) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get current input on device %s: %s", ("Failed to get current input on device %s: %s",
v4l2element->device, g_strerror(errno))); v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -570,7 +570,7 @@ gst_v4l2_set_input (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element); GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_S_INPUT, &input) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set input %d on device %s: %s", ("Failed to set input %d on device %s: %s",
input, v4l2element->device, g_strerror(errno))); input, v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -596,7 +596,7 @@ gst_v4l2_get_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_OPEN(v4l2element); GST_V4L2_CHECK_OPEN(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_G_OUTPUT, &n) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get current output on device %s: %s", ("Failed to get current output on device %s: %s",
v4l2element->device, g_strerror(errno))); v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -623,7 +623,7 @@ gst_v4l2_set_output (GstV4l2Element *v4l2element,
GST_V4L2_CHECK_NOT_ACTIVE(v4l2element); GST_V4L2_CHECK_NOT_ACTIVE(v4l2element);
if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_S_OUTPUT, &output) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set output %d on device %s: %s", ("Failed to set output %d on device %s: %s",
output, v4l2element->device, g_strerror(errno))); output, v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -651,7 +651,7 @@ gst_v4l2_get_frequency (GstV4l2Element *v4l2element,
freq.tuner = tunernum; freq.tuner = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQUENCY, &freq) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_G_FREQUENCY, &freq) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get current tuner frequency for device %s: %s", ("Failed to get current tuner frequency for device %s: %s",
v4l2element->device, g_strerror(errno))); v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -686,7 +686,7 @@ gst_v4l2_set_frequency (GstV4l2Element *v4l2element,
freq.frequency = frequency; freq.frequency = frequency;
if (ioctl(v4l2element->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_S_FREQUENCY, &freq) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set tuner frequency to %lu for device %s: %s", ("Failed to set tuner frequency to %lu for device %s: %s",
frequency, v4l2element->device, g_strerror(errno))); frequency, v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -714,7 +714,7 @@ gst_v4l2_signal_strength (GstV4l2Element *v4l2element,
tuner.index = tunernum; tuner.index = tunernum;
if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_G_TUNER, &tuner) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get signal strength for device %s: %s", ("Failed to get signal strength for device %s: %s",
v4l2element->device, g_strerror(errno))); v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -746,7 +746,7 @@ gst_v4l2_get_attribute (GstV4l2Element *v4l2element,
control.id = attribute_num; control.id = attribute_num;
if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_G_CTRL, &control) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to get value for control %d on device %s: %s", ("Failed to get value for control %d on device %s: %s",
attribute_num, v4l2element->device, g_strerror(errno))); attribute_num, v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -779,7 +779,7 @@ gst_v4l2_set_attribute (GstV4l2Element *v4l2element,
control.value = value; control.value = value;
if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) { if (ioctl(v4l2element->video_fd, VIDIOC_S_CTRL, &control) < 0) {
GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (""), GST_ELEMENT_ERROR (v4l2element, RESOURCE, SETTINGS, (NULL),
("Failed to set value %d for control %d on device %s: %s", ("Failed to set value %d for control %d on device %s: %s",
value, attribute_num, v4l2element->device, g_strerror(errno))); value, attribute_num, v4l2element->device, g_strerror(errno)));
return FALSE; return FALSE;

View file

@ -40,7 +40,7 @@
if (!GST_V4L2_IS_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); \ (_("Device is not open.")), (NULL)); \
return FALSE; \ return FALSE; \
} }
@ -49,7 +49,7 @@
if (GST_V4L2_IS_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); \ (_("Device is open.")), (NULL)); \
return FALSE; \ return FALSE; \
} }
@ -58,7 +58,7 @@
if (!GST_V4L2_IS_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")); \ (NULL), ("Device cannot handle overlay")); \
return FALSE; \ return FALSE; \
} }
@ -67,7 +67,7 @@
if (!GST_V4L2_IS_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")); \ (NULL), ("Device is not in streaming mode")); \
return FALSE; \ return FALSE; \
} }
@ -76,7 +76,7 @@
if (GST_V4L2_IS_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")); \ (NULL), ("Device is in streaming mode")); \
return FALSE; \ return FALSE; \
} }

View file

@ -72,7 +72,7 @@ gst_v4l2src_fill_format_list (GstV4l2Src *v4l2src)
if (errno == EINVAL) { if (errno == EINVAL) {
break; /* end of enumeration */ break; /* end of enumeration */
} else { } 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", ("failed to get number %d in pixelformat enumeration for %s: %s",
n, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); n, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
g_free (format); g_free (format);
@ -118,7 +118,7 @@ gst_v4l2src_queue_frame (GstV4l2Src *v4l2src,
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QBUF, &v4l2src->pool->buffers[i].buffer) < 0) { 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), (_("Could not write to device \"%s\"."), GST_V4L2ELEMENT(v4l2src)->device),
("Error queueing buffer %u on device %s", i, g_strerror(errno))); ("Error queueing buffer %u on device %s", i, g_strerror(errno)));
return FALSE; return FALSE;
} }
@ -142,7 +142,7 @@ gst_v4l2src_grab_frame (GstV4l2Src *v4l2src)
while (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &buffer) < 0) { while (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_DQBUF, &buffer) < 0) {
/* if the sync() got interrupted, we can retry */ /* if the sync() got interrupted, we can retry */
if (errno != EINTR) { 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))); GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return -1; return -1;
} }
@ -170,7 +170,7 @@ gst_v4l2src_get_capture (GstV4l2Src *v4l2src)
v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_G_FMT, &v4l2src->format) < 0) { 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", ("failed to get pixelformat for device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE; return FALSE;
@ -206,7 +206,7 @@ gst_v4l2src_set_capture (GstV4l2Src *v4l2src,
v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; v4l2src->format.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_S_FMT, &v4l2src->format) < 0) { 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", ("failed to set pixelformat to %s @ %dx%d for device %s: %s",
fmt->description, width, height, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); fmt->description, width, height, GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE; return FALSE;
@ -246,14 +246,14 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
v4l2src->breq.memory = V4L2_MEMORY_MMAP; v4l2src->breq.memory = V4L2_MEMORY_MMAP;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_REQBUFS, &v4l2src->breq) < 0) { 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), (_("Could not get buffers from device \"%s\"."), GST_V4L2ELEMENT(v4l2src)->device),
("error requesting %d buffers: %s", v4l2src->breq.count, g_strerror (errno))); ("error requesting %d buffers: %s", v4l2src->breq.count, g_strerror (errno)));
return FALSE; return FALSE;
} }
if (v4l2src->breq.count < GST_V4L2_MIN_BUFFERS) { 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), (_("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)); ("we received %d, we want at least %d", v4l2src->breq.count, GST_V4L2_MIN_BUFFERS));
v4l2src->breq.count = buffers; v4l2src->breq.count = buffers;
return FALSE; return FALSE;
@ -280,7 +280,7 @@ gst_v4l2src_capture_init (GstV4l2Src *v4l2src)
buffer->buffer.index = n; buffer->buffer.index = n;
buffer->buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE; buffer->buffer.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_QUERYBUF, &buffer->buffer) < 0) { 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))); ("Could not get buffer properties of buffer %d: %s", n, g_strerror (errno)));
gst_v4l2src_capture_deinit(v4l2src); gst_v4l2src_capture_deinit(v4l2src);
return FALSE; 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, buffer->start = mmap (0, buffer->buffer.length, PROT_READ|PROT_WRITE, MAP_SHARED,
GST_V4L2ELEMENT(v4l2src)->video_fd, buffer->buffer.m.offset); GST_V4L2ELEMENT(v4l2src)->video_fd, buffer->buffer.m.offset);
if (buffer->start == MAP_FAILED) { 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))); ("Could not mmap video buffer %d: %s", n, g_strerror (errno)));
buffer->start = 0; buffer->start = 0;
gst_v4l2src_capture_deinit (v4l2src); gst_v4l2src_capture_deinit (v4l2src);
@ -328,7 +328,7 @@ gst_v4l2src_capture_start (GstV4l2Src *v4l2src)
v4l2src->quit = FALSE; v4l2src->quit = FALSE;
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMON, &type) < 0) { 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", ("Error starting streaming capture from device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno))); GST_V4L2ELEMENT(v4l2src)->device, g_strerror(errno)));
return FALSE; return FALSE;
@ -356,7 +356,7 @@ gst_v4l2src_capture_stop (GstV4l2Src *v4l2src)
/* we actually need to sync on all queued buffers but not /* we actually need to sync on all queued buffers but not
* on the non-queued ones */ * on the non-queued ones */
if (ioctl(GST_V4L2ELEMENT(v4l2src)->video_fd, VIDIOC_STREAMOFF, &type) < 0) { 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", ("Error stopping streaming capture from device %s: %s",
GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno))); GST_V4L2ELEMENT(v4l2src)->device, g_strerror (errno)));
return FALSE; return FALSE;

View file

@ -303,7 +303,7 @@ vcdsrc_open_file(VCDSrc *src)
/* open the device */ /* open the device */
src->fd = open(src->device,O_RDONLY); src->fd = open(src->device,O_RDONLY);
if (src->fd < 0) { 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; return FALSE;
} }