#include ClutterElement *rect; /* um... */ gboolean foo (gpointer data) { static int i = 0; clutter_element_set_opacity (CLUTTER_ELEMENT(data), i); i += 10; if (i>255) i = 0; return TRUE; } void input_cb (ClutterStage *stage, ClutterEvent *event, gpointer user_data) { ClutterVideoTexture *vtex = CLUTTER_VIDEO_TEXTURE(user_data); static gint paused = 0; if (event->type == CLUTTER_KEY_RELEASE) { if (paused) { clutter_video_texture_play (vtex, NULL); paused = 0; } else { clutter_video_texture_pause (vtex); paused = 1; } } } void size_change (ClutterTexture *texture, gint width, gint height, gpointer user_data) { ClutterGeometry stage_geom; gint vid_width, vid_height, new_y, new_height; clutter_element_get_geometry (CLUTTER_ELEMENT(clutter_stage()), &stage_geom); clutter_texture_get_base_size (texture, &vid_width, &vid_height); printf("*** vid : %ix%i stage %ix%i ***\n", vid_width, vid_height, stage_geom.width, stage_geom.height); new_height = ( vid_height * stage_geom.width ) / vid_width; new_y = (stage_geom.height - new_height) / 2; clutter_element_set_position (CLUTTER_ELEMENT(texture), 0, new_y); clutter_element_set_size (CLUTTER_ELEMENT(texture), stage_geom.width, new_height); clutter_element_set_opacity (CLUTTER_ELEMENT(texture), 50); printf("*** Pos set to +%i+%i , %ix%i ***\n", 0, new_y, stage_geom.width, new_height); } void tick (ClutterVideoTexture *cvt, gint64 current_time, gint64 stream_length, float current_position, gboolean seekable, gpointer userdata) { gint w, h; gchar buf[256]; ClutterLabel *label = CLUTTER_LABEL(userdata); g_snprintf(buf, 256, "%lli/%lli secs", current_time / 1000, stream_length / 1000); clutter_label_set_text (label, buf); clutter_texture_get_base_size (CLUTTER_TEXTURE(label), &w, &h); clutter_element_set_size(rect, w+10, h+10); } int main (int argc, char *argv[]) { ClutterElement *label, *vtexture, *ctexture; GError *err = NULL; if (argc < 2) g_error("%s