From 507b089c1eb6a71e11cef6a9bd7a91f377fe26c8 Mon Sep 17 00:00:00 2001 From: vlad Date: Wed, 28 Jul 2010 23:08:18 +0300 Subject: [PATCH] began loop video --- applet/src/livewp-scene.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/applet/src/livewp-scene.c b/applet/src/livewp-scene.c index e4c4813..be068b5 100644 --- a/applet/src/livewp-scene.c +++ b/applet/src/livewp-scene.c @@ -86,6 +86,23 @@ sync_handler(GstBus *bus, GstMessage *message, AWallpaperPlugin *desktop_plugin) } #endif +static gboolean +bus_call (GstBus *bus, GstMessage *msg, AWallpaperPlugin *desktop_plugin) +{ + switch (GST_MESSAGE_TYPE (msg)) + { + case GST_MESSAGE_EOS: + if (desktop_plugin->priv->rich_animation){ + gst_element_set_start_time(desktop_plugin->priv->pipeline, 0); + gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING); + } + break; + case GST_MESSAGE_ERROR: break; + default: break; + } + return TRUE; +} + void init_scene_Video(AWallpaperPlugin *desktop_plugin) { @@ -104,7 +121,7 @@ init_scene_Video(AWallpaperPlugin *desktop_plugin) { GstBus *bus; bus = gst_pipeline_get_bus (GST_PIPELINE (desktop_plugin->priv->pipeline)); -// gst_bus_add_watch(bus, bus_call, NULL); + gst_bus_add_watch(bus, bus_call, desktop_plugin); gst_object_unref (bus); } file_plus_uri = g_strdup_printf("file://%s",desktop_plugin->priv->theme_string_parametr1); -- 1.7.9.5