From 05f6f02cfed487323e294bc3adeb4a471f814d52 Mon Sep 17 00:00:00 2001 From: Damien Lespiau Date: Fri, 27 Apr 2012 12:42:17 +0100 Subject: Revert "Revert "video-texture: Use autocluttersink"" This reverts commit b96101a3ec2641d7f014934006e04d5aa36eea31. --- clutter-gst/clutter-gst-video-texture.c | 19 ++++++++++++++++--- 1 file 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 #include +#include #include #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", -- cgit v1.2.3