[clutter-gst] Do not use deprecated ClutterTexture.
- From: Lionel Landwerlin <llandwerlin src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter-gst] Do not use deprecated ClutterTexture.
- Date: Mon, 18 Mar 2013 23:35:13 +0000 (UTC)
commit 97b1e5ad8c4cabe68553bf4138b1ae5d12535ec3
Author: Andre Moreira Magalhaes (andrunko) <andre magalhaes collabora co uk>
Date: Tue Oct 16 21:05:30 2012 -0300
Do not use deprecated ClutterTexture.
- Remove ClutterGstVideoTexture to be replaced by ClutterGstVideoActor.
- Make cluttersink/autocluttersink gstreamer elements accept a ClutterGstActor instead of a
ClutterTexture for painting.
- This patch temporarily disable examples/video-player and some tests requiring
ClutterGstVideoTexture.
clutter-gst/Makefile.am | 7 +-
clutter-gst/clutter-gst-auto-video-sink.c | 59 +-
clutter-gst/clutter-gst-auto-video-sink.h | 3 +-
clutter-gst/clutter-gst-plugin.c | 2 +-
clutter-gst/clutter-gst-types.h | 2 +-
clutter-gst/clutter-gst-util.c | 29 +-
clutter-gst/clutter-gst-util.h | 2 -
clutter-gst/clutter-gst-video-sink.c | 104 ++--
clutter-gst/clutter-gst-video-sink.h | 4 +-
clutter-gst/clutter-gst-video-texture.c | 903 -----------------------------
clutter-gst/clutter-gst-video-texture.h | 132 -----
clutter-gst/clutter-gst.h | 1 -
examples/Makefile.am | 15 +-
examples/video-sink-navigation.c | 33 +-
examples/video-sink.c | 29 +-
tests/Makefile.am | 33 +-
tests/test-alpha.c | 39 +-
tests/test-rgb-upload.c | 23 +-
tests/test-yuv-upload.c | 23 +-
19 files changed, 181 insertions(+), 1262 deletions(-)
---
diff --git a/clutter-gst/Makefile.am b/clutter-gst/Makefile.am
index 1b78406..37ad5c3 100644
--- a/clutter-gst/Makefile.am
+++ b/clutter-gst/Makefile.am
@@ -27,7 +27,6 @@ source_h = \
$(srcdir)/clutter-gst-version.h \
$(srcdir)/clutter-gst-actor.h \
$(srcdir)/clutter-gst-video-sink.h \
- $(srcdir)/clutter-gst-video-texture.h \
$(srcdir)/clutter-gst-player.h \
$(NULL)
@@ -43,8 +42,7 @@ source_c = \
$(srcdir)/clutter-gst-player.c \
$(srcdir)/clutter-gst-actor.c \
$(srcdir)/clutter-gst-video-sink.c \
- $(srcdir)/clutter-gst-video-texture.c \
- $(srcdir)/clutter-gst-util.c \
+ $(srcdir)/clutter-gst-util.c \
$(glib_enum_c) \
$(NULL)
@@ -109,7 +107,8 @@ libgstclutter_la_SOURCES = \
plugin_LTLIBRARIES = libgstclutter.la
-libgstclutter_la_LIBADD = $(PLUGIN_LIBS) $(HW_LIBS)
+libgstclutter_la_LIBADD = $(PLUGIN_LIBS) $(HW_LIBS) \
+ libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
libgstclutter_la_LDFLAGS = \
$(GL_LDFLAGS) \
-module -avoid-version \
diff --git a/clutter-gst/clutter-gst-auto-video-sink.c b/clutter-gst/clutter-gst-auto-video-sink.c
index 4977d5b..c434e9a 100644
--- a/clutter-gst/clutter-gst-auto-video-sink.c
+++ b/clutter-gst/clutter-gst-auto-video-sink.c
@@ -47,7 +47,7 @@ GST_STATIC_PAD_TEMPLATE ("sink",
enum
{
PROP_0,
- PROP_TEXTURE,
+ PROP_ACTOR,
PROP_TS_OFFSET
};
@@ -195,21 +195,21 @@ _is_clutter_sink (GstElement * element)
GParamSpec *pspec;
pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (element),
- "texture");
+ "actor");
if (pspec == NULL) {
- GST_DEBUG_OBJECT (element, "don't have a texture property");
+ GST_DEBUG_OBJECT (element, "don't have an actor property");
return FALSE;
}
- if (CLUTTER_TYPE_TEXTURE == pspec->value_type ||
- g_type_is_a (pspec->value_type, CLUTTER_TYPE_TEXTURE)) {
- GST_DEBUG_OBJECT (element, "has a clutter texture property");
+ if (CLUTTER_GST_TYPE_ACTOR == pspec->value_type ||
+ g_type_is_a (pspec->value_type, CLUTTER_GST_TYPE_ACTOR)) {
+ GST_DEBUG_OBJECT (element, "has an actor property");
return TRUE;
}
- GST_WARNING_OBJECT (element, "has texture property, but it's of type %s "
- "and we expected it to be of type CLUTTER_TYPE_TEXTURE",
+ GST_WARNING_OBJECT (element, "has actor property, but it's of type %s "
+ "and we expected it to be of type CLUTTER_GST_TYPE_ACTOR",
g_type_name (pspec->value_type));
return FALSE;
@@ -234,7 +234,7 @@ _sinks_discover (ClutterGstAutoVideoSink * bin)
GST_DEBUG_OBJECT (bin, "Testing %s",
gst_plugin_feature_get_name (GST_PLUGIN_FEATURE (f)));
- /* Check for a texture property with CLUTTER_TYPE_TEXTURE type */
+ /* Check for an actor property with CLUTTER_GST_TYPE_ACTOR type */
if (!_is_clutter_sink (el)) {
gst_object_unref (el);
continue;
@@ -363,7 +363,7 @@ clutter_gst_auto_video_sink_reconfigure (ClutterGstAutoVideoSink * bin,
/* Now we are ready to add the sink to bin */
bin->child = gst_object_ref (sink);
- g_object_set (G_OBJECT (bin->child), "texture", bin->texture,
+ g_object_set (G_OBJECT(bin->child), "actor", bin->actor,
"ts-offset", bin->ts_offset, NULL);
GST_DEBUG_OBJECT (bin, "going to add %" GST_PTR_FORMAT, bin->child);
@@ -648,7 +648,7 @@ clutter_gst_auto_video_sink_dispose (GObject * object)
bin->sink_block_pad = NULL;
}
- bin->texture = NULL;
+ bin->actor = NULL;
G_OBJECT_CLASS (parent_class)->dispose ((GObject *) object);
}
@@ -668,12 +668,12 @@ clutter_gst_auto_video_sink_finalize (GObject * object)
}
static void
-clutter_gst_auto_video_sink_set_texture (ClutterGstAutoVideoSink * bin,
- ClutterTexture * texture)
+clutter_gst_auto_video_sink_set_actor (ClutterGstAutoVideoSink * bin,
+ ClutterGstActor * actor)
{
- bin->texture = texture;
+ bin->actor = actor;
if (bin->setup) {
- g_object_set (G_OBJECT (bin->child), "texture", texture, NULL);
+ g_object_set (G_OBJECT (bin->child), "actor", actor, NULL);
}
}
@@ -684,8 +684,8 @@ clutter_gst_auto_video_sink_set_property (GObject * object,
ClutterGstAutoVideoSink *bin = CLUTTER_GST_AUTO_VIDEO_SINK (object);
switch (prop_id) {
- case PROP_TEXTURE:
- clutter_gst_auto_video_sink_set_texture (bin, g_value_get_object (value));
+ case PROP_ACTOR:
+ clutter_gst_auto_video_sink_set_actor (bin, g_value_get_object (value));
break;
case PROP_TS_OFFSET:
bin->ts_offset = g_value_get_int64 (value);
@@ -707,8 +707,8 @@ clutter_gst_auto_video_sink_get_property (GObject * object,
ClutterGstAutoVideoSink *bin = CLUTTER_GST_AUTO_VIDEO_SINK (object);
switch (prop_id) {
- case PROP_TEXTURE:
- g_value_set_object (value, bin->texture);
+ case PROP_ACTOR:
+ g_value_set_object (value, bin->actor);
break;
case PROP_TS_OFFSET:
g_value_set_int64 (value, bin->ts_offset);
@@ -742,19 +742,20 @@ clutter_gst_auto_video_sink_class_init (ClutterGstAutoVideoSinkClass * klass)
"Josep Torra <support fluendo com>");
/**
- * ClutterGstAutoVideoSink:texture:
+ * ClutterGstAutoVideoSink:actor:
*
- * This is the texture the video is decoded into. It can be any
- * #ClutterTexture, however Cluter-Gst has a handy subclass,
- * #ClutterGstVideoTexture, that implements the #ClutterMedia
+ * This is the actor the video is decoded into. It can be any
+ * #ClutterGstActor, however Cluter-Gst has a handy subclass,
+ * #ClutterGstVideoActor, that implements the #ClutterGstPlayer
* interface.
*/
- pspec = g_param_spec_object ("texture",
- "Texture",
- "Texture the video will be decoded into",
- CLUTTER_TYPE_TEXTURE, CLUTTER_GST_PARAM_READWRITE);
+ pspec = g_param_spec_object ("actor",
+ "Actor",
+ "Actor the video will be decoded into",
+ CLUTTER_GST_TYPE_ACTOR,
+ CLUTTER_GST_PARAM_READWRITE);
- g_object_class_install_property (oclass, PROP_TEXTURE, pspec);
+ g_object_class_install_property (oclass, PROP_ACTOR, pspec);
g_object_class_install_property (oclass, PROP_TS_OFFSET,
g_param_spec_int64 ("ts-offset", "TS Offset",
@@ -778,7 +779,7 @@ clutter_gst_auto_video_sink_init (ClutterGstAutoVideoSink * bin)
GValue val = { 0, };
bin->setup = FALSE;
- bin->texture = NULL;
+ bin->actor = NULL;
bin->ts_offset = DEFAULT_TS_OFFSET;
/* Create a ghost pad with no target at first */
diff --git a/clutter-gst/clutter-gst-auto-video-sink.h b/clutter-gst/clutter-gst-auto-video-sink.h
index 59925e5..cfb0d27 100644
--- a/clutter-gst/clutter-gst-auto-video-sink.h
+++ b/clutter-gst/clutter-gst-auto-video-sink.h
@@ -30,6 +30,7 @@
#include <gst/gst.h>
#include <clutter/clutter.h>
+#include <clutter-gst/clutter-gst-actor.h>
G_BEGIN_DECLS
@@ -98,7 +99,7 @@ struct _ClutterGstAutoVideoSink
gboolean async_pending;
gboolean setup;
- ClutterTexture *texture;
+ ClutterGstActor *actor;
GstClockTimeDiff ts_offset;
GMutex lock;
diff --git a/clutter-gst/clutter-gst-plugin.c b/clutter-gst/clutter-gst-plugin.c
index 9eabbaf..741c3e6 100644
--- a/clutter-gst/clutter-gst-plugin.c
+++ b/clutter-gst/clutter-gst-plugin.c
@@ -85,7 +85,7 @@ plugin_init (GstPlugin *plugin)
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
clutter,
- "Elements to render to Clutter textures",
+ "Elements to render to ClutterGst actors",
plugin_init,
VERSION,
"LGPL", /* license */
diff --git a/clutter-gst/clutter-gst-types.h b/clutter-gst/clutter-gst-types.h
index 7a25822..60f952b 100644
--- a/clutter-gst/clutter-gst-types.h
+++ b/clutter-gst/clutter-gst-types.h
@@ -37,7 +37,7 @@
* @CLUTTER_GST_SEEK_FLAG_NONE: Fast seeks (key frame boundaries, default)
* @CLUTTER_GST_SEEK_FLAG_ACCURATE: Accurate seeks (potentially slower)
*
- * Flags that can be given to clutter_gst_video_texture_set_seek_flags().
+ * Flags that can be given to clutter_gst_player_set_seek_flags().
*
* Since: 1.4
*/
diff --git a/clutter-gst/clutter-gst-util.c b/clutter-gst/clutter-gst-util.c
index 4391372..d5b5cb6 100644
--- a/clutter-gst/clutter-gst-util.c
+++ b/clutter-gst/clutter-gst-util.c
@@ -147,7 +147,7 @@ clutter_gst_init (int *argc,
gst_plugin_register_static (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"cluttersink",
- "Element to render to Clutter textures",
+ "Element to render to ClutterGst actors",
_internal_plugin_init,
VERSION,
"LGPL", /* license */
@@ -227,7 +227,7 @@ clutter_gst_init_with_args (int *argc,
gst_plugin_register_static (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
"cluttersink",
- "Element to render to Clutter textures",
+ "Element to render to ClutterGst actors",
_internal_plugin_init,
VERSION,
"LGPL", /* license */
@@ -239,28 +239,3 @@ clutter_gst_init_with_args (int *argc,
return CLUTTER_INIT_SUCCESS;
}
-
-/**
- * clutter_gst_video_sink_new:
- * @texture: a #ClutterTexture
- *
- * Creates a new GStreamer video sink which uses @texture as the target
- * for sinking a video stream from GStreamer.
- *
- * <note>This function has to be called from Clutter's main thread. While
- * GStreamer will spawn threads to do its work, we want all the GL calls to
- * happen in the same thread. Clutter-gst knows which thread it is by
- * assuming this constructor is called from the Clutter thread.</note>
- *
- * Return value: a #GstElement for the newly created video sink
- *
- * Deprecated: 1.6: Use gst_element_factory_make ("cluttersink", ...) and the
- * "texture" GObject property instead.
- */
-GstElement *
-clutter_gst_video_sink_new (ClutterTexture *texture)
-{
- return g_object_new (CLUTTER_GST_TYPE_VIDEO_SINK,
- "texture", texture,
- NULL);
-}
diff --git a/clutter-gst/clutter-gst-util.h b/clutter-gst/clutter-gst-util.h
index e418b52..34f63fb 100644
--- a/clutter-gst/clutter-gst-util.h
+++ b/clutter-gst/clutter-gst-util.h
@@ -45,8 +45,6 @@ ClutterInitError clutter_gst_init_with_args (int *argc,
GOptionEntry *entries,
const char *translation_domain,
GError **error);
-GstElement * clutter_gst_video_sink_new (ClutterTexture *texture) G_GNUC_DEPRECATED;
-
G_END_DECLS
diff --git a/clutter-gst/clutter-gst-video-sink.c b/clutter-gst/clutter-gst-video-sink.c
index 77fa7a5..2264841 100644
--- a/clutter-gst/clutter-gst-video-sink.c
+++ b/clutter-gst/clutter-gst-video-sink.c
@@ -4,15 +4,17 @@
* GStreamer integration library for Clutter.
*
* clutter-gst-video-sink.c - Gstreamer Video Sink that renders to a
- * Clutter Texture.
+ * ClutterGstActor.
*
* Authored by Jonathan Matthew <jonathan kaolin wh9 net>,
* Chris Lord <chris openedhand com>
* Damien Lespiau <damien lespiau intel com>
+ * Andre Moreira Magalhaes <andre magalhaes collabora co uk>
*
* Copyright (C) 2007,2008 OpenedHand
* Copyright (C) 2009,2010,2011 Intel Corporation
* Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2012 Collabora Ltd. <http://www.collabora.co.uk/>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -35,7 +37,7 @@
* @short_description: GStreamer video sink
*
* #ClutterGstVideoSink is a GStreamer sink element that sends
- * data to a #ClutterTexture.
+ * data to a #ClutterGstActor.
*/
#ifdef HAVE_CONFIG_H
@@ -43,6 +45,7 @@
#endif
#include "clutter-gst-video-sink.h"
+#include "clutter-gst-actor.h"
#include "clutter-gst-util.h"
#include "clutter-gst-private.h"
@@ -128,7 +131,7 @@ GST_DEBUG_CATEGORY_STATIC (clutter_gst_video_sink_debug);
enum
{
PROP_0,
- PROP_TEXTURE,
+ PROP_ACTOR,
PROP_UPDATE_PRIORITY
};
@@ -191,7 +194,7 @@ typedef struct _ClutterGstRenderer
struct _ClutterGstVideoSinkPrivate
{
- ClutterTexture *texture;
+ ClutterActor *actor;
CoglMaterial *material_template;
GstFlowReturn flow_ret;
@@ -224,8 +227,8 @@ G_DEFINE_TYPE_WITH_CODE (ClutterGstVideoSink, clutter_gst_video_sink,
GST_TYPE_BASE_SINK, G_IMPLEMENT_INTERFACE (GST_TYPE_NAVIGATION,
clutter_gst_navigation_interface_init));
-static void clutter_gst_video_sink_set_texture (ClutterGstVideoSink * sink,
- ClutterTexture * texture);
+static void clutter_gst_video_sink_set_actor (ClutterGstVideoSink * sink,
+ ClutterActor * actor);
/*
* ClutterGstSource implementation
@@ -294,15 +297,15 @@ ensure_texture_pixel_aspect_ratio (ClutterGstVideoSink * sink)
GParamSpec *pspec;
GValue par = { 0, };
- if (priv->texture == NULL)
+ if (priv->actor == NULL)
return;
- pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (priv->texture),
+ pspec = g_object_class_find_property (G_OBJECT_GET_CLASS (priv->actor),
"pixel-aspect-ratio");
if (pspec) {
g_value_init (&par, GST_TYPE_FRACTION);
gst_value_set_fraction (&par, priv->info.par_n, priv->info.par_d);
- g_object_set_property (G_OBJECT (priv->texture),
+ g_object_set_property (G_OBJECT (priv->actor),
"pixel-aspect-ratio", &par);
g_value_unset (&par);
}
@@ -424,15 +427,14 @@ on_stage_destroyed (ClutterStage * stage,
g_mutex_lock (&gst_source->buffer_lock);
clutter_actor_hide (CLUTTER_ACTOR (stage));
- clutter_actor_remove_child (CLUTTER_ACTOR (stage),
- CLUTTER_ACTOR (priv->texture));
+ clutter_actor_remove_child (CLUTTER_ACTOR (stage), priv->actor);
if (gst_source->buffer)
gst_buffer_unref (gst_source->buffer);
gst_source->stage_lost = TRUE;
gst_source->buffer = NULL;
- priv->texture = NULL;
+ priv->actor = NULL;
g_mutex_unlock (&gst_source->buffer_lock);
@@ -454,7 +456,7 @@ on_stage_allocation_changed (ClutterStage * stage,
height = (gint) (box->y2 - box->y1);
GST_DEBUG ("Size changed to %i/%i", width, height);
- clutter_actor_set_size (CLUTTER_ACTOR (priv->texture), width, height);
+ clutter_actor_set_size (priv->actor, width, height);
}
static gboolean
@@ -484,18 +486,16 @@ clutter_gst_source_dispatch (GSource * source,
goto negotiation_fail;
gst_source->has_new_caps = FALSE;
- if (!priv->texture) {
+ if (!priv->actor) {
ClutterActor *stage;
ClutterActor *actor;
GST_DEBUG_OBJECT (gst_source->sink,
"No existing texture, creating stage and actor");
stage = clutter_stage_new ();
- actor =
- g_object_new (CLUTTER_TYPE_TEXTURE, "disable-slicing", TRUE, NULL);
+ actor = g_object_new (CLUTTER_GST_TYPE_ACTOR, NULL);
- clutter_gst_video_sink_set_texture (gst_source->sink,
- CLUTTER_TEXTURE (actor));
+ clutter_gst_video_sink_set_actor (gst_source->sink, actor);
clutter_stage_set_user_resizable (CLUTTER_STAGE (stage), TRUE);
clutter_actor_add_child (stage, actor);
clutter_stage_set_no_clear_hint (CLUTTER_STAGE (stage), TRUE);
@@ -736,7 +736,7 @@ _create_paint_material (ClutterGstVideoSink * sink,
cogl_handle_unref (tex2);
}
- clutter_texture_set_cogl_material (priv->texture, material);
+ clutter_gst_actor_set_cogl_material (CLUTTER_GST_ACTOR (priv->actor), material);
cogl_object_unref (material);
}
@@ -1102,7 +1102,7 @@ clutter_gst_hw_init (ClutterGstVideoSink * sink)
material = cogl_material_new ();
cogl_material_set_layer (material, 0, tex);
- clutter_texture_set_cogl_material (priv->texture, material);
+ clutter_gst_actor_set_cogl_material (CLUTTER_GST_ACTOR (priv->actor), material);
cogl_object_unref (tex);
@@ -1133,7 +1133,7 @@ clutter_gst_hw_upload (ClutterGstVideoSink * sink, GstBuffer * buffer)
unsigned int gl_target;
GValue value = { 0 };
- tex = clutter_texture_get_cogl_texture (priv->texture);
+ tex = clutter_gst_actor_get_cogl_texture (CLUTTER_GST_ACTOR (priv->actor));
cogl_texture_get_gl_texture (tex, &gl_texture, &gl_target);
g_value_init (&value, G_TYPE_UINT);
@@ -1146,8 +1146,8 @@ clutter_gst_hw_upload (ClutterGstVideoSink * sink, GstBuffer * buffer)
gst_surface_converter_upload (priv->converter, buffer);
- /* The texture is dirty, schedule a redraw */
- clutter_actor_queue_redraw (CLUTTER_ACTOR (priv->texture));
+ /* The actor is dirty, schedule a redraw */
+ clutter_actor_queue_redraw (priv->actor);
}
static ClutterGstRenderer hw_renderer = {
@@ -1405,8 +1405,8 @@ clutter_gst_video_sink_dispose (GObject * object)
priv->renderer = NULL;
}
- if (priv->texture)
- clutter_gst_video_sink_set_texture (self, NULL);
+ if (priv->actor)
+ clutter_gst_video_sink_set_actor (self, NULL);
if (priv->caps) {
gst_caps_unref (priv->caps);
@@ -1433,8 +1433,8 @@ clutter_gst_video_sink_finalize (GObject * object)
}
static void
-clutter_gst_video_sink_set_texture (ClutterGstVideoSink * sink,
- ClutterTexture * texture)
+clutter_gst_video_sink_set_actor (ClutterGstVideoSink * sink,
+ ClutterActor * actor)
{
const char const *events[] = {
"key-press-event",
@@ -1446,25 +1446,24 @@ clutter_gst_video_sink_set_texture (ClutterGstVideoSink * sink,
ClutterGstVideoSinkPrivate *priv = sink->priv;
guint i;
- if (priv->texture) {
+ if (priv->actor) {
for (i = 0; i < priv->signal_handler_ids->len; i++) {
gulong id = g_array_index (priv->signal_handler_ids, gulong, i);
- g_signal_handler_disconnect (priv->texture, id);
+ g_signal_handler_disconnect (priv->actor, id);
}
g_array_set_size (priv->signal_handler_ids, 0);
}
- priv->texture = texture;
- if (priv->texture == NULL)
+ priv->actor = actor;
+ if (priv->actor == NULL)
return;
- clutter_actor_set_reactive (CLUTTER_ACTOR (priv->texture), TRUE);
- g_object_add_weak_pointer (G_OBJECT (priv->texture),
- (gpointer *) & (priv->texture));
+ clutter_actor_set_reactive (priv->actor, TRUE);
+ g_object_add_weak_pointer (G_OBJECT (priv->actor), (gpointer *) &(priv->actor));
for (i = 0; i < G_N_ELEMENTS (events); i++) {
gulong id;
- id = g_signal_connect (priv->texture, events[i],
+ id = g_signal_connect (priv->actor, events[i],
G_CALLBACK (navigation_event), sink);
g_array_append_val (priv->signal_handler_ids, id);
}
@@ -1477,8 +1476,8 @@ clutter_gst_video_sink_set_property (GObject * object,
ClutterGstVideoSink *sink = CLUTTER_GST_VIDEO_SINK (object);
switch (prop_id) {
- case PROP_TEXTURE:
- clutter_gst_video_sink_set_texture (sink, g_value_get_object (value));
+ case PROP_ACTOR:
+ clutter_gst_video_sink_set_actor (sink, g_value_get_object (value));
break;
case PROP_UPDATE_PRIORITY:
clutter_gst_video_sink_set_priority (sink, g_value_get_int (value));
@@ -1497,8 +1496,8 @@ clutter_gst_video_sink_get_property (GObject * object,
ClutterGstVideoSinkPrivate *priv = sink->priv;
switch (prop_id) {
- case PROP_TEXTURE:
- g_value_set_object (value, priv->texture);
+ case PROP_ACTOR:
+ g_value_set_object (value, priv->actor);
break;
case PROP_UPDATE_PRIORITY:
g_value_set_int (value, priv->priority);
@@ -1568,7 +1567,7 @@ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass * klass)
gst_element_class_set_metadata (gstelement_class,
"Clutter video sink",
"Sink/Video",
- "Sends video data from a GStreamer pipeline to a Clutter texture",
+ "Sends video data from a GStreamer pipeline to a ClutterGst actor",
"Jonathan Matthew <jonathan kaolin wh9 net>, "
"Matthew Allum <mallum o-hand com, " "Chris Lord <chris o-hand com>");
@@ -1580,18 +1579,19 @@ clutter_gst_video_sink_class_init (ClutterGstVideoSinkClass * klass)
gstbase_sink_class->get_caps = clutter_gst_video_sink_get_caps;
/**
- * ClutterGstVideoSink:texture:
+ * ClutterGstVideoSink:actor:
*
- * This is the texture the video is decoded into. It can be any
- * #ClutterTexture, however Cluter-Gst has a handy subclass,
- * #ClutterGstVideoTexture, that implements the #ClutterMedia
+ * This is the actor the video is decoded into. It can be any
+ * #ClutterGstActor, however Cluter-Gst has a handy subclass,
+ * #ClutterGstVideoActor, that implements the #ClutterMedia
* interface.
*/
- pspec = g_param_spec_object ("texture",
- "Texture",
- "Texture the video will be decoded into",
- CLUTTER_TYPE_TEXTURE, CLUTTER_GST_PARAM_READWRITE);
- g_object_class_install_property (gobject_class, PROP_TEXTURE, pspec);
+ pspec = g_param_spec_object ("actor",
+ "Actor",
+ "ClutterGstActor the video will be decoded into",
+ CLUTTER_GST_TYPE_ACTOR,
+ CLUTTER_GST_PARAM_READWRITE);
+ g_object_class_install_property (gobject_class, PROP_ACTOR, pspec);
/**
* ClutterGstVideoSink:update-priority:
@@ -1625,16 +1625,16 @@ clutter_gst_navigation_send_event (GstNavigation * navigation,
* if the structure contains pointer coordinates */
if (gst_structure_get_double (structure, "pointer_x", &x) &&
gst_structure_get_double (structure, "pointer_y", &y)) {
- if (clutter_actor_transform_stage_point (CLUTTER_ACTOR (priv->texture), x,
+ if (clutter_actor_transform_stage_point (CLUTTER_ACTOR (priv->actor), x,
y, &x_out, &y_out) == FALSE) {
g_warning ("Failed to convert non-scaled coordinates for video-sink");
return;
}
x = x_out * priv->info.width /
- clutter_actor_get_width (CLUTTER_ACTOR (priv->texture));
+ clutter_actor_get_width (CLUTTER_ACTOR (priv->actor));
y = y_out * priv->info.height /
- clutter_actor_get_height (CLUTTER_ACTOR (priv->texture));
+ clutter_actor_get_height (CLUTTER_ACTOR (priv->actor));
gst_structure_set (structure,
"pointer_x", G_TYPE_DOUBLE, (gdouble) x,
diff --git a/clutter-gst/clutter-gst-video-sink.h b/clutter-gst/clutter-gst-video-sink.h
index 3a06804..92eb3e4 100644
--- a/clutter-gst/clutter-gst-video-sink.h
+++ b/clutter-gst/clutter-gst-video-sink.h
@@ -4,7 +4,7 @@
* GStreamer integration library for Clutter.
*
* clutter-gst-video-sink.h - Gstreamer Video Sink that renders to a
- * Clutter Texture.
+ * ClutterGst actor.
*
* Authored by Jonathan Matthew <jonathan kaolin wh9 net>
*
@@ -73,7 +73,7 @@ typedef struct _ClutterGstVideoSinkPrivate ClutterGstVideoSinkPrivate;
/**
* ClutterGstVideoSink:
*
- * Class implementing a GStreamer sink element for #ClutterTexture<!-- -->s.
+ * Class implementing a GStreamer sink element for #ClutterGstActor<!-- -->s.
*
* The #ClutterGstVideoSink structure contains only private data and should
* not be accessed directly.
diff --git a/clutter-gst/clutter-gst.h b/clutter-gst/clutter-gst.h
index bdbb188..128d223 100644
--- a/clutter-gst/clutter-gst.h
+++ b/clutter-gst/clutter-gst.h
@@ -34,7 +34,6 @@
#include "clutter-gst-enum-types.h"
#include "clutter-gst-actor.h"
#include "clutter-gst-video-sink.h"
-#include "clutter-gst-video-texture.h"
#include "clutter-gst-util.h"
#include "clutter-gst-version.h"
#include "clutter-gst-player.h"
diff --git a/examples/Makefile.am b/examples/Makefile.am
index 4cd466b..bd555a2 100644
--- a/examples/Makefile.am
+++ b/examples/Makefile.am
@@ -1,17 +1,18 @@
NULL = #
-noinst_PROGRAMS = video-player video-sink video-sink-navigation
+#noinst_PROGRAMS = video-player video-sink video-sink-navigation
+noinst_PROGRAMS = video-sink video-sink-navigation
INCLUDES = -I$(top_srcdir) \
$(MAINTAINER_CFLAGS) \
$(NULL)
-video_player_SOURCES = video-player.c
-video_player_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
-video_player_LDFLAGS = \
- $(CLUTTER_GST_LIBS) \
- $(GST_LIBS) \
- $(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
+#video_player_SOURCES = video-player.c
+#video_player_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
+#video_player_LDFLAGS = \
+# $(CLUTTER_GST_LIBS) \
+# $(GST_LIBS) \
+# $(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
video_sink_SOURCES = video-sink.c
video_sink_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
diff --git a/examples/video-sink-navigation.c b/examples/video-sink-navigation.c
index 248e780..8cf5321 100644
--- a/examples/video-sink-navigation.c
+++ b/examples/video-sink-navigation.c
@@ -29,7 +29,7 @@
#include <clutter-gst/clutter-gst.h>
void
-size_change (ClutterTexture *texture,
+size_change (ClutterActor *actor,
gint width,
gint height,
gpointer user_data)
@@ -38,7 +38,7 @@ size_change (ClutterTexture *texture,
gfloat new_x, new_y, new_width, new_height;
gfloat stage_width, stage_height;
- stage = clutter_actor_get_stage (CLUTTER_ACTOR (texture));
+ stage = clutter_actor_get_stage (actor);
if (stage == NULL)
return;
@@ -61,8 +61,8 @@ size_change (ClutterTexture *texture,
new_y = 0;
}
- clutter_actor_set_position (CLUTTER_ACTOR (texture), new_x, new_y);
- clutter_actor_set_size (CLUTTER_ACTOR (texture), new_width, new_height);
+ clutter_actor_set_position (actor, new_x, new_y);
+ clutter_actor_set_size (actor, new_width, new_height);
}
int
@@ -70,7 +70,7 @@ main (int argc, char *argv[])
{
ClutterTimeline *timeline;
ClutterActor *stage;
- ClutterActor *texture;
+ ClutterActor *actor;
ClutterConstraint *constraint;
GstPipeline *pipeline;
GstElement *src;
@@ -99,16 +99,11 @@ main (int argc, char *argv[])
timeline = clutter_timeline_new (1000);
g_object_set(timeline, "loop", TRUE, NULL);
- /* We need to set certain props on the target texture currently for
- * efficient/corrent playback onto the texture (which sucks a bit)
- */
- texture = g_object_new (CLUTTER_TYPE_TEXTURE,
- "disable-slicing", TRUE,
- NULL);
+ actor = g_object_new (CLUTTER_GST_TYPE_ACTOR, NULL);
- g_signal_connect (CLUTTER_TEXTURE (texture),
- "size-change",
- G_CALLBACK (size_change), NULL);
+ g_signal_connect (actor,
+ "size-change",
+ G_CALLBACK (size_change), NULL);
/* Set up pipeline */
pipeline = GST_PIPELINE(gst_pipeline_new (NULL));
@@ -119,7 +114,7 @@ main (int argc, char *argv[])
test = gst_element_factory_make ("navigationtest", NULL);
colorspace = gst_element_factory_make ("videoconvert", NULL);
sink = gst_element_factory_make ("cluttersink", NULL);
- g_object_set (sink, "texture", CLUTTER_TEXTURE (texture), NULL);
+ g_object_set (sink, "actor", actor, NULL);
// g_object_set (src , "pattern", 10, NULL);
@@ -129,16 +124,16 @@ main (int argc, char *argv[])
/* Resize with the window */
constraint = clutter_bind_constraint_new (stage, CLUTTER_BIND_SIZE, 0.0);
- clutter_actor_add_constraint_with_name (texture, "size", constraint);
+ clutter_actor_add_constraint_with_name (actor, "size", constraint);
/* Rotate a bit */
- clutter_actor_set_pivot_point (texture, 0.5, 0.5);
- clutter_actor_set_rotation_angle (texture, CLUTTER_Z_AXIS, 45.0);
+ clutter_actor_set_pivot_point (actor, 0.5, 0.5);
+ clutter_actor_set_rotation_angle (actor, CLUTTER_Z_AXIS, 45.0);
/* start the timeline */
clutter_timeline_start (timeline);
- clutter_actor_add_child (stage, texture);
+ clutter_actor_add_child (stage, actor);
// clutter_actor_set_opacity (texture, 0x11);
clutter_actor_show (stage);
diff --git a/examples/video-sink.c b/examples/video-sink.c
index 9e2e504..82030d7 100644
--- a/examples/video-sink.c
+++ b/examples/video-sink.c
@@ -29,7 +29,7 @@
#include <clutter-gst/clutter-gst.h>
void
-size_change (ClutterTexture *texture,
+size_change (ClutterActor *actor,
gint width,
gint height,
gpointer user_data)
@@ -38,7 +38,7 @@ size_change (ClutterTexture *texture,
gfloat new_x, new_y, new_width, new_height;
gfloat stage_width, stage_height;
- stage = clutter_actor_get_stage (CLUTTER_ACTOR (texture));
+ stage = clutter_actor_get_stage (actor);
if (stage == NULL)
return;
@@ -61,8 +61,8 @@ size_change (ClutterTexture *texture,
new_y = 0;
}
- clutter_actor_set_position (CLUTTER_ACTOR (texture), new_x, new_y);
- clutter_actor_set_size (CLUTTER_ACTOR (texture), new_width, new_height);
+ clutter_actor_set_position (actor, new_x, new_y);
+ clutter_actor_set_size (actor, new_width, new_height);
}
int
@@ -70,7 +70,7 @@ main (int argc, char *argv[])
{
ClutterTimeline *timeline;
ClutterActor *stage;
- ClutterActor *texture;
+ ClutterActor *actor;
GstPipeline *pipeline;
GstElement *src;
GstElement *warp;
@@ -96,25 +96,20 @@ main (int argc, char *argv[])
timeline = clutter_timeline_new (1000);
g_object_set(timeline, "loop", TRUE, NULL);
- /* We need to set certain props on the target texture currently for
- * efficient/corrent playback onto the texture (which sucks a bit)
- */
- texture = g_object_new (CLUTTER_TYPE_TEXTURE,
- "disable-slicing", TRUE,
- NULL);
+ actor = g_object_new (CLUTTER_GST_TYPE_ACTOR, NULL);
- g_signal_connect (CLUTTER_TEXTURE (texture),
- "size-change",
- G_CALLBACK (size_change), NULL);
+ g_signal_connect (actor,
+ "size-change",
+ G_CALLBACK (size_change), NULL);
/* Set up pipeline */
- pipeline = GST_PIPELINE(gst_pipeline_new (NULL));
+ pipeline = GST_PIPELINE (gst_pipeline_new (NULL));
src = gst_element_factory_make ("videotestsrc", NULL);
warp = gst_element_factory_make ("warptv", NULL);
colorspace = gst_element_factory_make ("videoconvert", NULL);
sink = gst_element_factory_make ("cluttersink", NULL);
- g_object_set (sink, "texture", CLUTTER_TEXTURE (texture), NULL);
+ g_object_set (sink, "actor", actor, NULL);
// g_object_set (src , "pattern", 10, NULL);
@@ -125,7 +120,7 @@ main (int argc, char *argv[])
/* start the timeline */
clutter_timeline_start (timeline);
- clutter_actor_add_child (stage, texture);
+ clutter_actor_add_child (stage, actor);
// clutter_actor_set_opacity (texture, 0x11);
clutter_actor_show (stage);
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 59fc3ba..9c4df22 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,11 +1,16 @@
NULL = #
+#noinst_PROGRAMS = \
+# test-alpha \
+# test-rgb-upload \
+# test-start-stop \
+# test-yuv-upload \
+# test-video-texture-new-unref-loop \
+# $(NULL)
noinst_PROGRAMS = \
test-alpha \
test-rgb-upload \
- test-start-stop \
test-yuv-upload \
- test-video-texture-new-unref-loop \
$(NULL)
INCLUDES = -I$(top_srcdir) \
@@ -26,12 +31,12 @@ test_rgb_upload_LDFLAGS = \
$(GST_LIBS) \
$(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
-test_start_stop_SOURCES = test-start-stop.c
-test_start_stop_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
-test_start_stop_LDFLAGS = \
- $(CLUTTER_GST_LIBS) \
- $(GST_LIBS) \
- $(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
+#test_start_stop_SOURCES = test-start-stop.c
+#test_start_stop_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
+#test_start_stop_LDFLAGS = \
+# $(CLUTTER_GST_LIBS) \
+# $(GST_LIBS) \
+# $(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
test_yuv_upload_SOURCES = test-yuv-upload.c
test_yuv_upload_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
@@ -40,9 +45,9 @@ test_yuv_upload_LDFLAGS = \
$(GST_LIBS) \
$(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
-test_video_texture_new_unref_loop_SOURCES = test-video-texture-new-unref-loop.c
-test_video_texture_new_unref_loop_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
-test_video_texture_new_unref_loop_LDFLAGS = \
- $(CLUTTER_GST_LIBS) \
- $(GST_LIBS) \
- $(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
+#test_video_texture_new_unref_loop_SOURCES = test-video-texture-new-unref-loop.c
+#test_video_texture_new_unref_loop_CFLAGS = $(CLUTTER_GST_CFLAGS) $(GST_CFLAGS)
+#test_video_texture_new_unref_loop_LDFLAGS = \
+# $(CLUTTER_GST_LIBS) \
+# $(GST_LIBS) \
+# $(top_builddir)/clutter-gst/libclutter-gst- CLUTTER_GST_MAJORMINOR@.la
diff --git a/tests/test-alpha.c b/tests/test-alpha.c
index 359ba0a..4f54315 100644
--- a/tests/test-alpha.c
+++ b/tests/test-alpha.c
@@ -66,7 +66,7 @@ parse_fourcc (const gchar *fourcc)
}
void
-size_change (ClutterTexture *texture,
+size_change (ClutterActor *actor,
gint width,
gint height,
gpointer user_data)
@@ -75,7 +75,7 @@ size_change (ClutterTexture *texture,
gfloat new_x, new_y, new_width, new_height;
gfloat stage_width, stage_height;
- stage = clutter_actor_get_stage (CLUTTER_ACTOR (texture));
+ stage = clutter_actor_get_stage (actor);
if (stage == NULL)
return;
@@ -98,8 +98,8 @@ size_change (ClutterTexture *texture,
new_y = 0;
}
- clutter_actor_set_position (CLUTTER_ACTOR (texture), new_x, new_y);
- clutter_actor_set_size (CLUTTER_ACTOR (texture), new_width, new_height);
+ clutter_actor_set_position (actor, new_x, new_y);
+ clutter_actor_set_size (actor, new_width, new_height);
}
int
@@ -112,7 +112,7 @@ main (int argc, char *argv[])
const ClutterColor rectangle_color = { 96, 0, 0, 255};
const ClutterRect rectangle_geom = { {110, 70}, {100, 100}};
ClutterActor *stage;
- ClutterActor *texture;
+ ClutterActor *actor;
ClutterActor *rectangle;
ClutterTransition *animation;
@@ -127,7 +127,7 @@ main (int argc, char *argv[])
result = clutter_gst_init_with_args (&argc,
&argv,
- " - Test alpha with video textures",
+ " - Test alpha with video actors",
options,
NULL,
&error);
@@ -153,15 +153,10 @@ main (int argc, char *argv[])
rectangle_geom.size.width,
rectangle_geom.size.height);
- /* We need to set certain props on the target texture currently for
- * efficient/corrent playback onto the texture (which sucks a bit)
- */
- texture = g_object_new (CLUTTER_TYPE_TEXTURE,
- "disable-slicing", TRUE,
- NULL);
- clutter_actor_set_opacity (texture, 0);
+ actor = g_object_new (CLUTTER_GST_TYPE_ACTOR, NULL);
+ clutter_actor_set_opacity (actor, 0);
- g_signal_connect (CLUTTER_TEXTURE (texture),
+ g_signal_connect (actor,
"size-change",
G_CALLBACK (size_change), NULL);
@@ -172,7 +167,7 @@ main (int argc, char *argv[])
g_object_set (G_OBJECT (src), "pattern", 1, NULL);
capsfilter = gst_element_factory_make ("capsfilter", NULL);
sink = gst_element_factory_make ("cluttersink", NULL);
- g_object_set (G_OBJECT (sink), "texture", CLUTTER_TEXTURE (texture), NULL);
+ g_object_set (G_OBJECT (sink), "actor", actor, NULL);
/* make videotestsrc spit the format we want */
if (g_strcmp0 (opt_fourcc, "RGB ") == 0)
@@ -204,18 +199,18 @@ main (int argc, char *argv[])
gst_element_set_state (GST_ELEMENT(pipeline), GST_STATE_PLAYING);
clutter_actor_add_child (stage, rectangle);
- clutter_actor_add_child (stage, texture);
+ clutter_actor_add_child (stage, actor);
clutter_actor_show (stage);
- clutter_actor_save_easing_state (texture);
- clutter_actor_set_easing_mode (texture, CLUTTER_LINEAR);
- clutter_actor_set_easing_duration (texture, 6000);
+ clutter_actor_save_easing_state (actor);
+ clutter_actor_set_easing_mode (actor, CLUTTER_LINEAR);
+ clutter_actor_set_easing_duration (actor, 6000);
- clutter_actor_set_opacity (texture, 0xff);
+ clutter_actor_set_opacity (actor, 0xff);
- clutter_actor_restore_easing_state (texture);
+ clutter_actor_restore_easing_state (actor);
- animation = clutter_actor_get_transition (texture, "opacity");
+ animation = clutter_actor_get_transition (actor, "opacity");
clutter_timeline_set_repeat_count (CLUTTER_TIMELINE (animation), -1);
clutter_main();
diff --git a/tests/test-rgb-upload.c b/tests/test-rgb-upload.c
index aeccf8f..3dcbd55 100644
--- a/tests/test-rgb-upload.c
+++ b/tests/test-rgb-upload.c
@@ -64,7 +64,7 @@ static GOptionEntry options[] =
};
void
-size_change (ClutterTexture *texture,
+size_change (ClutterActor *actor,
gint width,
gint height,
gpointer user_data)
@@ -73,7 +73,7 @@ size_change (ClutterTexture *texture,
gfloat new_x, new_y, new_width, new_height;
gfloat stage_width, stage_height;
- stage = clutter_actor_get_stage (CLUTTER_ACTOR (texture));
+ stage = clutter_actor_get_stage (actor);
if (stage == NULL)
return;
@@ -96,8 +96,8 @@ size_change (ClutterTexture *texture,
new_y = 0;
}
- clutter_actor_set_position (CLUTTER_ACTOR (texture), new_x, new_y);
- clutter_actor_set_size (CLUTTER_ACTOR (texture), new_width, new_height);
+ clutter_actor_set_position (actor, new_x, new_y);
+ clutter_actor_set_size (actor, new_width, new_height);
}
int
@@ -106,7 +106,7 @@ main (int argc, char *argv[])
GError *error = NULL;
gboolean result;
ClutterActor *stage;
- ClutterActor *texture;
+ ClutterActor *actor;
GstPipeline *pipeline;
GstElement *src;
GstElement *capsfilter;
@@ -135,14 +135,9 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_actor_set_size (CLUTTER_ACTOR (stage), 320.0f, 240.0f);
- /* We need to set certain props on the target texture currently for
- * efficient/corrent playback onto the texture (which sucks a bit)
- */
- texture = g_object_new (CLUTTER_TYPE_TEXTURE,
- "disable-slicing", TRUE,
- NULL);
+ actor = g_object_new (CLUTTER_GST_TYPE_ACTOR, NULL);
- g_signal_connect (CLUTTER_TEXTURE (texture),
+ g_signal_connect (actor,
"size-change",
G_CALLBACK (size_change), NULL);
@@ -152,7 +147,7 @@ main (int argc, char *argv[])
src = gst_element_factory_make ("videotestsrc", NULL);
capsfilter = gst_element_factory_make ("capsfilter", NULL);
sink = gst_element_factory_make ("cluttersink", NULL);
- g_object_set (sink, "texture", CLUTTER_TEXTURE (texture), NULL);
+ g_object_set (sink, "actor", actor, NULL);
format = gst_video_format_from_masks(opt_depth, opt_bpp, G_BIG_ENDIAN,
0xff0000,
@@ -173,7 +168,7 @@ main (int argc, char *argv[])
g_critical("Could not link elements");
gst_element_set_state (GST_ELEMENT(pipeline), GST_STATE_PLAYING);
- clutter_actor_add_child (stage, texture);
+ clutter_actor_add_child (stage, actor);
clutter_actor_show (stage);
clutter_main();
diff --git a/tests/test-yuv-upload.c b/tests/test-yuv-upload.c
index 682733e..66668c4 100644
--- a/tests/test-yuv-upload.c
+++ b/tests/test-yuv-upload.c
@@ -53,7 +53,7 @@ static GOptionEntry options[] =
};
void
-size_change (ClutterTexture *texture,
+size_change (ClutterActor *actor,
gint width,
gint height,
gpointer user_data)
@@ -62,7 +62,7 @@ size_change (ClutterTexture *texture,
gfloat new_x, new_y, new_width, new_height;
gfloat stage_width, stage_height;
- stage = clutter_actor_get_stage (CLUTTER_ACTOR (texture));
+ stage = clutter_actor_get_stage (actor);
if (stage == NULL)
return;
@@ -85,8 +85,8 @@ size_change (ClutterTexture *texture,
new_y = 0;
}
- clutter_actor_set_position (CLUTTER_ACTOR (texture), new_x, new_y);
- clutter_actor_set_size (CLUTTER_ACTOR (texture), new_width, new_height);
+ clutter_actor_set_position (actor, new_x, new_y);
+ clutter_actor_set_size (actor, new_width, new_height);
}
int
@@ -95,7 +95,7 @@ main (int argc, char *argv[])
GError *error = NULL;
gboolean result;
ClutterActor *stage;
- ClutterActor *texture;
+ ClutterActor *actor;
GstPipeline *pipeline;
GstElement *src;
GstElement *capsfilter;
@@ -122,14 +122,9 @@ main (int argc, char *argv[])
stage = clutter_stage_new ();
clutter_actor_set_size (CLUTTER_ACTOR(stage), 320.0f, 240.0f);
- /* We need to set certain props on the target texture currently for
- * efficient/corrent playback onto the texture (which sucks a bit)
- */
- texture = g_object_new (CLUTTER_TYPE_TEXTURE,
- "disable-slicing", TRUE,
- NULL);
+ actor = g_object_new (CLUTTER_GST_TYPE_ACTOR, NULL);
- g_signal_connect (CLUTTER_TEXTURE (texture),
+ g_signal_connect (actor,
"size-change",
G_CALLBACK (size_change), NULL);
@@ -139,7 +134,7 @@ main (int argc, char *argv[])
src = gst_element_factory_make ("videotestsrc", NULL);
capsfilter = gst_element_factory_make ("capsfilter", NULL);
sink = gst_element_factory_make ("cluttersink", NULL);
- g_object_set (sink, "texture", CLUTTER_TEXTURE (texture), NULL);
+ g_object_set (sink, "actor", actor, NULL);
/* make videotestsrc spit the format we want */
caps = gst_caps_new_simple ("video/x-raw",
@@ -155,7 +150,7 @@ main (int argc, char *argv[])
g_critical("Could not link elements");
gst_element_set_state (GST_ELEMENT(pipeline), GST_STATE_PLAYING);
- clutter_actor_add_child (stage, texture);
+ clutter_actor_add_child (stage, actor);
/* clutter_actor_set_opacity (texture, 0x11); */
clutter_actor_show (stage);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]