summaryrefslogtreecommitdiff
path: root/examples/video-sink.c
diff options
context:
space:
mode:
authorAndre Moreira Magalhaes (andrunko) <andre.magalhaes@collabora.co.uk>2012-10-16 21:05:30 -0300
committerLionel Landwerlin <llandwerlin@gmail.com>2013-03-18 16:24:18 +0000
commit97b1e5ad8c4cabe68553bf4138b1ae5d12535ec3 (patch)
treeb9218e153642e0383286543caf872e4e88975466 /examples/video-sink.c
parentf06364ba5aa6792a9aee2cbd984dcfe73973ebb7 (diff)
downloadclutter-gst-97b1e5ad8c4cabe68553bf4138b1ae5d12535ec3.tar.gz
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.
Diffstat (limited to 'examples/video-sink.c')
-rw-r--r--examples/video-sink.c29
1 files changed, 12 insertions, 17 deletions
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);