mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-04-26 06:54:49 +00:00
plugins/elements/gstfakesink.c: Add some debug text to error message to indicate that we errored out on request.
Original commit message from CVS: * plugins/elements/gstfakesink.c: Add some debug text to error message to indicate that we errored out on request. * tools/gst-launch.c: When the state change to PLAYING fails, check for an error message on the bus and print it.
This commit is contained in:
parent
e281264078
commit
558a8a90f3
3 changed files with 27 additions and 1 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
2007-09-23 Tim-Philipp Müller <tim at centricular dot net>
|
||||||
|
|
||||||
|
* plugins/elements/gstfakesink.c:
|
||||||
|
Add some debug text to error message to indicate that
|
||||||
|
we errored out on request.
|
||||||
|
|
||||||
|
* tools/gst-launch.c:
|
||||||
|
When the state change to PLAYING fails, check for an
|
||||||
|
error message on the bus and print it.
|
||||||
|
|
||||||
2007-09-22 Thomas Vander Stichele <thomas at apestaart dot org>
|
2007-09-22 Thomas Vander Stichele <thomas at apestaart dot org>
|
||||||
|
|
||||||
translated by: Jorge González González <aloriel@gmail.com>
|
translated by: Jorge González González <aloriel@gmail.com>
|
||||||
|
|
|
@ -490,6 +490,7 @@ gst_fake_sink_change_state (GstElement * element, GstStateChange transition)
|
||||||
|
|
||||||
/* ERROR */
|
/* ERROR */
|
||||||
error:
|
error:
|
||||||
GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL), (NULL));
|
GST_ELEMENT_ERROR (element, CORE, STATE_CHANGE, (NULL),
|
||||||
|
("Erroring out on state change as requested"));
|
||||||
return GST_STATE_CHANGE_FAILURE;
|
return GST_STATE_CHANGE_FAILURE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -731,7 +731,22 @@ main (int argc, char *argv[])
|
||||||
fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
|
fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
|
||||||
if (gst_element_set_state (pipeline,
|
if (gst_element_set_state (pipeline,
|
||||||
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
|
GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE) {
|
||||||
|
GstMessage *err_msg;
|
||||||
|
GstBus *bus;
|
||||||
|
|
||||||
fprintf (stderr, _("ERROR: pipeline doesn't want to play.\n"));
|
fprintf (stderr, _("ERROR: pipeline doesn't want to play.\n"));
|
||||||
|
bus = gst_element_get_bus (pipeline);
|
||||||
|
if ((err_msg = gst_bus_poll (bus, GST_MESSAGE_ERROR, 0))) {
|
||||||
|
GError *gerror;
|
||||||
|
gchar *debug;
|
||||||
|
|
||||||
|
gst_message_parse_error (err_msg, &gerror, &debug);
|
||||||
|
gst_object_default_error (GST_MESSAGE_SRC (err_msg), gerror, debug);
|
||||||
|
gst_message_unref (err_msg);
|
||||||
|
g_error_free (gerror);
|
||||||
|
g_free (debug);
|
||||||
|
}
|
||||||
|
gst_object_unref (bus);
|
||||||
res = -1;
|
res = -1;
|
||||||
goto end;
|
goto end;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue