diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2010-12-07 15:48:36 +0000 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2010-12-07 15:49:42 +0000 |
commit | 128f0165bd84271871a1d7e0a2c2a52c392a4d26 (patch) | |
tree | 947f4a9dcd8772a3d61ce0cdb48e1221fc78f54b | |
parent | 4e188f60ff5106bcc386589763c57a632b0ea7b1 (diff) |
video-texture: Fix the notification of the target progress
Commit e9c7ccaf7c16c46f1ed85bd338eeebbd67c39697 introduced the notion of
a "target progress", the progress that we want to seek to. This has to
be set in set_progress() not get_progress() as I did.
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c index ad4b3a7..5d07684 100644 --- a/clutter-gst/clutter-gst-video-texture.c +++ b/clutter-gst/clutter-gst-video-texture.c @@ -62,7 +62,7 @@ struct _ClutterGstVideoTexturePrivate guint in_seek : 1; guint is_idle : 1; gdouble stacked_progress; - gdouble last_known_progress; + gdouble target_progress; GstState stacked_state; guint tick_timeout_id; @@ -467,6 +467,8 @@ set_progress (ClutterGstVideoTexture *video_texture, CLUTTER_GST_NOTE (MEDIA, "set progress: %.02f", progress); + priv->target_progress = progress; + if (priv->in_seek) { CLUTTER_GST_NOTE (MEDIA, "already seeking. stacking progress point."); @@ -522,7 +524,7 @@ get_progress (ClutterGstVideoTexture *video_texture) * the last known position instead as returning 0.0 will have some ugly * effects, say on a progress bar getting updated from the progress tick. */ if (priv->in_seek) - return priv->last_known_progress; + return priv->target_progress; position_q = gst_query_new_position (GST_FORMAT_TIME); duration_q = gst_query_new_duration (GST_FORMAT_TIME); @@ -547,8 +549,6 @@ get_progress (ClutterGstVideoTexture *video_texture) CLUTTER_GST_NOTE (MEDIA, "get progress: %.02f", progress); - priv->last_known_progress = progress; - return progress; } |