mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
Fixing makefile. Smarter seek
Original commit message from CVS: Fixing makefile. Smarter seek
This commit is contained in:
parent
1fa87d33ff
commit
b1547818e6
2 changed files with 6 additions and 1 deletions
|
@ -1,7 +1,10 @@
|
||||||
|
|
||||||
noinst_PROGRAMS = player
|
noinst_PROGRAMS = player
|
||||||
|
|
||||||
|
AM_CFLAGS = $(GST_CFLAGS)
|
||||||
|
|
||||||
player_SOURCES = player.c
|
player_SOURCES = player.c
|
||||||
player_LDFLAGS = \
|
player_LDFLAGS = \
|
||||||
$(GST_LIBS) \
|
$(GST_LIBS) \
|
||||||
$(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la
|
$(top_builddir)/gst-libs/gst/play/libgstplay-@GST_MAJORMINOR@.la
|
||||||
|
|
||||||
|
|
|
@ -20,6 +20,7 @@
|
||||||
#include <gst/play/gstplay.h>
|
#include <gst/play/gstplay.h>
|
||||||
|
|
||||||
static GMainLoop *loop = NULL;
|
static GMainLoop *loop = NULL;
|
||||||
|
static gint64 length = 0;
|
||||||
|
|
||||||
static void
|
static void
|
||||||
got_time_tick (GstPlay *play, gint64 time_nanos)
|
got_time_tick (GstPlay *play, gint64 time_nanos)
|
||||||
|
@ -31,6 +32,7 @@ static void
|
||||||
got_stream_length (GstPlay *play, gint64 length_nanos)
|
got_stream_length (GstPlay *play, gint64 length_nanos)
|
||||||
{
|
{
|
||||||
g_message ("got length %llu", length_nanos);
|
g_message ("got length %llu", length_nanos);
|
||||||
|
length = length_nanos;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -48,7 +50,7 @@ got_eos (GstPlay *play)
|
||||||
static gboolean
|
static gboolean
|
||||||
seek_timer (GstPlay *play)
|
seek_timer (GstPlay *play)
|
||||||
{
|
{
|
||||||
gst_play_seek_to_time (play, 163439850000LL);
|
gst_play_seek_to_time (play, length / 2);
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue