[clutter-gst] Revert "Revert "video-texture: Use autocluttersink""
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gst] Revert "Revert "video-texture: Use autocluttersink""
- Date: Fri, 27 Apr 2012 11:58:33 +0000 (UTC)
commit 05f6f02cfed487323e294bc3adeb4a471f814d52
Author: Damien Lespiau <damien lespiau intel com>
Date: Fri Apr 27 12:42:17 2012 +0100
Revert "Revert "video-texture: Use autocluttersink""
This reverts commit b96101a3ec2641d7f014934006e04d5aa36eea31.
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",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]