[longomatch] Fix duration calculation:StreamLenght return a duration in nanoseconds



commit aec2f4e2c45b7626fbb65b198c7f49b03a7a6022
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sat Apr 17 04:13:49 2010 +0200

    Fix duration calculation:StreamLenght return a duration in nanoseconds

 CesarPlayer/Utils/PreviewMediaFile.cs              |    2 +-
 .../LongoMatch.Gui.Dialog.ProjectsManager.cs       |    4 ++--
 LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs    |    2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/CesarPlayer/Utils/PreviewMediaFile.cs b/CesarPlayer/Utils/PreviewMediaFile.cs
index 451003e..1d50e0b 100644
--- a/CesarPlayer/Utils/PreviewMediaFile.cs
+++ b/CesarPlayer/Utils/PreviewMediaFile.cs
@@ -96,7 +96,7 @@ namespace LongoMatch.Video.Utils
 					thumbnailer.Open(filePath);
 					thumbnailer.SeekTime(1000,false);
 					preview = thumbnailer.GetCurrentFrame(THUMBNAIL_MAX_WIDTH,THUMBNAIL_MAX_HEIGHT);
-					duration = (int)(thumbnailer as GstPlayer).StreamLength;				/* On Windows some formats report a 0 duration, try a last time with the reader */
+					duration =(int) ((thumbnailer as GstPlayer).StreamLength/1000);				/* On Windows some formats report a 0 duration, try a last time with the reader */
 					if (duration == 0)
 						duration = (int)reader.GetMetadata(MetadataType.Duration);
 					thumbnailer.Dispose();
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
index d98db10..f104c79 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.Dialog.ProjectsManager.cs
@@ -148,11 +148,11 @@ namespace LongoMatch.Gui.Dialog {
             // Container child GtkAlignment8.Gtk.Container+ContainerChild
             Gtk.HBox w9 = new Gtk.HBox();
             w9.Spacing = 2;
-            // Container child GtkHBox10.Gtk.Container+ContainerChild
+            // Container child GtkHBox14.Gtk.Container+ContainerChild
             Gtk.Image w10 = new Gtk.Image();
             w10.Pixbuf = Stetic.IconLoader.LoadIcon(this, "stock_export", Gtk.IconSize.Menu, 16);
             w9.Add(w10);
-            // Container child GtkHBox10.Gtk.Container+ContainerChild
+            // Container child GtkHBox14.Gtk.Container+ContainerChild
             Gtk.Label w12 = new Gtk.Label();
             w12.LabelProp = Mono.Unix.Catalog.GetString("_Export");
             w12.UseUnderline = true;
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index 78d2be8..9cf965f 100644
--- a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
+++ b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
@@ -193,7 +193,7 @@ namespace LongoMatch.Gui {
             this.ImportProjectAction.ShortLabel = Mono.Unix.Catalog.GetString("_Import Project");
             w1.Add(this.ImportProjectAction, "<Control>i");
             this.FreeCaptureModeAction = new Gtk.RadioAction("FreeCaptureModeAction", Mono.Unix.Catalog.GetString("Free Capture Mode"), null, null, 0);
-            this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
+            this.FreeCaptureModeAction.Group = this.CaptureModeAction.Group;
             this.FreeCaptureModeAction.Sensitive = false;
             this.FreeCaptureModeAction.ShortLabel = Mono.Unix.Catalog.GetString("Free Capture Mode");
             w1.Add(this.FreeCaptureModeAction, null);



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