+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),
GstCaps *old = gst_alsa_caps (this->format->format, this->format->rate, this->format->channels);
for (--i; i >= 0; i--) {
if (gst_pad_try_set_caps (this->pad[i], old) == GST_PAD_LINK_REFUSED) {
- GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("could not reset caps to a sane value"));
gst_caps_free (old);
break;
g_free (this->format);
this->format = format;
if (! gst_alsa_start_audio (this)) {
- GST_ELEMENT_ERROR (this, RESOURCE, SETTINGS, NULL, NULL);
+ GST_ELEMENT_ERROR (this, RESOURCE, SETTINGS, (NULL), (NULL));
return GST_PAD_LINK_REFUSED;
}
}
if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
- GST_ELEMENT_ERROR (this, RESOURCE, FAILED, NULL,
+ GST_ELEMENT_ERROR (this, RESOURCE, FAILED, (NULL),
("Error restarting audio after xrun"));
}
}
}
/* caps nego failed somewhere */
if (this->format == NULL) {
- GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, (NULL),
("ALSA format not negotiated"));
}
samplestamp = gst_alsa_timestamp_to_samples (this, GST_BUFFER_TIMESTAMP (sink->buf[i]));
/* set the caps on all pads */
if (!this->format) {
if (!gst_alsa_src_set_caps (src, FALSE)) {
- GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, (NULL),
("ALSA format not negotiated"));
return;
}
sink->erase);
}
GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE,
- (_("Could not open vfs file \"%s\" for writing"), sink->filename),
+ (_("Could not open vfs file \"%s\" for writing."), sink->filename),
GST_ERROR_SYSTEM);
return FALSE;
}
if (result != GNOME_VFS_OK)
GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE,
- (_("Could not close vfs file \"%s\""), sink->filename),
+ (_("Could not close vfs file \"%s\"."), sink->filename),
GST_ERROR_SYSTEM);
}
return TRUE;
GST_DEBUG ("audiocast: registering listener");
if (audiocast_register_listener(&src->audiocast_port, &src->audiocast_fd) < 0) {
- GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, NULL,
+ GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (NULL),
("Unable to listen on UDP port %d", src->audiocast_port));
close(src->audiocast_fd);
return FALSE;
GST_DEBUG ("audiocast: creating audiocast thread");
src->audiocast_thread = g_thread_create((GThreadFunc) audiocast_thread_run, src, TRUE, &error);
if (error != NULL) {
- GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, (NULL),
("Unable to create thread: %s", error->message));
close(src->audiocast_fd);
return FALSE;
src->uri = gnome_vfs_uri_new(src->filename);
if (!src->uri) {
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
- (_("Could not open vfs file \"%s\" for reading"), src->filename), GST_ERROR_SYSTEM);
+ (_("Could not open vfs file \"%s\" for reading."), src->filename), GST_ERROR_SYSTEM);
return FALSE;
}
}
escaped = gnome_vfs_unescape_string_for_display (src->filename);
GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ,
- (_("Could not open vfs file \"%s\" for reading"), escaped),
+ (_("Could not open vfs file \"%s\" for reading."), escaped),
(gnome_vfs_result_to_string (result)));
g_free (escaped);
return FALSE;
memcpy (data, GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer));
if (ogg_sync_wrote (&ogg->sync, GST_BUFFER_SIZE (buffer)) != 0) {
gst_data_unref (buffer);
- GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, NULL, ("ogg_sync_wrote failed"));
+ GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, (NULL), ("ogg_sync_wrote failed"));
return;
}
offset_end = GST_BUFFER_OFFSET_IS_VALID (buffer) ?
GST_DEBUG_OBJECT (ogg, "stream can seek, try setup now");
if (!gst_pad_send_event (GST_PAD_PEER (ogg->sinkpad),
gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, 0))) {
- GST_ELEMENT_ERROR (ogg, CORE, SEEK, NULL,
+ GST_ELEMENT_ERROR (ogg, CORE, SEEK, (NULL),
("stream can seek to end, but not to start. Can't handle that."));
}
gst_ogg_add_chain (ogg);
/* FIXME: monitor if we are still in creation stage? */
cur = gst_ogg_pad_new (ogg, ogg_page_serialno (page));
if (!cur) {
- GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, NULL, ("Creating ogg_stream struct failed."));
+ GST_ELEMENT_ERROR (ogg, LIBRARY, TOO_LAZY, (NULL), ("Creating ogg_stream struct failed."));
return;
}
if (ogg->current_chain == -1) {
}
}
if (cur == NULL) {
- GST_ELEMENT_ERROR (ogg, STREAM, DECODE, NULL, ("invalid ogg stream serial no"));
+ GST_ELEMENT_ERROR (ogg, STREAM, DECODE, (NULL), ("invalid ogg stream serial no"));
return;
}
if (ogg_stream_pagein (&cur->stream, page) != 0) {
if (!vorbisenc->setup) {
gst_buffer_unref (buf);
- GST_ELEMENT_ERROR (vorbisenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not audio?)"));
+ GST_ELEMENT_ERROR (vorbisenc, CORE, NEGOTIATION, (NULL), ("encoder not initialized (input is not audio?)"));
return;
}
/* open our custom vorbisfile data object with the callbacks we provide */
if (ov_open_callbacks (vorbisfile, &vorbisfile->vf, NULL, 0,
vorbisfile_ov_callbacks) < 0) {
- GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, NULL, NULL);
+ GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, (NULL), (NULL));
return;
}
vorbisfile->need_discont = TRUE;
gst_pad_event_default (riff->sinkpad, event);
} else {
gst_event_unref (event);
- GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
}
}
GstBuffer *buf = NULL;
if (gst_bytestream_peek (riff->bs, &buf, length) != length) {
- GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
if (buf)
gst_buffer_unref (buf);
return NULL;
/* now seek */
if (!gst_bytestream_seek (riff->bs, offset, GST_SEEK_METHOD_SET)) {
- GST_ELEMENT_ERROR (riff, RESOURCE, SEEK, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, SEEK, (NULL), (NULL));
return NULL;
}
}
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;
}
}
gst_bytestream_flush_fast (riff->bs, 8);
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
- GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
if (!gst_riff_peek_head (riff, &tag, &length, NULL))
return FALSE;
if (tag != GST_RIFF_TAG_RIFF) {
- GST_ELEMENT_ERROR (riff, STREAM, WRONG_TYPE, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, STREAM, WRONG_TYPE, (NULL), (NULL));
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 8);
/* doctype */
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
- GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
+ GST_ELEMENT_ERROR (riff, RESOURCE, READ, (NULL), (NULL));
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
buf_out = gst_buffer_new_and_alloc (1024);
if (buf_out == NULL) {
- GST_ELEMENT_ERROR (adder, CORE, TOO_LAZY, NULL, ("could not get new output buffer"));
+ GST_ELEMENT_ERROR (adder, CORE, TOO_LAZY, (NULL),
+ ("could not get new output buffer"));
return;
}
for (i = 0; i < GST_BUFFER_SIZE (buf_out); i++)
out[i] = CLAMP(out[i] + in[i], 0x80, 0x7f);
} else {
- GST_ELEMENT_ERROR (adder, STREAM, FORMAT, NULL,
+ GST_ELEMENT_ERROR (adder, STREAM, FORMAT, (NULL),
("invalid width (%u) for integer audio in gstadder",
adder->width));
return;
for (i = 0; i < GST_BUFFER_SIZE (buf_out) / sizeof (gfloat); i++)
out[i] = CLAMP(out[i] + in[i], -1.0, 1.0);
} else {
- GST_ELEMENT_ERROR (adder, STREAM, FORMAT, NULL,
+ GST_ELEMENT_ERROR (adder, STREAM, FORMAT, (NULL),
("invalid width (%u) for float audio in gstadder",
adder->width));
return;
}
} else {
- GST_ELEMENT_ERROR (adder, STREAM, FORMAT, NULL,
+ GST_ELEMENT_ERROR (adder, STREAM, FORMAT, (NULL),
("invalid audio format (%d) in gstadder",
adder->format));
return;
if (!GST_PAD_CAPS (src->srcpad)) {
if (gst_sinesrc_link (src->srcpad,
gst_pad_get_allowed_caps (src->srcpad)) <= 0) {
- GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, NULL, NULL);
+ GST_ELEMENT_ERROR (src, CORE, NEGOTIATION, (NULL), (NULL));
return NULL;
}
}
}
if (GST_BUFFER_SIZE (buffer) == 0)
- GST_ELEMENT_ERROR (tag, CORE, TAG, NULL, ("empty buffers are not allowed in vorbis data"));
+ GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), ("empty buffers are not allowed in vorbis data"));
if (GST_BUFFER_DATA (buffer)[0] == 3) {
gchar *vendor;
gst_data_unref (data);
if (list == NULL) {
- GST_ELEMENT_ERROR (tag, CORE, TAG, NULL, ("invalid data in vorbis comments"));
+ GST_ELEMENT_ERROR (tag, CORE, TAG, (NULL), ("invalid data in vorbis comments"));
return;
}
gst_element_found_tags_for_pad (GST_ELEMENT (tag), tag->srcpad, 0,
videotestsrc = GST_VIDEOTESTSRC (gst_pad_get_parent (pad));
if (videotestsrc->fourcc == NULL) {
- GST_ELEMENT_ERROR (videotestsrc, CORE, NEGOTIATION, NULL,
+ GST_ELEMENT_ERROR (videotestsrc, CORE, NEGOTIATION, (NULL),
("format wasn't negotiated before get function"));
return NULL;
}
/* check size */
if (GST_BUFFER_SIZE(buf) > v4lmjpegsink->breq.size)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, WRITE, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, WRITE, (NULL),
("Buffer too big (%d KB), max. buffersize is %ld KB",
GST_BUFFER_SIZE(buf)/1024, v4lmjpegsink->breq.size/1024));
return;
}
if (n == v4lmjpegsrc->breq.count)
- GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, TOO_LAZY, (NULL),
("Couldn't find the buffer"));
}
}
if (n == v4lsrc->mbuf.frames)
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, (NULL),
("Couldn\'t find the buffer"));
}
{
case -1:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, FAILED,
- (_("Could not start v4l-conf")), GST_ERROR_SYSTEM);
+ (_("Could not start v4l-conf.")), GST_ERROR_SYSTEM);
g_free(buff);
return FALSE;
case 0:
break;
default:
GST_ELEMENT_ERROR (v4lelement, RESOURCE, FAILED,
- (_("Executing v4l-conf failed")), GST_ERROR_SYSTEM);
+ (_("Executing v4l-conf failed.")), GST_ERROR_SYSTEM);
g_free(buff);
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSWIN, &vwin) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, (NULL),
("Failed to set the video window: %s", g_strerror (errno)));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCCAPTURE, &doit) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, TOO_LAZY, (NULL),
("Failed to %s overlay display: %s",
enable?"enable":"disable", g_strerror (errno)));
return FALSE;
if (ioctl(v4lelement->video_fd, VIDIOCGCAP, &(v4lelement->vcap)) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("error getting capabilities %s of from device %s",
g_strerror (errno), v4lelement->videodev));
return FALSE;
/* be sure we have a device */
if (!v4lelement->videodev) {
GST_ELEMENT_ERROR (v4lelement, RESOURCE, NOT_FOUND,
- (_("No device specified")), NULL);
+ (_("No device specified.")), (NULL));
return FALSE;
}
if (!GST_V4L_IS_OPEN(v4lelement))
{
GST_ELEMENT_ERROR (v4lelement, RESOURCE, OPEN_READ_WRITE,
- (_("Could not open device \"%s\" for reading and writing"), v4lelement->videodev),
+ (_("Could not open device \"%s\" for reading and writing."), v4lelement->videodev),
GST_ERROR_SYSTEM);
return FALSE;
}
!(v4lelement->vcap.type & VID_TYPE_MJPEG_ENCODER)) ||
(GST_IS_V4LMJPEGSINK(v4lelement) &&
!(v4lelement->vcap.type & VID_TYPE_MJPEG_DECODER))) {
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Device opened, but wrong type (0x%x)",
v4lelement->vcap.type));
close(v4lelement->video_fd);
if (ioctl(v4lelement->video_fd, VIDIOCSCHAN, &(v4lelement->vchan)) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting the channel/norm settings: %s",
g_strerror(errno)));
return FALSE;
if (ioctl(v4lelement->video_fd, VIDIOCGCHAN, &(v4lelement->vchan)) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting the channel/norm settings: %s",
g_strerror(errno)));
return FALSE;
tuner.tuner = tunernum;
if (ioctl(v4lelement->video_fd, VIDIOCGTUNER, &tuner) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting tuner signal: %s", g_strerror (errno)));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCGFREQ, frequency) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting tuner frequency: %s", g_strerror (errno)));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSFREQ, &frequency) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting tuner frequency: %s", g_strerror (errno)));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCGPICT, &vpic) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting picture parameters: %s", g_strerror (errno)));
return FALSE;
}
*value = vpic.colour;
break;
default:
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting picture parameters: unknown type %d", type));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCGPICT, &vpic) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting picture parameters: %s", g_strerror (errno)));
return FALSE;
}
vpic.colour = value;
break;
default:
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting picture parameters: unknown type %d", type));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSPICT, &vpic) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting picture parameters: %s", g_strerror (errno)));
return FALSE;
}
vau.audio = audionum;
if (ioctl(v4lelement->video_fd, VIDIOCGAUDIO, &vau) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting audio parameters: %s", g_strerror (errno)));
return FALSE;
}
*value = vau.mode;
break;
default:
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting audio parameters: unknown type %d", type));
return FALSE;
}
vau.audio = audionum;
if (ioctl(v4lelement->video_fd, VIDIOCGAUDIO, &vau) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error getting audio parameters: %s", g_strerror (errno)));
return FALSE;
}
case V4L_AUDIO_MUTE:
if (!(vau.flags & VIDEO_AUDIO_MUTABLE))
{
- GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, NULL,
+ GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, (NULL),
("Error setting audio mute: (un)setting mute is not supported"));
return FALSE;
}
case V4L_AUDIO_VOLUME:
if (!(vau.flags & VIDEO_AUDIO_VOLUME))
{
- GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, NULL,
+ GST_ELEMENT_ERROR (v4lelement, CORE, NOT_IMPLEMENTED, (NULL),
("Error setting audio volume: setting volume is not supported"));
return FALSE;
}
vau.mode = value;
break;
default:
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting audio parameters: unknown type %d", type));
return FALSE;
}
if (ioctl(v4lelement->video_fd, VIDIOCSAUDIO, &vau) < 0)
{
- GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, NULL,
+ GST_ELEMENT_ERROR (v4lelement, RESOURCE, SETTINGS, (NULL),
("Error setting audio parameters: %s", g_strerror (errno)));
return FALSE;
}
if (element->video_fd <= 0) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
- (_("Device is not open")), NULL); \
+ (_("Device is not open.")), (NULL)); \
return FALSE; \
}
if (element->video_fd != -1) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
- (_("Device is open")), NULL); \
+ (_("Device is open.")), (NULL)); \
return FALSE; \
}
if (!(element->vcap.type & VID_TYPE_OVERLAY)) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, TOO_LAZY, \
- NULL, ("Device cannot handle overlay")); \
+ (NULL), ("Device cannot handle overlay")); \
return FALSE; \
}
if (element->buffer == NULL) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
- NULL, ("Device is not in streaming mode")); \
+ (NULL), ("Device is not in streaming mode")); \
return FALSE; \
}
if (element->buffer != NULL) \
{ \
GST_ELEMENT_ERROR (element, RESOURCE, SETTINGS, \
- NULL, ("Device is in streaming mode")); \
+ (NULL), ("Device is in streaming mode")); \
return FALSE; \
}
if (ioctl(GST_V4LELEMENT(v4lmjpegsink)->video_fd, MJPIOC_SYNC,
&(v4lmjpegsink->bsync)) < 0)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, SYNC, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, SYNC, (NULL),
("Failed to sync on frame %d: %s",
frame, g_strerror (errno)));
g_mutex_lock(v4lmjpegsink->mutex_queued_frames);
/* be sure that we're not confusing */
if (frame != v4lmjpegsink->bsync.frame)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, CORE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, CORE, TOO_LAZY, (NULL),
("Internal error: frame number confusion"));
goto end;
}
/* queue on this frame */
if (ioctl(GST_V4LELEMENT(v4lmjpegsink)->video_fd, MJPIOC_QBUF_PLAY, &num) < 0)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, WRITE, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, WRITE, (NULL),
("Failed to queue frame %d: %s",
num, g_strerror(errno)));
return FALSE;
if (ioctl(GST_V4LELEMENT(v4lmjpegsink)->video_fd, MJPIOC_G_PARAMS, &bparm) < 0)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, SETTINGS, NULL, GST_ERROR_SYSTEM);
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, SETTINGS, (NULL), GST_ERROR_SYSTEM);
return FALSE;
}
if (width > mw || height > mh)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, (NULL),
("Video dimensions (%dx%d) are larger than device max (%dx%d)",
width, height, mw, mh));
return FALSE;
{
if (height > mh/2)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, (NULL),
("Video dimensions (%dx%d) too large for non-interlaced playback (%dx%d)",
width, height, mw, mh/2));
return FALSE;
if (ioctl(GST_V4LELEMENT(v4lmjpegsink)->video_fd, MJPIOC_S_PARAMS, &bparm) < 0)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, SETTINGS, NULL, GST_ERROR_SYSTEM);
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, SETTINGS, (NULL), GST_ERROR_SYSTEM);
return FALSE;
}
/* Request buffers */
if (ioctl(GST_V4LELEMENT(v4lmjpegsink)->video_fd, MJPIOC_REQBUFS, &(v4lmjpegsink->breq)) < 0)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, READ, NULL, GST_ERROR_SYSTEM);
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, READ, (NULL), GST_ERROR_SYSTEM);
return FALSE;
}
PROT_READ|PROT_WRITE, MAP_SHARED, GST_V4LELEMENT(v4lmjpegsink)->video_fd, 0);
if (GST_V4LELEMENT(v4lmjpegsink)->buffer == MAP_FAILED)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, (NULL),
("Error mapping video buffers: %s",
g_strerror(errno)));
GST_V4LELEMENT(v4lmjpegsink)->buffer = NULL;
malloc(sizeof(gint8) * v4lmjpegsink->breq.count);
if (!v4lmjpegsink->isqueued_queued_frames)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, (NULL),
("Failed to create queue tracker: %s",
g_strerror(errno)));
return FALSE;
malloc(sizeof(GCond *) * v4lmjpegsink->breq.count);
if (!v4lmjpegsink->cond_queued_frames)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, (NULL),
("Failed to create queue condition holders: %s",
g_strerror(errno)));
return FALSE;
gst_v4lmjpegsink_sync_thread, (void *) v4lmjpegsink, TRUE, &error);
if(!v4lmjpegsink->thread_queued_frames)
{
- GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsink, RESOURCE, TOO_LAZY, (NULL),
("Failed to create sync thread: %s", error->message));
return FALSE;
}
if (ioctl(GST_V4LELEMENT(v4lmjpegsrc)->video_fd, MJPIOC_QBUF_CAPT, &num) < 0)
{
- GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4lmjpegsrc, RESOURCE, READ, (NULL),
("Error queueing a buffer (%d): %s",
num, g_strerror(errno)));
return FALSE;
if (ioctl(GST_V4LELEMENT(v4lsrc)->video_fd,
VIDIOCMCAPTURE, &(v4lsrc->mmap)) < 0)
{
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, WRITE, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, WRITE, (NULL),
("Error queueing a buffer (%d): %s", num, g_strerror (errno)));
return FALSE;
}
/* if the sync() got interrupted, we can retry */
if (errno != EINTR) {
v4lsrc->frame_queue_state[num] = QUEUE_STATE_ERROR;
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, SYNC, NULL, GST_ERROR_SYSTEM);
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, SYNC, (NULL), GST_ERROR_SYSTEM);
return FALSE;
}
DEBUG("Sync got interrupted");
/* request buffer info */
if (ioctl(GST_V4LELEMENT(v4lsrc)->video_fd, VIDIOCGMBUF, &(v4lsrc->mbuf)) < 0)
{
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, (NULL),
("Error getting buffer information: %s", g_strerror (errno)));
return FALSE;
}
if (v4lsrc->mbuf.frames < MIN_BUFFERS_QUEUED)
{
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, (NULL),
("Not enough buffers. We got %d, we want at least %d",
v4lsrc->mbuf.frames, MIN_BUFFERS_QUEUED));
return FALSE;
PROT_READ|PROT_WRITE, MAP_SHARED, GST_V4LELEMENT(v4lsrc)->video_fd, 0);
if (GST_V4LELEMENT(v4lsrc)->buffer == MAP_FAILED)
{
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, (NULL),
("Error mapping video buffers: %s", g_strerror (errno)));
GST_V4LELEMENT(v4lsrc)->buffer = NULL;
return FALSE;
g_mutex_lock(v4lsrc->mutex_queue_state);
if (v4lsrc->frame_queue_state[num] != QUEUE_STATE_SYNCED) {
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, (NULL),
("Invalid state %d (expected %d), can't requeue",
v4lsrc->frame_queue_state[num],
QUEUE_STATE_SYNCED));
/* let's start by requesting a buffer and mmap()'ing it */
if (ioctl(GST_V4LELEMENT(v4lsrc)->video_fd, VIDIOCGMBUF, &vmbuf) < 0)
{
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, READ, (NULL),
("Error getting buffer information: %s", g_strerror(errno)));
return FALSE;
}
MAP_SHARED, GST_V4LELEMENT(v4lsrc)->video_fd, 0);
if (buffer == MAP_FAILED)
{
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, (NULL),
("Error mapping our try-out buffer: %s", g_strerror(errno)));
return FALSE;
}
if (ioctl(GST_V4LELEMENT(v4lsrc)->video_fd, VIDIOCMCAPTURE, &vmmap) < 0)
{
if (errno != EINVAL) /* our format failed! */
- GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (v4lsrc, RESOURCE, TOO_LAZY, (NULL),
("Error queueing our try-out buffer: %s", g_strerror(errno)));
munmap(buffer, vmbuf.size);
return FALSE;
{
g_mutex_unlock (ximagesink->x_lock);
g_free (xcontext);
- GST_ELEMENT_ERROR (ximagesink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (ximagesink, RESOURCE, TOO_LAZY, (NULL),
("Could not open display"));
return NULL;
}
else /* No image available. Something went wrong during capsnego ! */
{
gst_buffer_unref (buf);
- GST_ELEMENT_ERROR (ximagesink, CORE, NEGOTIATION, NULL, ("no format defined before chain function"));
+ GST_ELEMENT_ERROR (ximagesink, CORE, NEGOTIATION, (NULL), ("no format defined before chain function"));
return;
}
}
{
g_mutex_unlock (xvimagesink->x_lock);
g_free (xcontext);
- GST_ELEMENT_ERROR (xvimagesink, RESOURCE, TOO_LAZY, NULL,
+ GST_ELEMENT_ERROR (xvimagesink, RESOURCE, TOO_LAZY, (NULL),
("Could not open display"));
return NULL;
}
else /* No image available. Something went wrong during capsnego ! */
{
gst_buffer_unref (buf);
- GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, NULL, ("no format defined before chain function"));
+ GST_ELEMENT_ERROR (xvimagesink, CORE, NEGOTIATION, (NULL), ("no format defined before chain function"));
return;
}
}