summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Vander Stichele <thomas@apestaart.org>2003-09-16 10:00:00 +0000
committerThomas Vander Stichele <thomas@apestaart.org>2003-09-16 10:00:00 +0000
commite78672327e3ea169413afc0ef70c4f4b2b714036 (patch)
tree6146b441a0625a39a9b41514cf070ddfa193e1df
parente9c878d58d0c55e96445a5106f057e39264dc96b (diff)
reverting error patch before making a branch.BRANCH-ERROR-ROOTBRANCH-ERROR
Original commit message from CVS: reverting error patch before making a branch.
-rw-r--r--ext/a52dec/gsta52dec.c4
-rw-r--r--ext/dvdnav/dvdnavsrc.c21
-rw-r--r--ext/lame/gstlame.c9
-rw-r--r--ext/mad/gstmad.c4
-rw-r--r--ext/mpeg2dec/gstmpeg2dec.c4
-rw-r--r--gst/ac3parse/gstac3parse.c5
-rw-r--r--gst/asfdemux/gstasfdemux.c28
-rw-r--r--gst/mpegaudioparse/gstmpegaudioparse.c5
-rw-r--r--gst/mpegstream/gstmpegparse.c8
-rw-r--r--gst/synaesthesia/gstsynaesthesia.c4
10 files changed, 27 insertions, 65 deletions
diff --git a/ext/a52dec/gsta52dec.c b/ext/a52dec/gsta52dec.c
index 76f37b5c..7a92c550 100644
--- a/ext/a52dec/gsta52dec.c
+++ b/ext/a52dec/gsta52dec.c
@@ -373,9 +373,7 @@ gst_a52dec_reneg (GstPad * pad, int channels, int rate)
"channels", GST_PROPS_INT (channels),
"rate", GST_PROPS_INT (rate))
) <= 0) {
- gst_element_gerror(GST_PAD_PARENT (pad), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not set caps on source pad, aborting..."));
+ gst_element_error (GST_PAD_PARENT (pad), "could not set caps on source pad, aborting...");
}
}
diff --git a/ext/dvdnav/dvdnavsrc.c b/ext/dvdnav/dvdnavsrc.c
index 6d61f742..367843ff 100644
--- a/ext/dvdnav/dvdnavsrc.c
+++ b/ext/dvdnav/dvdnavsrc.c
@@ -695,9 +695,8 @@ dvdnavsrc_user_op (DVDNavSrc *src, int op)
}
return;
naverr:
- gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("user op %d failure: %d", op, dvdnav_err_to_string(src->dvdnav)));
+ gst_element_error(GST_ELEMENT(src), "user op %d failure: %d",
+ op, dvdnav_err_to_string(src->dvdnav));
}
@@ -869,19 +868,15 @@ dvdnavsrc_get (GstPad *pad)
/* FIXME: mem leak on non BLOCK_OK events */
buf = gst_buffer_new_from_pool (src->bufferpool, DVD_VIDEO_LB_LEN, 0);
if (!buf) {
- gst_element_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Failed to create a new GstBuffer"));
+ gst_element_error (GST_ELEMENT (src), "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_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("dvdnav_get_next_block error: %s\n",
- dvdnav_err_to_string(src->dvdnav)));
+ gst_element_error (GST_ELEMENT (src), "dvdnav_get_next_block error: %s\n",
+ dvdnav_err_to_string(src->dvdnav));
return NULL;
}
@@ -898,10 +893,8 @@ 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_gerror(GST_ELEMENT (src), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("dvdnav_still_skip error: %s\n",
- dvdnav_err_to_string(src->dvdnav)));
+ gst_element_error (GST_ELEMENT (src), "dvdnav_still_skip error: %s\n",
+ dvdnav_err_to_string(src->dvdnav));
/* FIXME: close the stream??? */
}
break;
diff --git a/ext/lame/gstlame.c b/ext/lame/gstlame.c
index a7bf2130..752c860c 100644
--- a/ext/lame/gstlame.c
+++ b/ext/lame/gstlame.c
@@ -364,9 +364,8 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "channels", &lame->num_channels);
if (!gst_lame_setup (lame)) {
- gst_element_gerror(GST_ELEMENT (lame), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not initialize encoder (wrong parameters?)"));
+ gst_element_error (GST_ELEMENT (lame),
+ "could not initialize encoder (wrong parameters?)");
return GST_PAD_LINK_REFUSED;
}
@@ -747,9 +746,7 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf)
if (!lame->initialized) {
gst_buffer_unref (buf);
- gst_element_gerror(GST_ELEMENT (lame), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("encoder not initialized (input is not audio?)"));
+ gst_element_error (GST_ELEMENT (lame), "encoder not initialized (input is not audio?)");
return;
}
diff --git a/ext/mad/gstmad.c b/ext/mad/gstmad.c
index 8c5799fe..354c864f 100644
--- a/ext/mad/gstmad.c
+++ b/ext/mad/gstmad.c
@@ -1173,9 +1173,7 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
break;
}
if (!MAD_RECOVERABLE (mad->stream.error)) {
- gst_element_gerror(GST_ELEMENT (mad), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("fatal error decoding stream"));
+ gst_element_error (GST_ELEMENT (mad), "fatal error decoding stream");
return;
}
else if (mad->stream.error == MAD_ERROR_LOSTSYNC) {
diff --git a/ext/mpeg2dec/gstmpeg2dec.c b/ext/mpeg2dec/gstmpeg2dec.c
index 2078f619..6aca82c4 100644
--- a/ext/mpeg2dec/gstmpeg2dec.c
+++ b/ext/mpeg2dec/gstmpeg2dec.c
@@ -516,9 +516,7 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
info->sequence->transfer_characteristics, info->sequence->matrix_coefficients);
if (!gst_mpeg2dec_negotiate_format (mpeg2dec)) {
- gst_element_gerror(GST_ELEMENT (mpeg2dec), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not negotiate format"));
+ gst_element_error (GST_ELEMENT (mpeg2dec), "could not negotiate format");
goto exit;
}
diff --git a/gst/ac3parse/gstac3parse.c b/gst/ac3parse/gstac3parse.c
index dcf363b3..da7f7518 100644
--- a/gst/ac3parse/gstac3parse.c
+++ b/gst/ac3parse/gstac3parse.c
@@ -337,9 +337,8 @@ gst_ac3parse_chain (GstPad *pad, GstBuffer *buf)
"channels", GST_PROPS_INT (channels),
"rate", GST_PROPS_INT (sample_rate));
if (gst_pad_try_set_caps (ac3parse->srcpad, newcaps) <= 0) {
- gst_element_gerror(GST_ELEMENT (ac3parse), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf ("Ac3parse: failed to negotiate format with next element"));
+ gst_element_error (GST_ELEMENT (ac3parse),
+ "Ac3parse: failed to negotiate format with next element");
return;
}
}
diff --git a/gst/asfdemux/gstasfdemux.c b/gst/asfdemux/gstasfdemux.c
index 3cbf67a9..5abe5744 100644
--- a/gst/asfdemux/gstasfdemux.c
+++ b/gst/asfdemux/gstasfdemux.c
@@ -518,9 +518,7 @@ gst_asf_demux_process_segment (GstASFDemux *asf_demux,
/* It's uncompressed with replic data*/
if (replic_size < 8) {
- gst_element_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("The payload has replicated data but the size is less than 8"));
+ gst_element_error (GST_ELEMENT (asf_demux), "The payload has replicated data but the size is less than 8");
return FALSE;
}
gst_asf_demux_read_object_header_rest (asf_demux, &ptr, 8);
@@ -569,9 +567,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_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Payload chunk overruns packet size."));
+ gst_element_error (GST_ELEMENT (asf_demux), "Payload chunk overruns packet size.");
return FALSE;
}
@@ -763,9 +759,7 @@ gst_asf_demux_process_stream (GstASFDemux *asf_demux, guint64 *filepos, guint64
case ASF_CORRECTION_OFF:
break;
default:
- gst_element_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Audio stream using unknown error correction"));
+ gst_element_error (GST_ELEMENT (asf_demux), "Audio stream using unknown error correction");
return FALSE;
}
@@ -799,9 +793,7 @@ gst_asf_demux_process_stream (GstASFDemux *asf_demux, guint64 *filepos, guint64
}
break;
default:
- gst_element_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Object is a stream of unrecognised type"));
+ gst_element_error (GST_ELEMENT (asf_demux), "Object is a stream of unrecognised type");
return FALSE;
}
@@ -849,9 +841,7 @@ gst_asf_demux_read_object_header (GstASFDemux *asf_demux, guint32 *obj_id, guint
if (*obj_id == ASF_OBJ_UNDEFINED) {
GST_INFO ( "Object found with unknown GUID %08x %08x %08x %08x", guid->v1, guid->v2, guid->v3, guid->v4);
- gst_element_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Could not identify object"));
+ gst_element_error (GST_ELEMENT (asf_demux), "Could not identify object");
return FALSE;
}
@@ -921,9 +911,7 @@ gst_asf_demux_process_object (GstASFDemux *asf_demux,
case ASF_OBJ_BITRATE_MUTEX:
return gst_asf_demux_skip_object (asf_demux, filepos, &obj_size);
default:
- gst_element_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Unknown ASF object"));
+ gst_element_error (GST_ELEMENT (asf_demux), "Unknown ASF object");
return FALSE;
}
@@ -947,9 +935,7 @@ gst_asf_demux_get_stream (GstASFDemux *asf_demux,
}
/* Base case if we haven't found one at all */
- gst_element_gerror(GST_ELEMENT (asf_demux), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("Segment found for undefined stream: (%d)", id));
+ gst_element_error (GST_ELEMENT (asf_demux), "Segment found for undefined stream: (%d)", id);
return NULL;
}
diff --git a/gst/mpegaudioparse/gstmpegaudioparse.c b/gst/mpegaudioparse/gstmpegaudioparse.c
index 58576a9a..ba207c0e 100644
--- a/gst/mpegaudioparse/gstmpegaudioparse.c
+++ b/gst/mpegaudioparse/gstmpegaudioparse.c
@@ -360,9 +360,8 @@ bpf_from_header (GstMPEGAudioParse *parse, unsigned long header)
"channels", GST_PROPS_INT (channels),
"rate", GST_PROPS_INT (rate));
if (gst_pad_try_set_caps(parse->srcpad, caps) <= 0) {
- gst_element_gerror(GST_ELEMENT (parse), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf ("mp3parse: failed to negotiate format with next element"));
+ gst_element_error (GST_ELEMENT (parse),
+ "mp3parse: failed to negotiate format with next element");
}
parse->channels = channels;
diff --git a/gst/mpegstream/gstmpegparse.c b/gst/mpegstream/gstmpegparse.c
index 343b5437..85041f37 100644
--- a/gst/mpegstream/gstmpegparse.c
+++ b/gst/mpegstream/gstmpegparse.c
@@ -276,9 +276,7 @@ gst_mpeg_parse_send_data (GstMPEGParse *mpeg_parse, GstData *data, GstClockTime
"parsed", GST_PROPS_BOOLEAN (TRUE)
)) < 0)
{
- gst_element_gerror(GST_ELEMENT (mpeg_parse), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could no set source caps"));
+ gst_element_error (GST_ELEMENT (mpeg_parse), "could no set source caps");
return;
}
}
@@ -523,9 +521,7 @@ gst_mpeg_parse_loop (GstElement *element)
"parsed", GST_PROPS_BOOLEAN (TRUE)
)) < 0)
{
- gst_element_gerror(GST_ELEMENT (mpeg_parse), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could no set sink caps"));
+ gst_element_error (GST_ELEMENT (mpeg_parse), "could no set sink caps");
return;
}
}
diff --git a/gst/synaesthesia/gstsynaesthesia.c b/gst/synaesthesia/gstsynaesthesia.c
index 7d5f4e52..a6c08416 100644
--- a/gst/synaesthesia/gstsynaesthesia.c
+++ b/gst/synaesthesia/gstsynaesthesia.c
@@ -294,9 +294,7 @@ gst_synaesthesia_chain (GstPad *pad, GstBuffer *bufin)
);
if (gst_pad_try_set_caps (synaesthesia->srcpad, caps) <= 0) {
- gst_element_gerror(GST_ELEMENT (synaesthesia), GST_ERROR_UNKNOWN,
- g_strdup ("unconverted error, file a bug"),
- g_strdup_printf("could not set caps"));
+ gst_element_error (GST_ELEMENT (synaesthesia), "could not set caps");
return;
}
synaesthesia->first_buffer = FALSE;