[longomatch] Use an Uri to set the location of the GnlFileSource.



commit 9a53376ef45595b6f3035176b9deb85038c77ff9
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Aug 18 14:31:40 2009 +0200

    Use an Uri to set the location of the GnlFileSource.

 CesarPlayer/Editor/GstVideoSplitter.cs |    7 ++++---
 CesarPlayer/Editor/IVideoEditor.cs     |    2 +-
 CesarPlayer/Editor/IVideoSplitter.cs   |    2 +-
 CesarPlayer/Makefile.am                |   12 +++---------
 CesarPlayer/MultimediaFactory.cs       |    6 +++---
 LongoMatch/Gui/PlayListWidget.cs       |   11 +++++++++--
 LongoMatch/gtk-gui/objects.xml         |   20 ++++++++++----------
 7 files changed, 31 insertions(+), 29 deletions(-)
---
diff --git a/CesarPlayer/Editor/GstVideoSplitter.cs b/CesarPlayer/Editor/GstVideoSplitter.cs
index 2af1736..2c82c7a 100644
--- a/CesarPlayer/Editor/GstVideoSplitter.cs
+++ b/CesarPlayer/Editor/GstVideoSplitter.cs
@@ -285,8 +285,9 @@ namespace LongoMatch.Video.Editor {
 		[DllImport("libcesarplayer.dll")]
 		static extern void gst_video_editor_add_segment(IntPtr raw, string file_path, long start, long duration, double rate, IntPtr title, bool hasAudio);
 
-		public void AddSegment(string filePath, long start, long duration, double rate, string title, bool hasAudio) {
-			gst_video_editor_add_segment(Handle, filePath, start, duration, rate, GLib.Marshaller.StringToPtrGStrdup(title), hasAudio);
+		public void AddSegment(Uri filePath, long start, long duration, double rate, string title, bool hasAudio) {
+			Console.WriteLine(filePath.AbsoluteUri);
+			gst_video_editor_add_segment(Handle, filePath.AbsoluteUri, start, duration, rate, GLib.Marshaller.StringToPtrGStrdup(title), hasAudio);
 		}
 		
 		
@@ -350,7 +351,7 @@ namespace LongoMatch.Video.Editor {
 		}
 		
 		
-		public void SetSegment (string filePath, long start, long duration, double rate, string title, bool hasAudio){
+		public void SetSegment (Uri filePath, long start, long duration, double rate, string title, bool hasAudio){
 			ClearList();
 			AddSegment(filePath, start, duration, rate, title,hasAudio);
 		}
diff --git a/CesarPlayer/Editor/IVideoEditor.cs b/CesarPlayer/Editor/IVideoEditor.cs
index c620230..92c3eb5 100644
--- a/CesarPlayer/Editor/IVideoEditor.cs
+++ b/CesarPlayer/Editor/IVideoEditor.cs
@@ -70,7 +70,7 @@ namespace LongoMatch.Video.Editor
 		}
 		
 			
-		void AddSegment (string filePath, long start, long duration, double rate, string title, bool hasAudio) ;
+		void AddSegment (Uri filePath, long start, long duration, double rate, string title, bool hasAudio) ;
 		
 		void ClearList();
 		
diff --git a/CesarPlayer/Editor/IVideoSplitter.cs b/CesarPlayer/Editor/IVideoSplitter.cs
index eee3af1..0679a0f 100644
--- a/CesarPlayer/Editor/IVideoSplitter.cs
+++ b/CesarPlayer/Editor/IVideoSplitter.cs
@@ -62,7 +62,7 @@ namespace LongoMatch.Video.Editor
 			set;
 		}
 		
-		void SetSegment(string filePath, long start, long duration, double rate, string title, bool hasAudio);
+		void SetSegment(Uri filePath, long start, long duration, double rate, string title, bool hasAudio);
 		
 		AudioCodec AudioCodec{
 			set;
diff --git a/CesarPlayer/Makefile.am b/CesarPlayer/Makefile.am
index f4b4f64..b723cb6 100644
--- a/CesarPlayer/Makefile.am
+++ b/CesarPlayer/Makefile.am
@@ -84,23 +84,17 @@ FILES = \
 	Editor/VideoQuality.cs \
 	Editor/PercentCompletedHandler.cs \
 	Editor/GstVideoSplitter.cs \
-	Editor/GnonlinEditor.cs \
 	Editor/VideoSegment.cs \
 	Editor/EditorState.cs \
 	Editor/VideoFormat.cs \
 	Editor/VideoMuxer.cs \
 	Editor/VideoCodec.cs \
-	Editor/IMerger.cs \
-	Editor/MatroskaMerger.cs \
 	Editor/AudioCodec.cs \
 	Editor/IVideoSplitter.cs \
 	Editor/VideoSplitterType.cs \
-	Editor/ConcatMerger.cs \
-	Editor/GenericMerger.cs \
-	Editor/AviMerger.cs \
 	Utils/MediaFile.cs \
 	Utils/PreviewMediaFile.cs\
-	Editor/AvidemuxMerger.cs 
+
 
 DATA_FILES = 
 
@@ -108,8 +102,8 @@ RESOURCES = \
 	gtk-gui/objects.xml \
 	gtk-gui/gui.stetic 
 
-EXTRAS = \
-	cesarplayer.key 
+EXTRAS = 
+	
 
 REFERENCES =  \
 	System \
diff --git a/CesarPlayer/MultimediaFactory.cs b/CesarPlayer/MultimediaFactory.cs
index 1f8be27..668f4ef 100644
--- a/CesarPlayer/MultimediaFactory.cs
+++ b/CesarPlayer/MultimediaFactory.cs
@@ -96,7 +96,7 @@ namespace LongoMatch.Video
 				return new GstVideoSplitter();	
 				
 			 default:
-				return new GnonlinEditor();
+				return new GstVideoSplitter();
 			}
 		}
 		
@@ -115,7 +115,7 @@ namespace LongoMatch.Video
 			}			
 		}
 		
-		public IMerger GetVideoMerger(VideoMuxer muxer){
+		/*public IMerger GetVideoMerger(VideoMuxer muxer){
 			if (muxer == VideoMuxer.AVI)
 				return new AvidemuxMerger();
 			else if (muxer == VideoMuxer.DVD)
@@ -126,6 +126,6 @@ namespace LongoMatch.Video
 				return new AvidemuxMerger(); 
 			else 
 				return new AvidemuxMerger();
-		}		
+		}		*/
 	}
 }
diff --git a/LongoMatch/Gui/PlayListWidget.cs b/LongoMatch/Gui/PlayListWidget.cs
index b46dc87..582e742 100644
--- a/LongoMatch/Gui/PlayListWidget.cs
+++ b/LongoMatch/Gui/PlayListWidget.cs
@@ -265,13 +265,20 @@ namespace LongoMatch.Gui.Component
 				LoadEditor();
 				//videoEditor.ClearList();
 				foreach (PlayListTimeNode segment in playList){
-					if (segment.Valid)
-						videoEditor.AddSegment(segment.MediaFile.FilePath, 
+					if (segment.Valid){
+						Uri file;
+						if (Environment.OSVersion.Platform == PlatformID.Win32NT)
+							file = new Uri("file:///"+segment.MediaFile.FilePath);
+						else
+							file = new Uri("file://"+segment.MediaFile.FilePath);
+						videoEditor.AddSegment(file, 
 						                       segment.Start.MSeconds, 
 						                       segment.Duration.MSeconds, 
 						                       segment.Rate, 
 						                       segment.Name,
 						                       segment.MediaFile.HasAudio);
+				
+					}
 				}
 				try {
 					videoEditor.VideoQuality = vep.VideoQuality;
diff --git a/LongoMatch/gtk-gui/objects.xml b/LongoMatch/gtk-gui/objects.xml
index 49ef68b..e14a216 100755
--- a/LongoMatch/gtk-gui/objects.xml
+++ b/LongoMatch/gtk-gui/objects.xml
@@ -39,16 +39,6 @@
       </itemgroup>
     </signals>
   </object>
-  <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
-    <itemgroups />
-    <signals>
-      <itemgroup label="PlayListWidget Signals">
-        <signal name="PlayListNodeSelected" />
-        <signal name="ApplyCurrentRate" />
-        <signal name="Progress" />
-      </itemgroup>
-    </signals>
-  </object>
   <object type="LongoMatch.Gui.Component.TimeLineWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
     <itemgroups>
       <itemgroup label="TimeLineWidget Properties">
@@ -173,4 +163,14 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.PlayListWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
+    <itemgroups />
+    <signals>
+      <itemgroup label="PlayListWidget Signals">
+        <signal name="PlayListNodeSelected" />
+        <signal name="ApplyCurrentRate" />
+        <signal name="Progress" />
+      </itemgroup>
+    </signals>
+  </object>
 </objects>
\ No newline at end of file



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