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 a47dc77f18
commit 79bc3ebfa1
30 changed files with 255 additions and 102 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>
* gst/volume/gstvolume.c: (gst_volume_set_volume),

View file

@ -490,7 +490,7 @@ gst_aasink_open (GstAASink *aasink)
aasink->context = aa_autoinit (&aasink->ascii_surf);
if (aasink->context == NULL) {
GST_ELEMENT_ERROR (GST_ELEMENT (aasink), LIBRARY, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (GST_ELEMENT (aasink), LIBRARY, TOO_LAZY, (NULL),
("error opening aalib context"));
return FALSE;
}

View file

@ -783,7 +783,7 @@ gst_dvdec_loop (GstElement *element)
dvdec->bpp = 2;
}
} else {
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL), (NULL));
return;
}
}

View file

@ -267,7 +267,7 @@ gst_esdmon_get (GstPad *pad)
"channels", G_TYPE_INT, esdmon->channels
)) <= 0)
{
GST_ELEMENT_ERROR (esdmon, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (esdmon, CORE, NEGOTIATION, (NULL), (NULL));
return NULL;
}
}

View file

@ -255,7 +255,7 @@ gst_esdsink_chain (GstPad *pad, GstData *_data)
esdsink = GST_ESDSINK (gst_pad_get_parent (pad));
if (!esdsink->negotiated) {
GST_ELEMENT_ERROR (esdsink, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (esdsink, CORE, NEGOTIATION, (NULL),
("element wasn't negotiated before chain function"));
goto done;
}
@ -394,7 +394,7 @@ gst_esdsink_open_audio (GstEsdsink *sink)
if (sink->depth == 16) esdformat |= ESD_BITS16;
else if (sink->depth == 8) esdformat |= ESD_BITS8;
else {
GST_ELEMENT_ERROR (sink, STREAM, FORMAT, NULL,
GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
("invalid bit depth (%d)", sink->depth));
return FALSE;
}
@ -402,7 +402,7 @@ gst_esdsink_open_audio (GstEsdsink *sink)
if (sink->channels == 2) esdformat |= ESD_STEREO;
else if (sink->channels == 1) esdformat |= ESD_MONO;
else {
GST_ELEMENT_ERROR (sink, STREAM, FORMAT, NULL,
GST_ELEMENT_ERROR (sink, STREAM, FORMAT, (NULL),
("invalid number of channels (%d)", sink->channels));
return FALSE;
}
@ -414,7 +414,7 @@ gst_esdsink_open_audio (GstEsdsink *sink)
sink->fd = esd_play_stream(esdformat, sink->frequency, sink->host, connname);
}
if ( sink->fd < 0 ) {
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, NULL,
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (NULL),
("can't open connection to esound server"));
return FALSE;
}

View file

@ -305,7 +305,7 @@ gst_flacdec_error_callback (const FLAC__SeekableStreamDecoder *decoder,
break;
}
GST_ELEMENT_ERROR (flacdec, STREAM, DECODE, NULL, (error));
GST_ELEMENT_ERROR (flacdec, STREAM, DECODE, (NULL), (error));
}
static FLAC__SeekableStreamDecoderSeekStatus
@ -535,7 +535,7 @@ gst_flacdec_loop (GstElement *element)
GST_DEBUG ("flacdec: initializing decoder");
res = FLAC__seekable_stream_decoder_init (flacdec->decoder);
if (res != FLAC__SEEKABLE_STREAM_DECODER_OK) {
GST_ELEMENT_ERROR (flacdec, LIBRARY, INIT, NULL,
GST_ELEMENT_ERROR (flacdec, LIBRARY, INIT, (NULL),
(FLAC__SeekableStreamDecoderStateString[res]));
return;
}

View file

@ -549,7 +549,7 @@ gst_flacenc_chain (GstPad *pad, GstData *_data)
}
if (!flacenc->negotiated) {
GST_ELEMENT_ERROR (flacenc, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (flacenc, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function"));
return;
}

View file

@ -295,7 +295,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data)
gst_buffer_unref (sub);
} else {
/* FIXME: does that work well with FLAC files containing ID3v2 tags ? */
GST_ELEMENT_ERROR (tag, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (tag, STREAM, WRONG_TYPE, (NULL), (NULL));
}
}
@ -464,7 +464,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data)
g_warning ("No tags found\n");
buffer = gst_buffer_new_and_alloc (12);
if (buffer == NULL) {
GST_ELEMENT_ERROR (tag, CORE, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (tag, CORE, TOO_LAZY, (NULL),
("Error creating 12-byte buffer for padding block"));
}
bzero (GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer));
@ -481,7 +481,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data)
sizeof (header), NULL);
gst_tag_list_free (merged_tags);
if (buffer == NULL) {
GST_ELEMENT_ERROR (tag, CORE, TAG, NULL, ("Error converting tag list to vorbiscomment buffer"));
GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), ("Error converting tag list to vorbiscomment buffer"));
return;
}
size = GST_BUFFER_SIZE (buffer) - 4;
@ -490,7 +490,7 @@ gst_flac_tag_chain (GstPad *pad, GstData *data)
* while the vorbis specs allow more than that. Shouldn't
* be a real world problem though
*/
GST_ELEMENT_ERROR (tag, CORE, TAG, NULL, ("Vorbis comment of size %d too long", size));
GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), ("Vorbis comment of size %d too long", size));
return;
}
}

View file

@ -288,7 +288,7 @@ gst_gdk_pixbuf_chain (GstPad *pad, GstData *_data)
GError *error;
if (gdk_pixbuf_loader_close (filter->pixbuf_loader, &error)) {
GST_ELEMENT_ERROR (filter, LIBRARY, SHUTDOWN, NULL, (error->message));
GST_ELEMENT_ERROR (filter, LIBRARY, SHUTDOWN, (NULL), (error->message));
g_error_free (error);
return;
}

View file

@ -294,7 +294,7 @@ gst_mikmod_loop (GstElement *element)
if (!GST_PAD_CAPS (mikmod->srcpad)) {
if (gst_mikmod_negotiate (mikmod) <= 0) {
GST_ELEMENT_ERROR (mikmod, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (mikmod, CORE, NEGOTIATION, (NULL), (NULL));
return;
}
}

View file

@ -250,7 +250,8 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
if (gst_pad_try_set_caps (dv1394src->srcpad,
gst_caps_new_simple ("video/dv",
"format", G_TYPE_STRING, "PAL", NULL)) <= 0) {
GST_ELEMENT_ERROR (dv1394src, CORE, NEGOTIATION, NULL, ("Could not set source caps for PAL"));
GST_ELEMENT_ERROR (dv1394src, CORE, NEGOTIATION, (NULL),
("Could not set source caps for PAL"));
return 0;
}
} else {
@ -260,7 +261,8 @@ int gst_dv1394src_iso_receive(raw1394handle_t handle,int channel,size_t len,quad
if (gst_pad_try_set_caps (dv1394src->srcpad,
gst_caps_new_simple ("video/dv",
"format", G_TYPE_STRING, "NTSC", NULL)) <= 0) {
GST_ELEMENT_ERROR (dv1394src, CORE, NEGOTIATION, NULL, ("Could not set source caps for NTSC"));
GST_ELEMENT_ERROR (dv1394src, CORE, NEGOTIATION, (NULL),
("Could not set source caps for NTSC"));
return 0;
}
}

View file

@ -210,7 +210,7 @@ gst_speexenc_chain (GstPad *pad, GstData *_data)
"channels", G_TYPE_INT, 1,
NULL)))
{
GST_ELEMENT_ERROR (speexenc, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (speexenc, CORE, NEGOTIATION, (NULL), (NULL));
return;
}
}

View file

@ -687,7 +687,7 @@ gst_avi_demux_stream_init (GstAviDemux *avi)
if (!gst_riff_read_header (riff, &doctype))
return FALSE;
if (doctype != GST_RIFF_RIFF_AVI) {
GST_ELEMENT_ERROR (avi, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (avi, STREAM, WRONG_TYPE, (NULL), (NULL));
return FALSE;
}
@ -802,7 +802,7 @@ gst_avi_demux_add_stream (GstAviDemux *avi)
if (!(tag = gst_riff_peek_tag (riff, NULL)))
return FALSE;
if (tag != GST_RIFF_TAG_strf) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
("Invalid AVI header (no strf as second tag)"));
goto skip_stream;
}
@ -1157,7 +1157,7 @@ gst_avi_demux_stream_header (GstAviDemux *avi)
if (!(tag = gst_riff_peek_tag (riff, NULL)))
return FALSE;
if (tag != GST_RIFF_TAG_LIST) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
("Invalid AVI header (no LIST at start): "
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
return FALSE;
@ -1165,7 +1165,7 @@ gst_avi_demux_stream_header (GstAviDemux *avi)
if (!gst_riff_read_list (riff, &tag))
return FALSE;
if (tag != GST_RIFF_LIST_hdrl) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
("Invalid AVI header (no hdrl at start): "
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
return FALSE;
@ -1175,7 +1175,7 @@ gst_avi_demux_stream_header (GstAviDemux *avi)
if (!(tag = gst_riff_peek_tag (riff, NULL)))
return FALSE;
if (tag != GST_RIFF_TAG_avih) {
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (avi, STREAM, DEMUX, (NULL),
("Invalid AVI header (no avih at start): "
GST_FOURCC_FORMAT, GST_FOURCC_ARGS (tag)));
return FALSE;

View file

@ -986,7 +986,7 @@ gst_avimux_stop_file (GstAviMux *avimux)
avimux->auds_hdr.rate = (GST_SECOND * avimux->audio_size) / avimux->audio_time;
} else {
GST_ELEMENT_ERROR (avimux, STREAM, MUX,
(_("No or invalid input audio, AVI stream will be corrupt")), NULL);
(_("No or invalid input audio, AVI stream will be corrupt.")), (NULL));
avimux->auds_hdr.rate = 0;
}
avimux->auds.av_bps = avimux->auds_hdr.rate * avimux->auds_hdr.scale;

View file

@ -463,7 +463,7 @@ gst_flxdec_loop (GstElement *element)
if (flxh->type != FLX_MAGICHDR_FLI &&
flxh->type != FLX_MAGICHDR_FLC &&
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;
}

View file

@ -299,7 +299,7 @@ gst_goom_chain (GstPad *pad, GstData *_data)
}
if (goom->channels == 0) {
GST_ELEMENT_ERROR (goom, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (goom, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function"));
goto done;

View file

@ -167,7 +167,7 @@ gst_ebml_read_element_id (GstEbmlRead *ebml,
} else {
guint64 pos = gst_bytestream_tell (ebml->bs);
gst_event_unref (event);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, NULL,
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
("Read error at position %llu (0x%llx)",
pos, pos));
return -1;
@ -180,7 +180,7 @@ gst_ebml_read_element_id (GstEbmlRead *ebml,
}
if (read > 4) {
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
("Invalid EBML ID size tag (0x%x) at position %llu (0x%llx)",
data[0], pos, pos));
return -1;
@ -188,7 +188,7 @@ gst_ebml_read_element_id (GstEbmlRead *ebml,
if (gst_bytestream_peek_bytes (ebml->bs, &data, read) != read) {
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, NULL,
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
@ -219,7 +219,7 @@ gst_ebml_read_element_length (GstEbmlRead *ebml,
if (gst_bytestream_peek_bytes (ebml->bs, &data, 1) != 1) {
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, NULL,
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
@ -230,7 +230,7 @@ gst_ebml_read_element_length (GstEbmlRead *ebml,
}
if (read > 8) {
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
("Invalid EBML length size tag (0x%x) at position %llu (0x%llx)",
data[0], pos, pos));
return -1;
@ -240,7 +240,7 @@ gst_ebml_read_element_length (GstEbmlRead *ebml,
num_ffs++;
if (gst_bytestream_peek_bytes (ebml->bs, &data, read) != read) {
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, NULL,
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
("Read error at position %llu (0x%llx)", pos, pos));
return -1;
}
@ -272,7 +272,7 @@ gst_ebml_read_element_data (GstEbmlRead *ebml,
if (gst_bytestream_peek (ebml->bs, &buf, length) != length) {
guint64 pos = gst_bytestream_tell (ebml->bs);
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, NULL,
GST_ELEMENT_ERROR (ebml, RESOURCE, READ, (NULL),
("Read error at position %llu (0x%llx)", pos, pos));
if (buf)
gst_buffer_unref (buf);
@ -327,7 +327,7 @@ gst_ebml_read_seek (GstEbmlRead *ebml,
/* now seek */
if (!gst_bytestream_seek (ebml->bs, offset, GST_SEEK_METHOD_SET)) {
GST_ELEMENT_ERROR (ebml, RESOURCE, SEEK, NULL,
GST_ELEMENT_ERROR (ebml, RESOURCE, SEEK, (NULL),
("Seek to position %llu (0x%llx) failed", offset, offset));
return NULL;
}
@ -435,7 +435,7 @@ gst_ebml_read_uint (GstEbmlRead *ebml,
data = GST_BUFFER_DATA (buf);
size = GST_BUFFER_SIZE (buf);
if (size < 1 || size > 8) {
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
("Invalid integer element size %d at position %llu (0x%llu)",
size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
gst_buffer_unref (buf);
@ -471,7 +471,7 @@ gst_ebml_read_sint (GstEbmlRead *ebml,
data = GST_BUFFER_DATA (buf);
size = GST_BUFFER_SIZE (buf);
if (size < 1 || size > 8) {
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
("Invalid integer element size %d at position %llu (0x%llx)",
size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
gst_buffer_unref (buf);
@ -516,7 +516,7 @@ gst_ebml_read_float (GstEbmlRead *ebml,
size = GST_BUFFER_SIZE (buf);
if (size != 4 && size != 8 && size != 10) {
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (ebml, STREAM, DEMUX, (NULL),
("Invalid float element size %d at position %llu (0x%llx)",
size, GST_BUFFER_OFFSET (buf), GST_BUFFER_OFFSET (buf)));
gst_buffer_unref (buf);
@ -524,7 +524,7 @@ gst_ebml_read_float (GstEbmlRead *ebml,
}
if (size == 10) {
GST_ELEMENT_ERROR (ebml, CORE, NOT_IMPLEMENTED, NULL,
GST_ELEMENT_ERROR (ebml, CORE, NOT_IMPLEMENTED, (NULL),
("FIXME! 10-byte floats unimplemented"));
gst_buffer_unref (buf);
return FALSE;
@ -685,7 +685,7 @@ gst_ebml_read_header (GstEbmlRead *ebml,
if (!(id = gst_ebml_peek_id (ebml, &level_up)))
return FALSE;
if (level_up != 0 || id != GST_EBML_ID_HEADER) {
GST_ELEMENT_ERROR (ebml, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (ebml, STREAM, WRONG_TYPE, (NULL), (NULL));
return FALSE;
}
if (!gst_ebml_read_master (ebml, &id))

View file

@ -1130,7 +1130,7 @@ gst_matroska_demux_init_stream (GstMatroskaDemux *demux)
return FALSE;
if (!doctype || strcmp (doctype, "matroska") != 0) {
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE, NULL,
GST_ELEMENT_ERROR (demux, STREAM, WRONG_TYPE, (NULL),
("Input is not a matroska stream (doctype=%s)",
doctype ? doctype : "none"));
g_free (doctype);
@ -1138,7 +1138,7 @@ gst_matroska_demux_init_stream (GstMatroskaDemux *demux)
}
g_free (doctype);
if (version > 1) {
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, NULL,
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL),
("Demuxer version (1) is too old to read stream version %d",
version));
return FALSE;
@ -1634,7 +1634,7 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux *demux,
/* first byte(s): blocknum */
if ((n = gst_matroska_ebmlnum_uint (data, size, &num)) < 0) {
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, NULL, ("Data error"));
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL), ("Data error"));
gst_buffer_unref (buf);
res = FALSE;
break;
@ -1705,7 +1705,7 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux *demux,
case 0x3: /* EBML lacing */ {
guint total;
if ((n = gst_matroska_ebmlnum_uint (data, size, &num)) < 0) {
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, NULL, ("Data error"));
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL), ("Data error"));
res = FALSE;
break;
}
@ -1715,7 +1715,7 @@ gst_matroska_demux_parse_blockgroup (GstMatroskaDemux *demux,
gint64 snum;
gint r;
if ((r = gst_matroska_ebmlnum_sint (data, size, &snum)) < 0) {
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, NULL, ("Data error"));
GST_ELEMENT_ERROR (demux, STREAM, DEMUX, (NULL), ("Data error"));
res = FALSE;
break;
}

View file

@ -230,7 +230,7 @@ gst_monoscope_chain (GstPad *pad, GstData *_data)
GST_DEBUG ("making new pad");
if (!gst_pad_is_negotiated (monoscope->srcpad)) {
if (gst_pad_renegotiate (monoscope->srcpad) <= 0) {
GST_ELEMENT_ERROR (monoscope, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (monoscope, CORE, NEGOTIATION, (NULL), (NULL));
return;
}
}

View file

@ -371,7 +371,7 @@ gst_smpte_loop (GstElement *element)
"framerate", G_TYPE_DOUBLE, smpte->fps, NULL);
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;
}
}

View file

@ -588,7 +588,7 @@ gst_wavenc_chain (GstPad *pad,
if (!wavenc->setup) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (wavenc, CORE, NEGOTIATION, NULL, ("encoder not initialised (input is not audio?)"));
GST_ELEMENT_ERROR (wavenc, CORE, NEGOTIATION, (NULL), ("encoder not initialised (input is not audio?)"));
return;
}

View file

@ -636,7 +636,7 @@ gst_wavparse_parse_fmt (GstWavParse *wavparse, guint size)
break;
default:
GST_ELEMENT_ERROR (wavparse, STREAM, NOT_IMPLEMENTED, NULL, ("format %d not handled", wavparse->format));
GST_ELEMENT_ERROR (wavparse, STREAM, NOT_IMPLEMENTED, (NULL), ("format %d not handled", wavparse->format));
return;
}
@ -731,7 +731,7 @@ gst_wavparse_loop (GstElement *element)
if (event && GST_EVENT_TYPE (event) == GST_EVENT_EOS) {
gst_pad_event_default (wavparse->sinkpad, event);
} else {
GST_ELEMENT_ERROR (element, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (element, RESOURCE, READ, (NULL), (NULL));
}
return;
}
@ -808,7 +808,7 @@ gst_wavparse_loop (GstElement *element)
case GST_WAVPARSE_START:
if (chunk.id != GST_RIFF_TAG_RIFF &&
chunk.type != GST_RIFF_RIFF_WAVE) {
GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, NULL,
GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL),
("chunk.id %08x chunk.type %08x", chunk.id, chunk.type));
return;
}

View file

@ -699,31 +699,37 @@ gst_osselement_open_audio (GstOssElement *oss)
switch (errno) {
case EBUSY:
GST_ELEMENT_ERROR (oss, RESOURCE, BUSY,
(_("OSS device \"%s\" is already in use by another program"), oss->device), NULL);
(_("OSS device \"%s\" is already in use by another program."), oss->device),
(NULL));
break;
case EACCES:
case ETXTBSY:
if (mode == GST_OSSELEMENT_WRITE)
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE,
(_("Could not access device \"%s\", check its permissions"), oss->device), GST_ERROR_SYSTEM);
(_("Could not access device \"%s\", check its permissions."), oss->device),
GST_ERROR_SYSTEM);
else
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ,
(_("Could not access device \"%s\", check its permissions"), oss->device), GST_ERROR_SYSTEM);
(_("Could not access device \"%s\", check its permissions."), oss->device),
GST_ERROR_SYSTEM);
break;
case ENXIO:
case ENODEV:
case ENOENT:
GST_ELEMENT_ERROR (oss, RESOURCE, NOT_FOUND,
(_("Device \"%s\" does not exist"), oss->device), GST_ERROR_SYSTEM);
(_("Device \"%s\" does not exist."), oss->device),
GST_ERROR_SYSTEM);
break;
default:
/* FIXME: strerror is not threadsafe */
if (mode == GST_OSSELEMENT_WRITE)
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_WRITE,
(_("Could not open device \"%s\" for writing"), oss->device), GST_ERROR_SYSTEM);
(_("Could not open device \"%s\" for writing."), oss->device),
GST_ERROR_SYSTEM);
else
GST_ELEMENT_ERROR (oss, RESOURCE, OPEN_READ,
(_("Could not open device \"%s\" for reading"), oss->device), GST_ERROR_SYSTEM);
(_("Could not open device \"%s\" for reading."), oss->device),
GST_ERROR_SYSTEM);
break;
}
return FALSE;

View file

@ -350,7 +350,7 @@ gst_osssink_chain (GstPad *pad, GstData *_data)
if (!GST_OSSELEMENT (osssink)->bps) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (osssink, CORE, NEGOTIATION, NULL, ("format wasn't negotiated before chain function"));
GST_ELEMENT_ERROR (osssink, CORE, NEGOTIATION, (NULL), ("format wasn't negotiated before chain function"));
return;
}

View file

@ -305,13 +305,13 @@ gst_osssrc_get (GstPad *pad)
/* nothing was negotiated, we can decide on a format */
if (!gst_osssrc_negotiate (pad)) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL), (NULL));
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
}
}
if (GST_OSSELEMENT (src)->bps == 0) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before chain function"));
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
}
@ -320,7 +320,7 @@ gst_osssrc_get (GstPad *pad)
src->buffersize);
if (readbytes < 0) {
gst_buffer_unref (buf);
GST_ELEMENT_ERROR (src, RESOURCE, READ, NULL, GST_ERROR_SYSTEM);
GST_ELEMENT_ERROR (src, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
}

View file

@ -817,7 +817,7 @@ gst_v4l2src_get (GstPad *pad)
if (v4l2src->use_fixed_fps &&
(fps = gst_v4l2src_get_fps(v4l2src)) == 0) {
GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, NULL, ("could not get frame rate for element"));
GST_ELEMENT_ERROR (v4l2src, RESOURCE, SETTINGS, (NULL), ("could not get frame rate for element"));
return NULL;
}

View file

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

View file

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

View file

@ -40,7 +40,7 @@
if (!GST_V4L2_IS_OPEN(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is not open")), NULL); \
(_("Device is not open.")), (NULL)); \
return FALSE; \
}
@ -49,7 +49,7 @@
if (GST_V4L2_IS_OPEN(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
(_("Device is open")), NULL); \
(_("Device is open.")), (NULL)); \
return FALSE; \
}
@ -58,7 +58,7 @@
if (!GST_V4L2_IS_OVERLAY(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
NULL, ("Device cannot handle overlay")); \
(NULL), ("Device cannot handle overlay")); \
return FALSE; \
}
@ -67,7 +67,7 @@
if (!GST_V4L2_IS_ACTIVE(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
NULL, ("Device is not in streaming mode")); \
(NULL), ("Device is not in streaming mode")); \
return FALSE; \
}
@ -76,7 +76,7 @@
if (GST_V4L2_IS_ACTIVE(element)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
NULL, ("Device is in streaming mode")); \
(NULL), ("Device is in streaming mode")); \
return FALSE; \
}

View file

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