diff options
author | Julien Moutte <julien@moutte.net> | 2003-12-14 17:31:07 +0000 |
---|---|---|
committer | Julien Moutte <julien@moutte.net> | 2003-12-14 17:31:07 +0000 |
commit | 6e3a083c36be3826a7bc1db71e9e8b5dac06ef48 (patch) | |
tree | 4c018c5957def6a3c83805cd2b3389892bbfd4d9 /examples | |
parent | d76e13d7c2d36d56c8801549a98ab0a294131080 (diff) |
Fixing makefile. Smarter seek
Original commit message from CVS:
Fixing makefile. Smarter seek
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gstplay/Makefile.am | 3 | ||||
-rw-r--r-- | examples/gstplay/player.c | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/examples/gstplay/Makefile.am b/examples/gstplay/Makefile.am index 7316c443..ec425088 100644 --- a/examples/gstplay/Makefile.am +++ b/examples/gstplay/Makefile.am @@ -1,7 +1,10 @@ noinst_PROGRAMS = player +AM_CFLAGS = $(GST_CFLAGS) + player_SOURCES = player.c player_LDFLAGS = \ $(GST_LIBS) \ $(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la + diff --git a/examples/gstplay/player.c b/examples/gstplay/player.c index 7e07c611..09811e63 100644 --- a/examples/gstplay/player.c +++ b/examples/gstplay/player.c @@ -20,6 +20,7 @@ #include <gst/play/gstplay.h> static GMainLoop *loop = NULL; +static gint64 length = 0; static void got_time_tick (GstPlay *play, gint64 time_nanos) @@ -31,6 +32,7 @@ static void got_stream_length (GstPlay *play, gint64 length_nanos) { g_message ("got length %llu", length_nanos); + length = length_nanos; } static void @@ -48,7 +50,7 @@ got_eos (GstPlay *play) static gboolean seek_timer (GstPlay *play) { - gst_play_seek_to_time (play, 163439850000LL); + gst_play_seek_to_time (play, length / 2); return FALSE; } |