mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 11:41:09 +00:00
tools/gst-launch.c: Give more interesting info when buffering starts and stops.
Original commit message from CVS: * tools/gst-launch.c: (event_loop): Give more interesting info when buffering starts and stops. Fix case where buffering starts but we fail to update the buffering flag because the target state is not PLAYING.
This commit is contained in:
parent
b50ecf0661
commit
75cc705a1f
2 changed files with 15 additions and 4 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2007-05-12 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* tools/gst-launch.c: (event_loop):
|
||||||
|
Give more interesting info when buffering starts and stops.
|
||||||
|
Fix case where buffering starts but we fail to update the buffering flag
|
||||||
|
because the target state is not PLAYING.
|
||||||
|
|
||||||
2007-05-12 Wim Taymans <wim@fluendo.com>
|
2007-05-12 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* plugins/elements/gstqueue.c: (gst_queue_init),
|
* plugins/elements/gstqueue.c: (gst_queue_init),
|
||||||
|
|
|
@ -482,8 +482,11 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
|
||||||
|
|
||||||
/* ignore when we are buffering since then we mess with the states
|
/* ignore when we are buffering since then we mess with the states
|
||||||
* ourselves. */
|
* ourselves. */
|
||||||
if (buffering)
|
if (buffering) {
|
||||||
|
fprintf (stderr,
|
||||||
|
_("Prerolled, waiting for buffering to finish...\n"));
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
/* if we reached the final target state, exit */
|
/* if we reached the final target state, exit */
|
||||||
if (target_state == GST_STATE_PAUSED && new == target_state)
|
if (target_state == GST_STATE_PAUSED && new == target_state)
|
||||||
|
@ -503,7 +506,8 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
|
||||||
buffering = FALSE;
|
buffering = FALSE;
|
||||||
/* if the desired state is playing, go back */
|
/* if the desired state is playing, go back */
|
||||||
if (target_state == GST_STATE_PLAYING) {
|
if (target_state == GST_STATE_PLAYING) {
|
||||||
fprintf (stderr, _("Setting pipeline to PLAYING ...\n"));
|
fprintf (stderr,
|
||||||
|
_("Done buffering, setting pipeline to PLAYING ...\n"));
|
||||||
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
gst_element_set_state (pipeline, GST_STATE_PLAYING);
|
||||||
} else
|
} else
|
||||||
goto exit;
|
goto exit;
|
||||||
|
@ -511,10 +515,10 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state)
|
||||||
/* buffering busy */
|
/* buffering busy */
|
||||||
if (buffering == FALSE && target_state == GST_STATE_PLAYING) {
|
if (buffering == FALSE && target_state == GST_STATE_PLAYING) {
|
||||||
/* we were not buffering but PLAYING, PAUSE the pipeline. */
|
/* we were not buffering but PLAYING, PAUSE the pipeline. */
|
||||||
fprintf (stderr, _("Setting pipeline to PAUSED ...\n"));
|
fprintf (stderr, _("Buffering, setting pipeline to PAUSED ...\n"));
|
||||||
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
gst_element_set_state (pipeline, GST_STATE_PAUSED);
|
||||||
buffering = TRUE;
|
|
||||||
}
|
}
|
||||||
|
buffering = TRUE;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue