summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorSeungha Yang <seungha.yang@navercorp.com>2019-03-29 13:17:55 +0900
committerSeungha Yang <seungha.yang@navercorp.com>2019-03-29 19:52:16 +0900
commit5b5fd9033c8965ede8f760ce3cf27a9f8ed6d3f3 (patch)
tree58eb5b67085193244c54c3a5e055b94dddd44993 /tools
parente007710b591f924b84bcc03f114728ba110a1925 (diff)
gst-play: Add wait-on-eos option for image file playback
Since gst-play is stopping playback on EOS message, image file playback is almost impossible until now. Not only for image file, this option seems to helpful if an user wants to see the last frame.
Diffstat (limited to 'tools')
-rw-r--r--tools/gst-play.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/gst-play.c b/tools/gst-play.c
index 964943a53..e14527548 100644
--- a/tools/gst-play.c
+++ b/tools/gst-play.c
@@ -43,6 +43,8 @@
#define VOLUME_STEPS 20
+static gboolean wait_on_eos = FALSE;
+
GST_DEBUG_CATEGORY (play_debug);
#define GST_CAT_DEFAULT play_debug
@@ -394,7 +396,7 @@ play_bus_msg (GstBus * bus, GstMessage * msg, gpointer user_data)
play_timeout (play);
g_print ("\n");
/* and switch to next item in list */
- if (!play_next (play)) {
+ if (!wait_on_eos && !play_next (play)) {
g_print ("%s\n", _("Reached end of play list."));
g_main_loop_quit (play->loop);
}
@@ -1461,6 +1463,11 @@ main (int argc, char **argv)
N_("Use playbin3 pipeline")
N_("(default varies depending on 'USE_PLAYBIN' env variable)"),
NULL},
+ {"wait-on-eos", 0, 0, G_OPTION_ARG_NONE, &wait_on_eos,
+ N_
+ ("Keep showing the last frame on EOS until quit or playlist change command "
+ "(gapless is ignored)"),
+ NULL},
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL},
{NULL}
};
@@ -1506,6 +1513,9 @@ main (int argc, char **argv)
return 0;
}
+ if (wait_on_eos)
+ gapless = FALSE;
+
playlist = g_ptr_array_new ();
if (playlist_file != NULL) {