diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2010-08-05 18:20:00 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2010-08-05 18:20:00 +0100 |
commit | e9f5f6c50647c999c60f7914f31434d9a3fff606 (patch) | |
tree | 8a49466a127c62f24f94d9b454a3d8364b73440a | |
parent | 98a6725c850431df2651b6a721c3d9a790f25231 (diff) |
video-texture: Fix reading of the subtitle-font-name property
I assumed you could read back the subtitle-font-desc from playbin2, but
that was wrong, it's read-only.
Proxy the property instead and keep a copy of the string so reading back
the property works.
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c index c078b4d..6e18643 100644 --- a/clutter-gst/clutter-gst-video-texture.c +++ b/clutter-gst/clutter-gst-video-texture.c @@ -66,6 +66,7 @@ struct _ClutterGstVideoTexturePrivate gdouble buffer_fill; gdouble duration; + gchar *font_name; gchar *user_agent; CoglHandle idle_material; @@ -550,6 +551,8 @@ set_subtitle_font_name (ClutterGstVideoTexture *video_texture, CLUTTER_GST_NOTE (MEDIA, "setting subtitle font to %s", font_name); + g_free (priv->font_name); + priv->font_name = g_strdup (font_name); g_object_set (priv->pipeline, "subtitle-font-desc", font_name, NULL); } @@ -680,6 +683,7 @@ clutter_gst_video_texture_finalize (GObject *object) priv = self->priv; g_free (priv->uri); + g_free (priv->font_name); if (priv->idle_material != COGL_INVALID_HANDLE) cogl_handle_unref (priv->idle_material); @@ -768,8 +772,7 @@ clutter_gst_video_texture_get_property (GObject *object, break; case PROP_SUBTITLE_FONT_NAME: - g_object_get (priv->pipeline, "subtitle-font-desc", &str, NULL); - g_value_take_string (value, str); + g_value_set_string (value, priv->font_name); break; case PROP_AUDIO_VOLUME: |