From 75cc705a1f19fa90138b813bfc149c8046703da5 Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Sat, 12 May 2007 15:38:02 +0000 Subject: [PATCH] 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. --- ChangeLog | 7 +++++++ tools/gst-launch.c | 12 ++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5166ee1670..7f489613ed 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2007-05-12 Wim Taymans + + * 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 * plugins/elements/gstqueue.c: (gst_queue_init), diff --git a/tools/gst-launch.c b/tools/gst-launch.c index dd8a832463..fb276f353c 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -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 * ourselves. */ - if (buffering) + if (buffering) { + fprintf (stderr, + _("Prerolled, waiting for buffering to finish...\n")); break; + } /* if we reached the final target state, exit */ if (target_state == GST_STATE_PAUSED && new == target_state) @@ -503,7 +506,8 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state) buffering = FALSE; /* if the desired state is playing, go back */ 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); } else goto exit; @@ -511,10 +515,10 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state) /* buffering busy */ if (buffering == FALSE && target_state == GST_STATE_PLAYING) { /* 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); - buffering = TRUE; } + buffering = TRUE; } break; } -- 2.34.1