diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2011-08-26 16:48:45 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2011-08-26 17:09:55 +0100 |
commit | 275f756fc5bedf9ea0f22b93d4a07a24c70780ff (patch) | |
tree | 4d7830cc17c7f49ff3ebfc71e360ef601be2d98c | |
parent | 5881edf7778e1831606b51846554826354e8f62a (diff) | |
download | clutter-gst-275f756fc5bedf9ea0f22b93d4a07a24c70780ff.tar.gz |
video-texture: Don't use an internal is_idle state
But rely on the idle state kept by the player.
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c index 03c6424..7e1f65d 100644 --- a/clutter-gst/clutter-gst-video-texture.c +++ b/clutter-gst/clutter-gst-video-texture.c @@ -56,8 +56,6 @@ struct _ClutterGstVideoTexturePrivate { - guint is_idle : 1; - /* width / height (in pixels) of the frame data before applying the pixel * aspect ratio */ gint buffer_width; @@ -372,8 +370,10 @@ clutter_gst_video_texture_paint (ClutterActor *actor) ClutterGstVideoTexture *video_texture = (ClutterGstVideoTexture *) actor; ClutterGstVideoTexturePrivate *priv = video_texture->priv; ClutterActorClass *actor_class; + gboolean is_idle; - if (G_UNLIKELY (priv->is_idle)) + is_idle = clutter_gst_player_get_idle (CLUTTER_GST_PLAYER (video_texture)); + if (G_UNLIKELY (is_idle)) { CoglColor *color; gfloat alpha; @@ -507,11 +507,6 @@ idle_cb (ClutterGstVideoTexture *video_texture, GParamSpec *pspec, gpointer data) { - ClutterGstVideoTexturePrivate *priv = video_texture->priv; - - priv->is_idle = - clutter_gst_player_get_idle (CLUTTER_GST_PLAYER (video_texture)); - /* restore the idle material so we don't just display the last frame */ clutter_actor_queue_redraw (CLUTTER_ACTOR (video_texture)); } @@ -549,8 +544,6 @@ clutter_gst_video_texture_init (ClutterGstVideoTexture *video_texture) CLUTTER_GST_TYPE_VIDEO_TEXTURE, ClutterGstVideoTexturePrivate); - priv->is_idle = TRUE; - if (!clutter_gst_player_init (CLUTTER_GST_PLAYER (video_texture))) { g_warning ("Failed to initiate suitable playback pipeline."); |