[snappy] ui: update media size and duration of new uri



commit d27ceb7f8b24cabfd7a7d090b2668d3da43594c6
Author: Luis de Bethencourt <luis debethencourt com>
Date:   Fri May 4 10:54:28 2012 +0100

    ui: update media size and duration of new uri

 src/gst_engine.c     |    2 ++
 src/user_interface.c |    8 ++++++++
 2 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/gst_engine.c b/src/gst_engine.c
index 15eff02..e63cf4a 100644
--- a/src/gst_engine.c
+++ b/src/gst_engine.c
@@ -652,6 +652,8 @@ engine_open_uri (GstEngine * engine, gchar * uri)
   gst_element_set_state (engine->player, GST_STATE_READY);
   g_object_set (G_OBJECT (engine->player), "uri", uri, NULL);
 
+  discover (engine, uri);
+
   return;
 }
 
diff --git a/src/user_interface.c b/src/user_interface.c
index f31ce68..d38904e 100644
--- a/src/user_interface.c
+++ b/src/user_interface.c
@@ -1025,6 +1025,14 @@ interface_load_uri (UserInterface * ui, gchar * uri)
     clutter_text_set_text (CLUTTER_TEXT (ui->control_title), ui->filename);
   }
 
+  ui->duration_str = position_ns_to_str (ui->engine->media_duration);
+  ui->media_width = ui->engine->media_width;
+  ui->media_height = ui->engine->media_height;
+
+  clutter_actor_set_size (CLUTTER_ACTOR (ui->texture), ui->media_width,
+      ui->media_height);
+  size_change (CLUTTER_STAGE (ui->stage), NULL, 0, ui);
+
   return TRUE;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]