play_new (gchar ** uris, const gchar * audio_sink, const gchar * video_sink,
gboolean gapless, gboolean instant_uri, gdouble initial_volume,
gboolean verbose, const gchar * flags_string, gboolean use_playbin3,
- gdouble start_position)
+ gdouble start_position, gboolean no_position)
{
GstElement *sink, *playbin;
GstPlay *play;
play->bus_watch = gst_bus_add_watch (GST_ELEMENT_BUS (play->playbin),
play_bus_msg, play);
- /* FIXME: make configurable incl. 0 for disable */
- play->timeout = g_timeout_add (100, play_timeout, play);
+ if (!no_position) {
+ play->timeout = g_timeout_add (100, play_timeout, play);
+ }
play->missing = NULL;
play->buffering = FALSE;
gst_object_unref (play->playbin);
g_source_remove (play->bus_watch);
- g_source_remove (play->timeout);
+ if (play->timeout != 0)
+ g_source_remove (play->timeout);
g_main_loop_unref (play->loop);
g_strfreev (play->uris);
GOptionContext *ctx;
gchar *playlist_file = NULL;
gboolean use_playbin3 = FALSE;
+ gboolean no_position = FALSE;
#ifdef HAVE_WINMM
guint winmm_timer_resolution = 0;
#endif
("Keep showing the last frame on EOS until quit or playlist change command "
"(gapless is ignored)"),
NULL},
+ {"no-position", 0, 0, G_OPTION_ARG_NONE, &no_position,
+ N_("Do not print current position of pipeline"),
+ NULL},
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &filenames, NULL},
{NULL}
};
/* prepare */
play =
play_new (uris, audio_sink, video_sink, gapless, instant_uri, volume,
- verbose, flags, use_playbin3, start_position);
+ verbose, flags, use_playbin3, start_position, no_position);
if (play == NULL) {
gst_printerr