diff options
author | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-29 23:20:45 +0000 |
---|---|---|
committer | Thomas Vander Stichele <thomas@apestaart.org> | 2004-01-29 23:20:45 +0000 |
commit | 03caa97b73186756d200772536cb1ef441ddcff3 (patch) | |
tree | 1a46fa4b73275b537d2e9cc863a2269c6be7f769 /ext | |
parent | 1e9f5c82bec886896e6a0c4fc6d79de5649d9bb8 (diff) |
GST_ELEMENT_ERROR
Original commit message from CVS:
GST_ELEMENT_ERROR
Diffstat (limited to 'ext')
-rw-r--r-- | ext/alsa/gstalsa.c | 6 | ||||
-rw-r--r-- | ext/alsa/gstalsasink.c | 2 | ||||
-rw-r--r-- | ext/alsa/gstalsasrc.c | 2 | ||||
-rw-r--r-- | ext/gnomevfs/gstgnomevfssink.c | 4 | ||||
-rw-r--r-- | ext/gnomevfs/gstgnomevfssrc.c | 8 | ||||
-rw-r--r-- | ext/ogg/gstoggdemux.c | 10 | ||||
-rw-r--r-- | ext/vorbis/vorbisdec.c | 8 | ||||
-rw-r--r-- | ext/vorbis/vorbisenc.c | 2 | ||||
-rw-r--r-- | ext/vorbis/vorbisfile.c | 2 |
9 files changed, 22 insertions, 22 deletions
diff --git a/ext/alsa/gstalsa.c b/ext/alsa/gstalsa.c index 4016ad2c4..b41765bc9 100644 --- a/ext/alsa/gstalsa.c +++ b/ext/alsa/gstalsa.c @@ -658,7 +658,7 @@ gst_alsa_link (GstPad *pad, const GstCaps *caps) GstCaps *old = gst_alsa_caps (this->format->format, this->format->rate, this->format->channels); for (--i; i >= 0; i--) { if (gst_pad_try_set_caps (this->pad[i], old) == GST_PAD_LINK_REFUSED) { - gst_element_error (this, CORE, NEGOTIATION, NULL, + GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL, ("could not reset caps to a sane value")); gst_caps_free (old); break; @@ -680,7 +680,7 @@ gst_alsa_link (GstPad *pad, const GstCaps *caps) g_free (this->format); this->format = format; if (! gst_alsa_start_audio (this)) { - gst_element_error (this, RESOURCE, SETTINGS, NULL, NULL); + GST_ELEMENT_ERROR (this, RESOURCE, SETTINGS, NULL, NULL); return GST_PAD_LINK_REFUSED; } @@ -873,7 +873,7 @@ gst_alsa_xrun_recovery (GstAlsa *this) } if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) { - gst_element_error (this, RESOURCE, FAILED, NULL, + GST_ELEMENT_ERROR (this, RESOURCE, FAILED, NULL, ("Error restarting audio after xrun")); } } diff --git a/ext/alsa/gstalsasink.c b/ext/alsa/gstalsasink.c index d6160a71f..3c205cf06 100644 --- a/ext/alsa/gstalsasink.c +++ b/ext/alsa/gstalsasink.c @@ -342,7 +342,7 @@ sink_restart: } /* caps nego failed somewhere */ if (this->format == NULL) { - gst_element_error (this, CORE, NEGOTIATION, NULL, + GST_ELEMENT_ERROR (this, CORE, NEGOTIATION, NULL, ("ALSA format not negotiated")); } samplestamp = gst_alsa_timestamp_to_samples (this, GST_BUFFER_TIMESTAMP (sink->buf[i])); diff --git a/ext/alsa/gstalsasrc.c b/ext/alsa/gstalsasrc.c index 273ba9b2e..d7f28a7aa 100644 --- a/ext/alsa/gstalsasrc.c +++ b/ext/alsa/gstalsasrc.c @@ -311,7 +311,7 @@ gst_alsa_src_loop (GstElement *element) /* set the caps on all pads */ if (!this->format) { if (!gst_alsa_src_set_caps (src, FALSE)) { - gst_element_error (element, CORE, NEGOTIATION, NULL, + GST_ELEMENT_ERROR (element, CORE, NEGOTIATION, NULL, ("ALSA format not negotiated")); return; } diff --git a/ext/gnomevfs/gstgnomevfssink.c b/ext/gnomevfs/gstgnomevfssink.c index 7b6758aaf..e28e0a739 100644 --- a/ext/gnomevfs/gstgnomevfssink.c +++ b/ext/gnomevfs/gstgnomevfssink.c @@ -282,7 +282,7 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink) gst_gnomevfssink_signals[SIGNAL_ERASE_ASK], 0, sink->erase); } - gst_element_error (sink, RESOURCE, OPEN_WRITE, + GST_ELEMENT_ERROR (sink, RESOURCE, OPEN_WRITE, (_("Could not open vfs file \"%s\" for writing"), sink->filename), GST_ERROR_SYSTEM); return FALSE; @@ -307,7 +307,7 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink *sink) result = gnome_vfs_close(sink->handle); if (result != GNOME_VFS_OK) - gst_element_error (sink, RESOURCE, CLOSE, + GST_ELEMENT_ERROR (sink, RESOURCE, CLOSE, (_("Could not close vfs file \"%s\""), sink->filename), GST_ERROR_SYSTEM); } diff --git a/ext/gnomevfs/gstgnomevfssrc.c b/ext/gnomevfs/gstgnomevfssrc.c index 0bd160f4a..05b541dc8 100644 --- a/ext/gnomevfs/gstgnomevfssrc.c +++ b/ext/gnomevfs/gstgnomevfssrc.c @@ -525,7 +525,7 @@ static int audiocast_init(GstGnomeVFSSrc *src) return TRUE; GST_DEBUG ("audiocast: registering listener"); if (audiocast_register_listener(&src->audiocast_port, &src->audiocast_fd) < 0) { - gst_element_error (src, RESOURCE, OPEN_READ, NULL, + GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, NULL, ("Unable to listen on UDP port %d", src->audiocast_port)); close(src->audiocast_fd); return FALSE; @@ -542,7 +542,7 @@ static int audiocast_init(GstGnomeVFSSrc *src) GST_DEBUG ("audiocast: creating audiocast thread"); src->audiocast_thread = g_thread_create((GThreadFunc) audiocast_thread_run, src, TRUE, &error); if (error != NULL) { - gst_element_error (src, RESOURCE, TOO_LAZY, NULL, + GST_ELEMENT_ERROR (src, RESOURCE, TOO_LAZY, NULL, ("Unable to create thread: %s", error->message)); close(src->audiocast_fd); return FALSE; @@ -1043,7 +1043,7 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src) /* create the uri */ src->uri = gnome_vfs_uri_new(src->filename); if (!src->uri) { - gst_element_error (src, RESOURCE, OPEN_READ, + GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (_("Could not open vfs file \"%s\" for reading"), src->filename), GST_ERROR_SYSTEM); return FALSE; } @@ -1066,7 +1066,7 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src) audiocast_thread_kill(src); escaped = gnome_vfs_unescape_string_for_display (src->filename); - gst_element_error (src, RESOURCE, OPEN_READ, + GST_ELEMENT_ERROR (src, RESOURCE, OPEN_READ, (_("Could not open vfs file \"%s\" for reading"), escaped), (gnome_vfs_result_to_string (result))); g_free (escaped); diff --git a/ext/ogg/gstoggdemux.c b/ext/ogg/gstoggdemux.c index b9f38cab1..cf023ae68 100644 --- a/ext/ogg/gstoggdemux.c +++ b/ext/ogg/gstoggdemux.c @@ -356,7 +356,7 @@ gst_ogg_start_playing (GstOggDemux *ogg) GST_DEBUG_OBJECT (ogg, "got EOS in setup, changing to playback 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), ("cannot seek to start after EOS")); } ogg->current_chain = 0; @@ -458,7 +458,7 @@ gst_ogg_demux_chain (GstPad *pad, GstData *buffer) memcpy (data, GST_BUFFER_DATA (buffer), GST_BUFFER_SIZE (buffer)); if (ogg_sync_wrote (&ogg->sync, GST_BUFFER_SIZE (buffer)) != 0) { gst_data_unref (buffer); - gst_element_error (ogg, LIBRARY, FAILED /* MEMORY */, 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) ? @@ -524,7 +524,7 @@ gst_ogg_demux_chain (GstPad *pad, GstData *buffer) GST_DEBUG_OBJECT (ogg, "stream can seek, try setup now"); if (!gst_pad_send_event (GST_PAD_PEER (ogg->sinkpad), gst_event_new_seek (GST_FORMAT_BYTES | GST_SEEK_METHOD_SET, 0))) { - gst_element_error (ogg, CORE, SEEK, NULL, + GST_ELEMENT_ERROR (ogg, CORE, SEEK, NULL, ("stream can seek to end, but not to start. Can't handle that.")); } gst_ogg_add_chain (ogg); @@ -609,7 +609,7 @@ br: /* FIXME: monitor if we are still in creation stage? */ cur = gst_ogg_pad_new (ogg, ogg_page_serialno (page)); if (!cur) { - gst_element_error (ogg, LIBRARY, FAILED, 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) { @@ -620,7 +620,7 @@ br: } } if (cur == NULL) { - gst_element_error (ogg, STREAM, DECODE, NULL, ("invalid ogg stream serial no")); + GST_ELEMENT_ERROR (ogg, STREAM, DECODE, NULL, ("invalid ogg stream serial no")); return; } if (ogg_stream_pagein (&cur->stream, page) != 0) { diff --git a/ext/vorbis/vorbisdec.c b/ext/vorbis/vorbisdec.c index cb917fe57..0b750241a 100644 --- a/ext/vorbis/vorbisdec.c +++ b/ext/vorbis/vorbisdec.c @@ -246,13 +246,13 @@ vorbis_dec_chain (GstPad *pad, GstData *data) /* header packet */ if (packet.packet[0] / 2 != packet.packetno) { /* FIXME: just skip? */ - gst_element_error (GST_ELEMENT (vd), STREAM, DECODE, + GST_ELEMENT_ERROR (GST_ELEMENT (vd), STREAM, DECODE, (NULL), ("unexpected packet type %d", (gint) packet.packet[0])); gst_data_unref (data); return; } if (vorbis_synthesis_headerin (&vd->vi, &vd->vc, &packet)) { - gst_element_error (GST_ELEMENT (vd), STREAM, DECODE, + GST_ELEMENT_ERROR (GST_ELEMENT (vd), STREAM, DECODE, (NULL), ("couldn't read header packet")); gst_data_unref (data); return; @@ -284,13 +284,13 @@ vorbis_dec_chain (GstPad *pad, GstData *data) /* normal data packet */ if (vorbis_synthesis (&vd->vb, &packet)) { - gst_element_error (GST_ELEMENT (vd), STREAM, DECODE, + GST_ELEMENT_ERROR (GST_ELEMENT (vd), STREAM, DECODE, (NULL), ("couldn't read data packet")); gst_data_unref (data); return; } if (vorbis_synthesis_blockin (&vd->vd, &vd->vb) < 0) { - gst_element_error (GST_ELEMENT (vd), STREAM, DECODE, + GST_ELEMENT_ERROR (GST_ELEMENT (vd), STREAM, DECODE, (NULL), ("vorbis decoder did not accept data packet")); gst_data_unref (data); return; diff --git a/ext/vorbis/vorbisenc.c b/ext/vorbis/vorbisenc.c index 97c417358..dcd4a6f97 100644 --- a/ext/vorbis/vorbisenc.c +++ b/ext/vorbis/vorbisenc.c @@ -783,7 +783,7 @@ gst_vorbisenc_chain (GstPad * pad, GstData *_data) if (!vorbisenc->setup) { gst_buffer_unref (buf); - gst_element_error (vorbisenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not audio?)")); + GST_ELEMENT_ERROR (vorbisenc, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not audio?)")); return; } diff --git a/ext/vorbis/vorbisfile.c b/ext/vorbis/vorbisfile.c index fda6f42f0..3e6a21d4b 100644 --- a/ext/vorbis/vorbisfile.c +++ b/ext/vorbis/vorbisfile.c @@ -500,7 +500,7 @@ gst_vorbisfile_loop (GstElement *element) /* open our custom vorbisfile data object with the callbacks we provide */ if (ov_open_callbacks (vorbisfile, &vorbisfile->vf, NULL, 0, vorbisfile_ov_callbacks) < 0) { - gst_element_error (element, STREAM, WRONG_TYPE, NULL, NULL); + GST_ELEMENT_ERROR (element, STREAM, WRONG_TYPE, NULL, NULL); return; } vorbisfile->need_discont = TRUE; |