Search
SailfishOS Open Build Service
>
Projects
>
home:sledge
:
branches:nemo:devel:hw:ti:omap4:common
>
gstreamer
> 0001-gst-launch-add-loop-argument.patch
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
File 0001-gst-launch-add-loop-argument.patch of Package gstreamer
From 03e7850d8bc4a0cdaf95b5ae7422580228594339 Mon Sep 17 00:00:00 2001 From: Rob Clark <rob@ti.com> Date: Sat, 13 Feb 2010 15:29:13 -0600 Subject: [PATCH 01/14] gst-launch: add --loop argument if --loop is specified, automatically seek to beginning of clip when EOS is received --- tools/gst-launch.c | 16 +++++++++++++++- 1 files changed, 15 insertions(+), 1 deletions(-) diff --git a/tools/gst-launch.c b/tools/gst-launch.c index 2b0d862..496863c 100644 --- a/tools/gst-launch.c +++ b/tools/gst-launch.c @@ -895,6 +895,7 @@ main (int argc, char *argv[]) gboolean trace = FALSE; gboolean eos_on_shutdown = FALSE; gboolean check_index = FALSE; + gboolean loop = FALSE; gchar *savefile = NULL; gchar *exclude_args = NULL; #ifndef GST_DISABLE_OPTION_PARSING @@ -923,6 +924,8 @@ main (int argc, char *argv[]) N_("Force EOS on sources before shutting the pipeline down"), NULL}, {"index", 'i', 0, G_OPTION_ARG_NONE, &check_index, N_("Gather and print index statistics"), NULL}, + {"loop", 'l', 0, G_OPTION_ARG_NONE, &loop, + N_("Repeat clip in loop without rebuilding pipeline"), NULL}, GST_TOOLS_GOPTION_VERSION, {NULL} }; @@ -1124,7 +1127,18 @@ main (int argc, char *argv[]) } tfthen = gst_util_get_timestamp (); - caught_error = event_loop (pipeline, TRUE, GST_STATE_PLAYING); + do { + caught_error = event_loop (pipeline, TRUE, GST_STATE_PLAYING); + if (loop && (caught_error == ELR_NO_ERROR)) { + PRINT (_("Looping ...\n")); + gst_element_seek (pipeline, 1.0, + GST_FORMAT_TIME, + GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT, + GST_SEEK_TYPE_SET, 0, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE); + } else { + break; + } + } while (TRUE); if (eos_on_shutdown && caught_error == ELR_INTERRUPT) { PRINT (_("EOS on shutdown enabled -- Forcing EOS on the pipeline\n")); waiting_eos = TRUE; -- 1.7.5.4