[longomatch] Use the magic props order to fix the editor



commit eb30b0ac8e3dc43bd80699d20a6db517e4a49f95
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Tue Aug 30 21:45:16 2011 +0200

    Use the magic props order to fix the editor

 CesarPlayer/Editor/GstVideoSplitter.cs |   23 ++++++++++++++++-------
 1 files changed, 16 insertions(+), 7 deletions(-)
---
diff --git a/CesarPlayer/Editor/GstVideoSplitter.cs b/CesarPlayer/Editor/GstVideoSplitter.cs
index 7cc33f0..00b8870 100644
--- a/CesarPlayer/Editor/GstVideoSplitter.cs
+++ b/CesarPlayer/Editor/GstVideoSplitter.cs
@@ -275,7 +275,6 @@ namespace LongoMatch.Video.Editor {
 		}
 
 
-
 		[DllImport("libcesarplayer.dll")]
 		static extern void gst_video_editor_clear_segments_list(IntPtr raw);
 
@@ -289,7 +288,13 @@ namespace LongoMatch.Video.Editor {
 		public void AddSegment(string filePath, long start, long duration, double rate, string title, bool hasAudio) {
 			if(Environment.OSVersion.Platform == PlatformID.Win32NT)
 				filePath="file:///"+filePath;
-			gst_video_editor_add_segment(Handle, filePath, start, duration, rate, GLib.Marshaller.StringToPtrGStrdup(title), hasAudio);
+			Console.WriteLine (filePath);
+			Console.WriteLine (start);
+			Console.WriteLine (duration);
+			Console.WriteLine (rate);
+			Console.WriteLine (title);
+			Console.WriteLine (hasAudio);
+			gst_video_editor_add_segment(Handle, filePath, start, duration, rate, GLib.Marshaller.StringToPtrGStrdup(title), true);
 		}
 
 
@@ -358,14 +363,18 @@ namespace LongoMatch.Video.Editor {
 
 		public EncodingSettings EncodingSettings{
 			set{
-				AudioEncoder = value.EncodingProfile.AudioEncoder;
-				VideoEncoder = value.EncodingProfile.VideoEncoder;
-				VideoMuxer = value.EncodingProfile.Muxer;
-				Height = (int) value.VideoStandard.Height;
-				Width = (int) value.VideoStandard.Width;
+				/* FIXME: This should only be possible with the editor in the NULL state.
+				 * For now keep this exact order setting the properties in the editor,
+				 * otherwise it won't work */
 				VideoBitrate = (int) value.VideoBitrate;
 				AudioBitrate = (int) value.AudioBitrate;
+				Height = (int) value.VideoStandard.Height;
+				Width = (int) value.VideoStandard.Width;
+				AudioEncoder = value.EncodingProfile.AudioEncoder;
+				VideoEncoder = value.EncodingProfile.VideoEncoder;
 				OutputFile = value.OutputFile;
+				EnableAudio = false;
+				VideoMuxer = value.EncodingProfile.Muxer;
 			}
 		}
 



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