diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2007-08-17 13:48:24 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2007-08-17 13:48:24 +0000 |
commit | da8d6598e0b91c35bae1bd5de2fb3b52d66dede4 (patch) | |
tree | fd51da26d94b1993bbb8b135d17444189b86a04a /tools | |
parent | ebf770154f60f1ce1615b3553f4ae0eaf962f103 (diff) |
tools/gst-launch.c: Don´t try to do any state management when a live pipeline posts buffering messages.
Original commit message from CVS:
* tools/gst-launch.c: (event_loop), (main):
Don´t try to do any state management when a live pipeline posts
buffering messages.
Also make the buffering string translatable.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gst-launch.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/tools/gst-launch.c b/tools/gst-launch.c index d84627512d..c73f764e4b 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -60,6 +60,7 @@ static GstElement *pipeline; static gboolean caught_error = FALSE; static gboolean tags = FALSE; static gboolean messages = FALSE; +static gboolean is_live = FALSE; #ifndef GST_DISABLE_LOADSAVE @@ -499,7 +500,11 @@ event_loop (GstElement * pipeline, gboolean blocking, GstState target_state) gint percent; gst_message_parse_buffering (message, &percent); - fprintf (stderr, "buffering... %d \r", percent); + fprintf (stderr, _("buffering... %d \r"), percent); + + /* no state management needed for live pipelines */ + if (is_live) + break; if (percent == 100) { /* a 100% message means buffering is done */ @@ -699,6 +704,7 @@ main (int argc, char *argv[]) goto end; case GST_STATE_CHANGE_NO_PREROLL: fprintf (stderr, _("Pipeline is live and does not need PREROLL ...\n")); + is_live = TRUE; break; case GST_STATE_CHANGE_ASYNC: fprintf (stderr, _("Pipeline is PREROLLING ...\n")); |