converted gst_element_error to new format in ext/ - gettext pending

Original commit message from CVS:
converted gst_element_error to new format in ext/ - gettext pending
This commit is contained in:
Benjamin Otte 2003-09-15 01:08:38 +00:00
parent fde31ee83f
commit 4535cf586b
5 changed files with 29 additions and 13 deletions

View file

@ -373,7 +373,9 @@ gst_a52dec_reneg (GstPad * pad, int channels, int rate)
"channels", GST_PROPS_INT (channels),
"rate", GST_PROPS_INT (rate))
) <= 0) {
gst_element_error (GST_PAD_PARENT (pad), "could not set caps on source pad, aborting...");
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..."));
}
}

View file

@ -695,8 +695,9 @@ dvdnavsrc_user_op (DVDNavSrc *src, int op)
}
return;
naverr:
gst_element_error(GST_ELEMENT(src), "user op %d failure: %d",
op, dvdnav_err_to_string(src->dvdnav));
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)));
}
@ -868,15 +869,19 @@ 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_error (GST_ELEMENT (src), "Failed to create a new GstBuffer");
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"));
return NULL;
}
data = GST_BUFFER_DATA(buf);
if (dvdnav_get_next_block (src->dvdnav, data, &event, &len) !=
DVDNAV_STATUS_OK) {
gst_element_error (GST_ELEMENT (src), "dvdnav_get_next_block error: %s\n",
dvdnav_err_to_string(src->dvdnav));
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)));
return NULL;
}
@ -893,8 +898,10 @@ 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 (GST_ELEMENT (src), "dvdnav_still_skip error: %s\n",
dvdnav_err_to_string(src->dvdnav));
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)));
/* FIXME: close the stream??? */
}
break;

View file

@ -364,8 +364,9 @@ gst_lame_sinkconnect (GstPad *pad, GstCaps *caps)
gst_caps_get_int (caps, "channels", &lame->num_channels);
if (!gst_lame_setup (lame)) {
gst_element_error (GST_ELEMENT (lame),
"could not initialize encoder (wrong parameters?)");
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?)"));
return GST_PAD_LINK_REFUSED;
}
@ -746,7 +747,9 @@ gst_lame_chain (GstPad *pad, GstBuffer *buf)
if (!lame->initialized) {
gst_buffer_unref (buf);
gst_element_error (GST_ELEMENT (lame), "encoder not initialized (input is not audio?)");
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?)"));
return;
}

View file

@ -1173,7 +1173,9 @@ gst_mad_chain (GstPad *pad, GstBuffer *buffer)
break;
}
if (!MAD_RECOVERABLE (mad->stream.error)) {
gst_element_error (GST_ELEMENT (mad), "fatal error decoding stream");
gst_element_gerror(GST_ELEMENT (mad), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("fatal error decoding stream"));
return;
}
else if (mad->stream.error == MAD_ERROR_LOSTSYNC) {

View file

@ -516,7 +516,9 @@ gst_mpeg2dec_chain (GstPad *pad, GstBuffer *buf)
info->sequence->transfer_characteristics, info->sequence->matrix_coefficients);
if (!gst_mpeg2dec_negotiate_format (mpeg2dec)) {
gst_element_error (GST_ELEMENT (mpeg2dec), "could not negotiate format");
gst_element_gerror(GST_ELEMENT (mpeg2dec), GST_ERROR_UNKNOWN,
g_strdup ("unconverted error, file a bug"),
g_strdup_printf("could not negotiate format"));
goto exit;
}