mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 12:11:13 +00:00
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:
parent
d26698b5a1
commit
4eb8fcfe4f
5 changed files with 45 additions and 21 deletions
|
@ -708,7 +708,9 @@ sink_restart:
|
|||
}
|
||||
/* caps nego failed somewhere */
|
||||
if (this->format == NULL) {
|
||||
gst_element_error (GST_ELEMENT (this), "alsasink: No caps available");
|
||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("alsasink: No caps available"));
|
||||
return;
|
||||
}
|
||||
samplestamp = gst_alsa_timestamp_to_samples (this, GST_BUFFER_TIMESTAMP (sink->buf[i]));
|
||||
|
@ -1085,7 +1087,9 @@ 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, "Could not set caps");
|
||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("Could not set caps"));
|
||||
return;
|
||||
}
|
||||
/* get the bufferpool going */
|
||||
|
@ -1532,7 +1536,9 @@ gst_alsa_link (GstPad *pad, 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], gst_caps_ref (old)) == GST_PAD_LINK_REFUSED) {
|
||||
gst_element_error (GST_ELEMENT (this), "error resetting caps to sane value");
|
||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("error resetting caps to sane value"));
|
||||
gst_caps_unref (old);
|
||||
break;
|
||||
}
|
||||
|
@ -1553,7 +1559,9 @@ gst_alsa_link (GstPad *pad, GstCaps *caps)
|
|||
g_free (this->format);
|
||||
this->format = format;
|
||||
if (!gst_alsa_start_audio (this)) {
|
||||
gst_element_error (GST_ELEMENT (this), "Probed format doesn't work");
|
||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("Probed format doesn't work"));
|
||||
return GST_PAD_LINK_REFUSED;
|
||||
}
|
||||
}
|
||||
|
@ -1870,7 +1878,9 @@ gst_alsa_xrun_recovery (GstAlsa *this)
|
|||
}
|
||||
|
||||
if (!(gst_alsa_stop_audio (this) && gst_alsa_start_audio (this))) {
|
||||
gst_element_error (GST_ELEMENT (this), "alsasink: Error restarting audio after xrun");
|
||||
gst_element_gerror(GST_ELEMENT (this), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("alsasink: Error restarting audio after xrun"));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -250,7 +250,9 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
|
|||
/* create the GnomeVFSURI from the url */
|
||||
sink->uri = gnome_vfs_uri_new(sink->filename);
|
||||
if (!sink->uri) {
|
||||
gst_element_error (GST_ELEMENT (sink), "opening file \"%s\" (%s)", sink->filename, strerror (errno));
|
||||
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("opening file \"%s\" (%s)", sink->filename, strerror (errno)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -266,7 +268,9 @@ gst_gnomevfssink_open_file (GstGnomeVFSSink *sink)
|
|||
gst_gnomevfssink_signals[SIGNAL_ERASE_ASK], 0,
|
||||
sink->erase);
|
||||
}
|
||||
gst_element_error (GST_ELEMENT (sink), "opening file \"%s\" (%s)", sink->filename, strerror (errno));
|
||||
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("opening file \"%s\" (%s)", sink->filename, strerror (errno)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -291,7 +295,9 @@ gst_gnomevfssink_close_file (GstGnomeVFSSink *sink)
|
|||
|
||||
if (result != GNOME_VFS_OK)
|
||||
{
|
||||
gst_element_error (GST_ELEMENT (sink), "closing file \"%s\" (%s)", sink->filename, strerror (errno));
|
||||
gst_element_gerror(GST_ELEMENT (sink), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("closing file \"%s\" (%s)", sink->filename, strerror (errno)));
|
||||
}
|
||||
else {
|
||||
GST_FLAG_UNSET (sink, GST_GNOMEVFSSINK_OPEN);
|
||||
|
|
|
@ -510,10 +510,11 @@ static int audiocast_init(GstGnomeVFSSrc *src)
|
|||
char *escaped;
|
||||
|
||||
escaped = gnome_vfs_unescape_string_for_display (src->filename);
|
||||
gst_element_error(GST_ELEMENT(src),
|
||||
"opening vfs file \"%s\" (%s)",
|
||||
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("opening vfs file \"%s\" (%s)",
|
||||
escaped,
|
||||
"unable to register UDP port");
|
||||
"unable to register UDP port"));
|
||||
g_free (escaped);
|
||||
close(src->audiocast_fd);
|
||||
return FALSE;
|
||||
|
@ -532,10 +533,11 @@ static int audiocast_init(GstGnomeVFSSrc *src)
|
|||
if (error != NULL) {
|
||||
char *escaped;
|
||||
escaped = gnome_vfs_unescape_string_for_display (src->filename);
|
||||
gst_element_error(GST_ELEMENT(src),
|
||||
"opening vfs file \"%s\" (unable to create thread: %s)",
|
||||
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("opening vfs file \"%s\" (unable to create thread: %s)",
|
||||
escaped,
|
||||
error->message);
|
||||
error->message));
|
||||
g_free (escaped);
|
||||
close(src->audiocast_fd);
|
||||
return FALSE;
|
||||
|
@ -1041,8 +1043,9 @@ 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(GST_ELEMENT(src), "creating uri \"%s\" (%s)",
|
||||
src->filename, strerror (errno));
|
||||
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("error crerating uri \"%s\" (%s)", src->filename, strerror (errno)));
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -1061,10 +1064,11 @@ static gboolean gst_gnomevfssrc_open_file(GstGnomeVFSSrc *src)
|
|||
audiocast_thread_kill(src);
|
||||
|
||||
escaped = gnome_vfs_unescape_string_for_display (src->filename);
|
||||
gst_element_error(GST_ELEMENT(src),
|
||||
"opening vfs file \"%s\" (%s)",
|
||||
gst_element_gerror(GST_ELEMENT(src), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("opening vfs file \"%s\" (%s)",
|
||||
escaped,
|
||||
gnome_vfs_result_to_string(result));
|
||||
gnome_vfs_result_to_string(result)));
|
||||
g_free (escaped);
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -699,7 +699,9 @@ gst_vorbisenc_chain (GstPad * pad, GstBuffer * buf)
|
|||
|
||||
if (!vorbisenc->setup) {
|
||||
gst_buffer_unref (buf);
|
||||
gst_element_error (GST_ELEMENT (vorbisenc), "encoder not initialized (input is not audio?)");
|
||||
gst_element_gerror(GST_ELEMENT (vorbisenc), GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("encoder not initialized (input is not audio?)"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -508,7 +508,9 @@ 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, "this is not a vorbis file");
|
||||
gst_element_gerror(element, GST_ERROR_UNKNOWN,
|
||||
g_strdup ("unconverted error, file a bug"),
|
||||
g_strdup_printf("this is not a vorbis file"));
|
||||
return;
|
||||
}
|
||||
vorbisfile->need_discont = TRUE;
|
||||
|
|
Loading…
Reference in a new issue