GST_ELEMENT_ERROR

Original commit message from CVS:
GST_ELEMENT_ERROR
This commit is contained in:
Thomas Vander Stichele 2004-01-29 23:20:44 +00:00
parent 4ea716a6fe
commit 611d7f4dd0
10 changed files with 34 additions and 29 deletions

View file

@ -1,3 +1,8 @@
2004-01-30 Thomas Vander Stichele <thomas at apestaart dot org>
* just about every source file:
gst_element_error -> GST_ELEMENT_ERROR
2004-01-29 Julien MOUTTE <julien@moutte.net>
* ext/gnomevfs/gstgnomevfssrc.c: (gst_gnomevfssrc_get): Fixing seeking

View file

@ -680,7 +680,7 @@ dvdnavsrc_user_op (DVDNavSrc *src, int op)
}
return;
naverr:
gst_element_error (src, LIBRARY, TOO_LAZY, NULL,
GST_ELEMENT_ERROR (src, LIBRARY, TOO_LAZY, NULL,
("user op %d failure: %s", op, dvdnav_err_to_string(src->dvdnav)));
}
@ -851,14 +851,14 @@ dvdnavsrc_get (GstPad *pad)
while (!have_buf) {
buf = gst_buffer_new_and_alloc (DVD_VIDEO_LB_LEN);
if (!buf) {
gst_element_error (src, CORE, TOO_LAZY, NULL, ("Failed to create a new GstBuffer"));
GST_ELEMENT_ERROR (src, CORE, TOO_LAZY, NULL, ("Failed to create a new GstBuffer"));
return NULL;
}
data = GST_BUFFER_DATA(buf);
if (dvdnav_get_next_block (src->dvdnav, data, &event, &len) !=
DVDNAV_STATUS_OK) {
gst_element_error (src, STREAM, DECODE, NULL,
GST_ELEMENT_ERROR (src, STREAM, DECODE, NULL,
("dvdnav_get_next_block error: %s\n", dvdnav_err_to_string(src->dvdnav)));
return NULL;
}
@ -876,7 +876,7 @@ dvdnavsrc_get (GstPad *pad)
* dvdnav_still_skip */
dvdnavsrc_print_event (src, data, event, len);
if (dvdnav_still_skip (src->dvdnav) != DVDNAV_STATUS_OK) {
gst_element_error (src, STREAM, TOO_LAZY, NULL, ("dvdnav_still_skip error: %s\n",
GST_ELEMENT_ERROR (src, STREAM, TOO_LAZY, NULL, ("dvdnav_still_skip error: %s\n",
dvdnav_err_to_string(src->dvdnav)));
/* FIXME: close the stream??? */
}

View file

@ -354,7 +354,7 @@ gst_lame_sink_link (GstPad *pad, const GstCaps *caps)
gst_structure_get_int (structure, "channels", &lame->num_channels);
if (!gst_lame_setup (lame)) {
gst_element_error (lame, CORE, NEGOTIATION, NULL,
GST_ELEMENT_ERROR (lame, CORE, NEGOTIATION, NULL,
("could not initialize encoder (wrong parameters?)"));
return GST_PAD_LINK_REFUSED;
}
@ -785,7 +785,7 @@ gst_lame_chain (GstPad *pad, GstData *_data)
if (!lame->initialized) {
gst_buffer_unref (buf);
gst_element_error (lame, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not audio?)"));
GST_ELEMENT_ERROR (lame, CORE, NEGOTIATION, NULL, ("encoder not initialized (input is not audio?)"));
return;
}

View file

@ -614,7 +614,7 @@ gst_id3_tag_handle_event (GstPad *pad, GstEvent *event)
gst_event_discont_get_value (event, GST_FORMAT_BYTES, &value);
if (value != (tag->buffer ? GST_BUFFER_OFFSET (tag->buffer) + GST_BUFFER_SIZE (tag->buffer)
: 0))
gst_element_error (tag, CORE, EVENT, NULL, ("Seek during ID3v2 tag reading"));
GST_ELEMENT_ERROR (tag, CORE, EVENT, NULL, ("Seek during ID3v2 tag reading"));
gst_data_unref (GST_DATA (event));
break;
}
@ -623,7 +623,7 @@ gst_id3_tag_handle_event (GstPad *pad, GstEvent *event)
gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_READING_V1_TAG);
break;
case GST_ID3_TAG_STATE_READING_V1_TAG:
gst_element_error (tag, CORE, EVENT, NULL, ("Seek during ID3v1 tag reading"));
GST_ELEMENT_ERROR (tag, CORE, EVENT, NULL, ("Seek during ID3v1 tag reading"));
gst_data_unref (GST_DATA (event));
break;
case GST_ID3_TAG_STATE_SEEKING_TO_NORMAL:
@ -747,7 +747,7 @@ gst_id3_tag_do_typefind (GstID3Tag *tag, GstBuffer *buffer)
if (find.best_probability > 0) {
return find.caps;
} else {
gst_element_error (tag, CORE, CAPS, NULL, ("no caps found"));
GST_ELEMENT_ERROR (tag, CORE, CAPS, NULL, ("no caps found"));
return NULL;
}
}
@ -875,7 +875,7 @@ gst_id3_tag_chain (GstPad *pad, GstData *data)
GST_SEEK_FLAG_FLUSH, tag->v2tag_size))) {
gst_id3_tag_set_state (tag, GST_ID3_TAG_STATE_SEEKING_TO_NORMAL);
} else {
gst_element_error (tag, CORE, SEEK, NULL, ("can't seek back to beginning from reading ID3v1 tag"));
GST_ELEMENT_ERROR (tag, CORE, SEEK, NULL, ("can't seek back to beginning from reading ID3v1 tag"));
}
} else {
gst_id3_tag_send_tag_event (tag);

View file

@ -992,7 +992,7 @@ gst_mad_chain (GstPad *pad, GstData *_data)
break;
}
if (!MAD_RECOVERABLE (mad->stream.error)) {
gst_element_error (mad, STREAM, DECODE, NULL, NULL);
GST_ELEMENT_ERROR (mad, STREAM, DECODE, NULL, NULL);
return;
}
else if (mad->stream.error == MAD_ERROR_LOSTSYNC) {

View file

@ -476,7 +476,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstData *_data)
info->sequence->transfer_characteristics, info->sequence->matrix_coefficients);
if (!gst_mpeg2dec_negotiate_format (mpeg2dec)) {
gst_element_error (mpeg2dec, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (mpeg2dec, CORE, NEGOTIATION, NULL, NULL);
goto exit;
}

View file

@ -410,19 +410,19 @@ gst_siddec_loop (GstElement *element)
}
if (siddec->state == SID_STATE_LOAD_TUNE) {
if (!siddec->tune->load (siddec->tune_buffer, siddec->tune_len)) {
gst_element_error (siddec, LIBRARY, TOO_LAZY, (NULL), (NULL));
GST_ELEMENT_ERROR (siddec, LIBRARY, TOO_LAZY, (NULL), (NULL));
return;
}
//update_metadata (siddec);
if (!siddec_negotiate (siddec)) {
gst_element_error (siddec, CORE, NEGOTIATION, (NULL), (NULL));
GST_ELEMENT_ERROR (siddec, CORE, NEGOTIATION, (NULL), (NULL));
return;
}
if (!sidEmuInitializeSong (*siddec->engine, *siddec->tune, siddec->tune_number)) {
gst_element_error (siddec, LIBRARY, TOO_LAZY, (NULL), (NULL));
GST_ELEMENT_ERROR (siddec, LIBRARY, TOO_LAZY, (NULL), (NULL));
return;
}

View file

@ -168,7 +168,7 @@ gst_riff_peek_head (GstRiffRead *riff,
gst_pad_event_default (riff->sinkpad, event);
} else {
gst_event_unref (event);
gst_element_error (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
}
return FALSE;
}
@ -197,7 +197,7 @@ gst_riff_read_element_data (GstRiffRead *riff,
GstBuffer *buf = NULL;
if (gst_bytestream_peek (riff->bs, &buf, length) != length) {
gst_element_error (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
if (buf)
gst_buffer_unref (buf);
return NULL;
@ -240,7 +240,7 @@ gst_riff_read_seek (GstRiffRead *riff,
/* now seek */
if (!gst_bytestream_seek (riff->bs, offset, GST_SEEK_METHOD_SET)) {
gst_element_error (riff, RESOURCE, SEEK, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, SEEK, NULL, NULL);
return NULL;
}
@ -252,7 +252,7 @@ gst_riff_read_seek (GstRiffRead *riff,
/* get the discont event and return */
gst_bytestream_get_status (riff->bs, &remaining, &event);
if (!event || GST_EVENT_TYPE (event) != GST_EVENT_DISCONTINUOUS) {
gst_element_error (riff, CORE, EVENT, NULL,
GST_ELEMENT_ERROR (riff, CORE, EVENT, NULL,
("No discontinuity event after seek"));
if (event)
gst_event_unref (event);
@ -296,7 +296,7 @@ gst_riff_peek_list (GstRiffRead *riff)
}
if (gst_bytestream_peek_bytes (riff->bs, &data, 12) != 12) {
gst_element_error (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
return 0;
}
@ -656,7 +656,7 @@ gst_riff_read_list (GstRiffRead *riff,
}
gst_bytestream_flush_fast (riff->bs, 8);
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
gst_element_error (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);
@ -844,14 +844,14 @@ gst_riff_read_header (GstRiffRead *riff,
if (!gst_riff_peek_head (riff, &tag, &length, NULL))
return FALSE;
if (tag != GST_RIFF_TAG_RIFF) {
gst_element_error (riff, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (riff, STREAM, WRONG_TYPE, NULL, NULL);
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 8);
/* doctype */
if (gst_bytestream_peek_bytes (riff->bs, &data, 4) != 4) {
gst_element_error (riff, RESOURCE, READ, NULL, NULL);
GST_ELEMENT_ERROR (riff, RESOURCE, READ, NULL, NULL);
return FALSE;
}
gst_bytestream_flush_fast (riff->bs, 4);

View file

@ -597,7 +597,7 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
/* It's uncompressed with replic data*/
if (replic_size < 8) {
gst_element_error (asf_demux, STREAM, DEMUX, NULL, ("The payload has replicated data but the size is less than 8"));
GST_ELEMENT_ERROR (asf_demux, STREAM, DEMUX, NULL, ("The payload has replicated data but the size is less than 8"));
return FALSE;
}
_read_replicated_data (asf_demux, &replicated_data_header);
@ -644,7 +644,7 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
segment_info.segment_size = segment_info.chunk_size;
if (segment_info.chunk_size > packet_info->size_left) {
gst_element_error (asf_demux, STREAM, DEMUX, NULL, ("Payload chunk overruns packet size."));
GST_ELEMENT_ERROR (asf_demux, STREAM, DEMUX, NULL, ("Payload chunk overruns packet size."));
return FALSE;
}
@ -823,7 +823,7 @@ gst_asf_demux_process_stream (GstASFDemux *asf_demux, guint64 *obj_size)
gst_bytestream_flush (asf_demux->bs, object.stream_specific_size);
break;
default:
gst_element_error (asf_demux, STREAM, DEMUX, NULL, ("Audio stream using unknown error correction"));
GST_ELEMENT_ERROR (asf_demux, STREAM, DEMUX, NULL, ("Audio stream using unknown error correction"));
return FALSE;
}
@ -853,7 +853,7 @@ gst_asf_demux_process_stream (GstASFDemux *asf_demux, guint64 *obj_size)
}
break;
default:
gst_element_error (asf_demux, STREAM, WRONG_TYPE, NULL, NULL);
GST_ELEMENT_ERROR (asf_demux, STREAM, WRONG_TYPE, NULL, NULL);
return FALSE;
}
@ -965,7 +965,7 @@ gst_asf_demux_get_stream (GstASFDemux *asf_demux,
}
/* Base case if we haven't found one at all */
gst_element_error (asf_demux, STREAM, DEMUX, NULL, ("Segment found for undefined stream: (%d)", id));
GST_ELEMENT_ERROR (asf_demux, STREAM, DEMUX, NULL, ("Segment found for undefined stream: (%d)", id));
return NULL;
}

View file

@ -500,7 +500,7 @@ gst_mpeg_parse_loop (GstElement *element)
"systemstream", G_TYPE_BOOLEAN, TRUE,
"parsed", G_TYPE_BOOLEAN, TRUE, NULL)) < 0)
{
gst_element_error (mpeg_parse, CORE, NEGOTIATION, NULL, NULL);
GST_ELEMENT_ERROR (mpeg_parse, CORE, NEGOTIATION, NULL, NULL);
return;
}
}