fprintf(stderr,"GST_MESSAGE_EOS:\n");
if (desktop_plugin->priv->rich_animation){
fprintf(stderr,"GST_MESSAGE_EOS222222222222222222222222\n");
- gst_element_set_start_time(desktop_plugin->priv->pipeline, 0);
+ GstClockTime nach = (GstClockTime)(10 * GST_MSECOND);
+ if (!gst_element_seek(desktop_plugin->priv->pipeline, 1.0, GST_FORMAT_TIME, (GstSeekFlags) (GST_SEEK_FLAG_FLUSH | GST_SEEK_FLAG_KEY_UNIT), GST_SEEK_TYPE_SET, nach, GST_SEEK_TYPE_NONE, GST_CLOCK_TIME_NONE))
+ fprintf(stderr,"ERROR in seek\n");
+
+
+
+
+
+// gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_READY);
+
+// gst_element_set_start_time(desktop_plugin->priv->pipeline, 0);
gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_PLAYING);
+ }else{
+ fprintf(stderr,"GST_MESSAGE_EOS33333333333333333333\n");
+ if (desktop_plugin->priv->pipeline){ gst_element_set_state (desktop_plugin->priv->pipeline, GST_STATE_NULL); gst_object_unref (GST_OBJECT (desktop_plugin->priv->pipeline));
+ }
}
break;
case GST_MESSAGE_ERROR: break;
/*******************************************************************************/
GtkWidget *
-create_rich_animation_button (gboolean active)
+create_rich_animation_button (gboolean active, gchar *name)
{
GtkWidget *button;
button = hildon_check_button_new (HILDON_SIZE_AUTO);
- gtk_button_set_label (GTK_BUTTON (button), _("Rich Animation"));
+ gtk_button_set_label (GTK_BUTTON (button), name);
hildon_check_button_set_active(HILDON_CHECK_BUTTON(button), active);
return button;
}
rich_animation_additional_parametr(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
GtkWidget *rich_animation_button;
/* Create rich animation button */
- rich_animation_button = create_rich_animation_button(priv->rich_animation);
+ rich_animation_button = create_rich_animation_button(priv->rich_animation, _("Rich Animation"));
gtk_box_pack_start(GTK_BOX(vbox),
rich_animation_button, TRUE, TRUE, 5);
g_object_set_data(G_OBJECT(priv->window), "rich_animation_button", rich_animation_button);
additional_parametr_for_theme_video(GtkWidget *vbox, Animation_WallpaperPrivate *priv){
GtkWidget *file_button;
+ GtkWidget *rich_animation_button;
if (priv->theme_string_parametr1)
file_button = hildon_button_new_with_text (HILDON_SIZE_FINGER_HEIGHT, HILDON_BUTTON_ARRANGEMENT_VERTICAL,
gtk_box_pack_start(GTK_BOX(vbox),
file_button, TRUE, TRUE, 5);
- g_object_set_data(G_OBJECT(priv->window), "filename_button", file_button);
+ g_object_set_data(G_OBJECT(priv->window), "filename_button", file_button); /* Create rich animation button */
+ rich_animation_button = create_rich_animation_button(priv->rich_animation, _("Loop"));
+ gtk_box_pack_start(GTK_BOX(vbox),
+ rich_animation_button, TRUE, TRUE, 5);
+ g_object_set_data(G_OBJECT(priv->window), "rich_animation_button", rich_animation_button);
+
gtk_widget_show (file_button);
+ gtk_widget_show (rich_animation_button);
}
/*******************************************************************************/
}
- rich_animation_button = g_object_get_data(G_OBJECT(priv->window), "filename_button");
+ rich_animation_button = g_object_get_data(G_OBJECT(priv->window), "rich_animation_button");
if (rich_animation_button){
/* Check rich animation */
if (hildon_check_button_get_active (HILDON_CHECK_BUTTON(rich_animation_button)))