Updating branch refs/heads/master
         to 048762589625479a1504c6fb2090e4e5782cf3c2 (commit)
       from 4ea3c523f2a54ca56f46ab291767ed4e791b23db (commit)

commit 048762589625479a1504c6fb2090e4e5782cf3c2
Author: Simon Steinbeiss <[email protected]>
Date:   Tue Mar 5 12:02:56 2013 +0100

    Simplify gstreamer-seek code

 src/gst/parole-gst.c |   24 ++----------------------
 1 files changed, 2 insertions(+), 22 deletions(-)

diff --git a/src/gst/parole-gst.c b/src/gst/parole-gst.c
index 1e5689e..f81102c 100644
--- a/src/gst/parole-gst.c
+++ b/src/gst/parole-gst.c
@@ -2611,34 +2611,14 @@ void parole_gst_shutdown (ParoleGst *gst)
     g_object_unref (gst->priv->playbin);
 }
 
-void parole_gst_seek (ParoleGst *gst, gdouble pos)
+void parole_gst_seek (ParoleGst *gst, gdouble seek)
 {
-    gint64 seek;
-    gint64 absolute_duration;
-    gint64 duration;
-    gboolean seekable;
-
     TRACE ("Seeking");
-
-    g_object_get (G_OBJECT (gst->priv->stream),
-                 "absolute-duration", &absolute_duration,
-                 "duration", &duration,
-                 "seekable", &seekable,
-                 NULL);
-                 
-#ifdef DEBUG
-    g_return_if_fail (duration != 0);
-    g_return_if_fail (absolute_duration != 0);
-    g_return_if_fail (seekable == TRUE);
-#endif
-       
-    seek = (pos * absolute_duration) / duration;
-    
     g_warn_if_fail ( gst_element_seek (gst->priv->playbin,
                                       1.0,
                                       GST_FORMAT_TIME,
                                       GST_SEEK_FLAG_KEY_UNIT | 
GST_SEEK_FLAG_FLUSH,
-                                      GST_SEEK_TYPE_SET, seek,
+                                      GST_SEEK_TYPE_SET, (int) seek * 
GST_SECOND,
                                       GST_SEEK_TYPE_NONE, 
GST_CLOCK_TIME_NONE));
 }
 
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits

Reply via email to