diff options
author | Damien Lespiau <damien.lespiau@intel.com> | 2012-04-27 12:42:17 +0100 |
---|---|---|
committer | Damien Lespiau <damien.lespiau@intel.com> | 2012-04-27 12:42:17 +0100 |
commit | 05f6f02cfed487323e294bc3adeb4a471f814d52 (patch) | |
tree | 2f2c05d97c55877cf86863d395d588432b91c78b | |
parent | 9d7a20cc395c44aae9af4d16fd9606667bb89688 (diff) |
Revert "Revert "video-texture: Use autocluttersink""
This reverts commit b96101a3ec2641d7f014934006e04d5aa36eea31.
-rw-r--r-- | clutter-gst/clutter-gst-video-texture.c | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/clutter-gst/clutter-gst-video-texture.c b/clutter-gst/clutter-gst-video-texture.c index 7b69c69..321bf75 100644 --- a/clutter-gst/clutter-gst-video-texture.c +++ b/clutter-gst/clutter-gst-video-texture.c @@ -44,6 +44,7 @@ #include <glib.h> #include <gio/gio.h> +#include <gst/base/gstbasesink.h> #include <gst/video/video.h> #include "clutter-gst-debug.h" @@ -531,6 +532,15 @@ idle_cb (ClutterGstVideoTexture *video_texture, clutter_actor_queue_redraw (CLUTTER_ACTOR (video_texture)); } +static void +on_autocluttersink_element_added (GstBin *bin, + GstElement *element, + ClutterGstVideoTexture *data) +{ + if (GST_IS_BASE_SINK (element)) + g_object_set (G_OBJECT (element), "qos", TRUE, NULL); +} + static gboolean setup_pipeline (ClutterGstVideoTexture *video_texture) { @@ -544,11 +554,14 @@ setup_pipeline (ClutterGstVideoTexture *video_texture) return FALSE; } - video_sink = gst_element_factory_make ("cluttersink", NULL); + video_sink = gst_element_factory_make ("autocluttersink", NULL); + g_signal_connect (video_sink, + "element-added", + G_CALLBACK (on_autocluttersink_element_added), + video_texture); g_object_set (G_OBJECT (video_sink), "texture", CLUTTER_TEXTURE (video_texture), - "qos", TRUE, - "sync", TRUE, NULL); + NULL); g_object_set (G_OBJECT (pipeline), "video-sink", video_sink, "subtitle-font-desc", "Sans 16", |