[longomatch/redesign3: 149/156] Rework Encoding settings using profiles



commit 777b3325b9addae5c912f67e1dcfea704700d32a
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Aug 17 20:29:34 2011 +0200

    Rework Encoding settings using profiles

 CesarPlayer/CesarPlayer.mdp                        |    6 +-
 .../CaptureSettings.cs}                            |   22 +++--
 CesarPlayer/Common/EncodingProfiles.cs             |   56 ++++++++++++
 .../EncodingSettings.cs}                           |   47 ++++++-----
 CesarPlayer/Common/VideoStandards.cs               |   53 ++++++++++++
 CesarPlayer/Gui/CapturerBin.cs                     |   31 +++-----
 CesarPlayer/Makefile.am                            |    5 +-
 LongoMatch/Common/ProjectUtils.cs                  |    6 +-
 LongoMatch/Gui/Component/ProjectDetailsWidget.cs   |   90 +++++++-------------
 LongoMatch/Gui/Dialog/NewProjectDialog.cs          |    4 +-
 LongoMatch/Gui/MainWindow.cs                       |   12 ++--
 11 files changed, 209 insertions(+), 123 deletions(-)
---
diff --git a/CesarPlayer/CesarPlayer.mdp b/CesarPlayer/CesarPlayer.mdp
index cb78c97..729cda8 100644
--- a/CesarPlayer/CesarPlayer.mdp
+++ b/CesarPlayer/CesarPlayer.mdp
@@ -63,10 +63,14 @@
     <File subtype="Code" buildaction="Compile" name="Common/Enum.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/Handlers.cs" />
     <File subtype="Code" buildaction="Compile" name="Capturer/LiveSourceTimer.cs" />
-    <File subtype="Code" buildaction="Compile" name="Capturer/CaptureProperties.cs" />
     <File subtype="Code" buildaction="Compile" name="Utils/Device.cs" />
     <File subtype="Code" buildaction="Compile" name="Common/Constants.cs" />
     <File subtype="Code" buildaction="Compile" name="Utils/MpegRemuxer.cs" />
+    <File subtype="Code" buildaction="Compile" name="Common/VideoStandards.cs" />
+    <File subtype="Code" buildaction="Compile" name="Common/EncodingProfiles.cs" />
+    <File subtype="Code" buildaction="Compile" name="Common/EncodingSettings.cs" />
+    <File subtype="Code" buildaction="Compile" name="Common/CaptureSettings.cs" />
+    <File subtype="Directory" buildaction="Compile" name="Capturer" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
diff --git a/CesarPlayer/Capturer/CaptureProperties.cs b/CesarPlayer/Common/CaptureSettings.cs
similarity index 66%
copy from CesarPlayer/Capturer/CaptureProperties.cs
copy to CesarPlayer/Common/CaptureSettings.cs
index 01c661a..1151e85 100644
--- a/CesarPlayer/Capturer/CaptureProperties.cs
+++ b/CesarPlayer/Common/CaptureSettings.cs
@@ -22,18 +22,20 @@ using LongoMatch.Video.Common;
 namespace LongoMatch.Video.Capturer
 {
 
-
-	public struct CapturePropertiesStruct
+	public struct CaptureSettings
 	{
 		public CaptureSourceType CaptureSourceType;
-		public string OutputFile;
 		public string DeviceID;
-		public uint VideoBitrate;
-		public uint AudioBitrate;
-		public VideoEncoderType VideoEncoder;
-		public AudioEncoderType AudioEncoder;
-		public VideoMuxerType Muxer;
-		public uint Height;
-		public uint Width;
+		public EncodingSettings EncodingSettings;
+
+		public static CaptureSettings DefaultSettings() {
+			CaptureSettings settings = new CaptureSettings();
+			settings.CaptureSourceType = CaptureSourceType.Raw;
+			settings.EncodingSettings = new EncodingSettings(VideoStandards.P480_4_3,
+			                                                 EncodingProfiles.MP4,
+			                                                 25, 1, 1000, 128, "");
+			return settings;
+		}
 	}
+	
 }
diff --git a/CesarPlayer/Common/EncodingProfiles.cs b/CesarPlayer/Common/EncodingProfiles.cs
new file mode 100644
index 0000000..a8ac364
--- /dev/null
+++ b/CesarPlayer/Common/EncodingProfiles.cs
@@ -0,0 +1,56 @@
+// 
+//  Copyright (C) 2011 Andoni Morales Alastruey
+// 
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+using System;
+namespace LongoMatch.Video.Common
+{
+	public struct EncodingProfile
+	{
+		public EncodingProfile(string name,
+		                             VideoEncoderType videoEncoder,
+		                             AudioEncoderType audioEncoder,
+		                             VideoMuxerType muxer) {
+		    Name = name;
+			VideoEncoder = videoEncoder;
+			AudioEncoder = audioEncoder;
+			Muxer = muxer;
+		}
+		
+		public string Name;
+		public VideoEncoderType VideoEncoder;
+		public AudioEncoderType AudioEncoder;
+		public VideoMuxerType Muxer;
+	}
+	
+	public class EncodingProfiles {
+		public static EncodingProfile WebM = new EncodingProfile("WebM (VP8 + Vorbis)",
+		                                                                     VideoEncoderType.VP8,
+		                                                                     AudioEncoderType.Vorbis,
+		                                                                     VideoMuxerType.WebM);
+		                                                                     
+		public static EncodingProfile Avi = new EncodingProfile("AVI (Mpeg4 + MP3)",
+		                                                                     VideoEncoderType.Mpeg4,
+		                                                                     AudioEncoderType.Mp3,
+		                                                                     VideoMuxerType.Avi);
+
+		public static EncodingProfile MP4 = new EncodingProfile("MP4 (H264 + AAC)",
+		                                                                     VideoEncoderType.H264,
+		                                                                     AudioEncoderType.Aac,
+		                                                                     VideoMuxerType.Mp4);
+	}
+	
+}
diff --git a/CesarPlayer/Capturer/CaptureProperties.cs b/CesarPlayer/Common/EncodingSettings.cs
similarity index 53%
rename from CesarPlayer/Capturer/CaptureProperties.cs
rename to CesarPlayer/Common/EncodingSettings.cs
index 01c661a..9b6e8a3 100644
--- a/CesarPlayer/Capturer/CaptureProperties.cs
+++ b/CesarPlayer/Common/EncodingSettings.cs
@@ -1,39 +1,44 @@
-//
-//  Copyright (C) 2010 Andoni Morales Alastruey
-//
+// 
+//  Copyright (C) 2011 Andoni Morales Alastruey
+// 
 //  This program is free software; you can redistribute it and/or modify
 //  it under the terms of the GNU General Public License as published by
 //  the Free Software Foundation; either version 2 of the License, or
 //  (at your option) any later version.
-//
+// 
 //  This program is distributed in the hope that it will be useful,
 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 //  GNU General Public License for more details.
-//
+//  
 //  You should have received a copy of the GNU General Public License
 //  along with this program; if not, write to the Free Software
 //  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
-//
-
+// 
 using System;
-using LongoMatch.Video.Common;
-
-namespace LongoMatch.Video.Capturer
+namespace LongoMatch.Video.Common
 {
-
-
-	public struct CapturePropertiesStruct
+	public struct EncodingSettings
 	{
-		public CaptureSourceType CaptureSourceType;
-		public string OutputFile;
-		public string DeviceID;
+		public EncodingSettings(VideoStandard videoStandard, EncodingProfile encodingProfile,
+		                        uint fr_n, uint fr_d, uint videoBitrate, uint audioBitrate, 
+		                        string outputFile) {
+			VideoStandard = videoStandard;
+			EncodingProfile = encodingProfile;
+			Framerate_n = fr_n;
+			Framerate_d = fr_d;
+			AudioBitrate = audioBitrate;
+			VideoBitrate = videoBitrate;
+			OutputFile = outputFile;
+		}
+		
+		public VideoStandard VideoStandard;
+		public EncodingProfile EncodingProfile;
+		public uint Framerate_n;
+		public uint Framerate_d;
 		public uint VideoBitrate;
 		public uint AudioBitrate;
-		public VideoEncoderType VideoEncoder;
-		public AudioEncoderType AudioEncoder;
-		public VideoMuxerType Muxer;
-		public uint Height;
-		public uint Width;
+		public string OutputFile;
 	}
 }
+
diff --git a/CesarPlayer/Common/VideoStandards.cs b/CesarPlayer/Common/VideoStandards.cs
new file mode 100644
index 0000000..16a2ec5
--- /dev/null
+++ b/CesarPlayer/Common/VideoStandards.cs
@@ -0,0 +1,53 @@
+// 
+//  Copyright (C) 2011 Andoni Morales Alastruey
+// 
+//  This program is free software; you can redistribute it and/or modify
+//  it under the terms of the GNU General Public License as published by
+//  the Free Software Foundation; either version 2 of the License, or
+//  (at your option) any later version.
+// 
+//  This program is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+//  GNU General Public License for more details.
+//  
+//  You should have received a copy of the GNU General Public License
+//  along with this program; if not, write to the Free Software
+//  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
+// 
+using System;
+using Mono.Unix;
+
+namespace LongoMatch.Video.Common
+{
+	public struct VideoStandard
+	{
+		public VideoStandard(string name, uint height, uint width) {
+			Name = name;
+			Height = height;
+			Width = width;
+		}
+		
+		public string Name;
+		public uint Height;
+		public uint Width;
+	}
+	
+	public class VideoStandards {
+		public static VideoStandard Original = new VideoStandard(Catalog.GetString("Keep original size"), 0, 0);
+		public static VideoStandard P240 = new VideoStandard("240p", 240, 0);
+		public static VideoStandard P480 = new VideoStandard("480p", 480, 0);
+		public static VideoStandard P720 = new VideoStandard("720p", 720, 0);
+		public static VideoStandard P1080 = new VideoStandard("1080p", 1080, 0);
+		public static VideoStandard P240_4_3 = new VideoStandard("240p (4:3)", 240, 320);
+		public static VideoStandard P240_16_9 = new VideoStandard("240p (16:9)", 240, 426);
+		public static VideoStandard P480_4_3 = new VideoStandard("480p (4:3)", 480, 640);
+		public static VideoStandard P480_16_9 = new VideoStandard("480p (16:9)", 480, 854);
+		public static VideoStandard P720_4_3 = new VideoStandard("720p (4:3)", 720, 960);
+		public static VideoStandard P720_16_9 = new VideoStandard("720p (16:9)", 720, 1280);
+		public static VideoStandard P1080_4_3 = new VideoStandard("1080p (4:3)", 1080, 1440);
+		public static VideoStandard P1080_16_9 = new VideoStandard("1080p (16:9)", 1080, 1920);
+	}
+	
+}
+
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index 1987e15..bb5c8dd 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -40,7 +40,7 @@ namespace LongoMatch.Gui
 		public event ErrorHandler Error;
 
 		private Pixbuf logopix;
-		private CapturePropertiesStruct captureProps;
+		private CaptureSettings captureProps;
 		private CapturerType capturerType;
 		private bool captureStarted;
 		private bool capturing;
@@ -51,16 +51,7 @@ namespace LongoMatch.Gui
 		public CapturerBin()
 		{
 			this.Build();
-			captureProps = new CapturePropertiesStruct();
-			captureProps.Width = 320;
-			captureProps.Height = 240;
-			captureProps.VideoBitrate = 1000;
-			captureProps.AudioBitrate = 128;
-			captureProps.VideoEncoder = VideoEncoderType.H264;
-			captureProps.AudioEncoder = AudioEncoderType.Aac;
-			captureProps.Muxer = VideoMuxerType.Mp4;
-			captureProps.OutputFile = "";
-			captureProps.CaptureSourceType = CaptureSourceType.Raw;
+			captureProps = CaptureSettings.DefaultSettings();
 			Type = CapturerType.Fake;
 		}
 
@@ -114,7 +105,7 @@ namespace LongoMatch.Gui
 			}
 		}
 
-		public CapturePropertiesStruct CaptureProperties {
+		public CaptureSettings CaptureProperties {
 			set {
 				captureProps = value;
 			}
@@ -219,15 +210,15 @@ namespace LongoMatch.Gui
 				return;
 
 			capturer.DeviceID = captureProps.DeviceID;
-			capturer.OutputFile = captureProps.OutputFile;
-			capturer.OutputHeight = captureProps.Height;
-			capturer.OutputWidth = captureProps.Width;
-			capturer.SetVideoEncoder(captureProps.VideoEncoder);
-			capturer.SetAudioEncoder(captureProps.AudioEncoder);
-			capturer.SetVideoMuxer(captureProps.Muxer);
+			capturer.OutputFile = captureProps.EncodingSettings.OutputFile;
+			capturer.OutputHeight = captureProps.EncodingSettings.VideoStandard.Height;
+			capturer.OutputWidth = captureProps.EncodingSettings.VideoStandard.Width;
+			capturer.SetVideoEncoder(captureProps.EncodingSettings.EncodingProfile.VideoEncoder);
+			capturer.SetAudioEncoder(captureProps.EncodingSettings.EncodingProfile.AudioEncoder);
+			capturer.SetVideoMuxer(captureProps.EncodingSettings.EncodingProfile.Muxer);
 			capturer.SetSource(captureProps.CaptureSourceType);
-			capturer.VideoBitrate = captureProps.VideoBitrate;
-			capturer.AudioBitrate = captureProps.AudioBitrate;
+			capturer.VideoBitrate = captureProps.EncodingSettings.VideoBitrate;
+			capturer.AudioBitrate = captureProps.EncodingSettings.AudioBitrate;
 		}
 
 		protected virtual void OnRecbuttonClicked(object sender, System.EventArgs e)
diff --git a/CesarPlayer/Makefile.am b/CesarPlayer/Makefile.am
index 8c92ac2..bc97de9 100644
--- a/CesarPlayer/Makefile.am
+++ b/CesarPlayer/Makefile.am
@@ -5,15 +5,18 @@ LINK = $(REF_DEP_CESARPLAYER)
 
 SOURCES = \
 	AssemblyInfo.cs\
-	Capturer/CaptureProperties.cs\
 	Capturer/FakeCapturer.cs\
 	Capturer/GstCameraCapturer.cs\
 	Capturer/ICapturer.cs\
 	Capturer/LiveSourceTimer.cs\
 	Capturer/ObjectManager.cs\
+	Common/CaptureSettings.cs\
 	Common/Constants.cs\
+	Common/EncodingProfiles.cs\
+	Common/EncodingSettings.cs\
 	Common/Enum.cs\
 	Common/Handlers.cs\
+	Common/VideoStandards.cs\
 	Player/GstPlayer.cs \
 	Player/IPlayer.cs \
 	Player/ObjectManager.cs \
diff --git a/LongoMatch/Common/ProjectUtils.cs b/LongoMatch/Common/ProjectUtils.cs
index f230670..ebc4f75 100644
--- a/LongoMatch/Common/ProjectUtils.cs
+++ b/LongoMatch/Common/ProjectUtils.cs
@@ -167,7 +167,7 @@ namespace LongoMatch.Common
 		public static void CreateNewProject(Window window,
 		                                    out Project project,
 		                                    out ProjectType projectType,
-		                                    out CapturePropertiesStruct captureProps) {
+		                                    out CaptureSettings captureSettings) {
 			ProjectSelectionDialog psd;
 			NewProjectDialog npd;
 			List<Device> devices = null;
@@ -176,7 +176,7 @@ namespace LongoMatch.Common
 			/* The out parameters must be set before leaving the method */
 			project = null;
 			projectType = ProjectType.None;
-			captureProps = new CapturePropertiesStruct();
+			captureSettings = new CaptureSettings();
 
 			/* Show the project selection dialog */
 			psd = new ProjectSelectionDialog();
@@ -224,7 +224,7 @@ namespace LongoMatch.Common
 					/* We are now ready to create the new project */
 					project = npd.Project;
 					if(projectType == ProjectType.CaptureProject)
-						captureProps = npd.CaptureProperties;
+						captureSettings = npd.CaptureSettings;
 					npd.Destroy();
 					break;
 				}
diff --git a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
index 3fe0bdb..b524dc2 100644
--- a/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch/Gui/Component/ProjectDetailsWidget.cs
@@ -38,7 +38,6 @@ namespace LongoMatch.Gui.Component
 {
 
 
-	//TODO aÃadir eventos de cambios para realizar el cambio directamente sobre el file data abierto
 	[System.ComponentModel.Category("LongoMatch")]
 	[System.ComponentModel.ToolboxItem(true)]
 	public partial class ProjectDetailsWidget : Gtk.Bin
@@ -57,9 +56,8 @@ namespace LongoMatch.Gui.Component
 		private ITemplateProvider<TeamTemplate, Player> tpt;
 		private ProjectType useType;
 		private List<Device> videoDevices;
-		private const string PAL_FORMAT = "720x576 (4:3)";
-		private const string PAL_3_4_FORMAT = "540x432 (4:3)";
-		private const string PAL_1_2_FORMAT = "360x288 (4:3)";
+		private ListStore videoStandardList;
+		private ListStore encProfileList;
 		private const string DV_SOURCE = "DV Source";
 		private const string GCONF_SOURCE = "GConf Source";
 
@@ -238,12 +236,15 @@ namespace LongoMatch.Gui.Component
 			}
 		}
 
-		public CapturePropertiesStruct CaptureProperties {
+		public CaptureSettings CaptureSettings {
 			get {
-				CapturePropertiesStruct s = new CapturePropertiesStruct();
-				s.OutputFile = fileEntry.Text;
-				s.AudioBitrate = (uint)audiobitratespinbutton.Value;
-				s.VideoBitrate = (uint)videobitratespinbutton.Value;
+				TreeIter iter;
+				EncodingSettings encSettings = new EncodingSettings();
+				CaptureSettings s = new CaptureSettings();
+				
+				encSettings.OutputFile = fileEntry.Text;
+				encSettings.AudioBitrate = (uint)audiobitratespinbutton.Value;
+				encSettings.VideoBitrate = (uint)videobitratespinbutton.Value;
 				if(videoDevices[devicecombobox.Active].DeviceType == DeviceType.DV) {
 					if(Environment.OSVersion.Platform == PlatformID.Win32NT)
 						s.CaptureSourceType = CaptureSourceType.DShow;
@@ -254,49 +255,16 @@ namespace LongoMatch.Gui.Component
 					s.CaptureSourceType = CaptureSourceType.Raw;
 				}
 				s.DeviceID = videoDevices[devicecombobox.Active].ID;
+				
 				/* Get size info */
-				switch(sizecombobox.ActiveText) {
-					/* FIXME: Don't harcode size values */
-				case PAL_FORMAT:
-					s.Width = 720;
-					s.Height = 576;
-					break;
-				case PAL_3_4_FORMAT:
-					s.Width = 540;
-					s.Height = 432;
-					break;
-				case PAL_1_2_FORMAT:
-					s.Width = 360;
-					s.Height = 288;
-					break;
-				default:
-					s.Width = 0;
-					s.Height = 0;
-					break;
-				}
-				/* Get video compresion format info */
-				switch(videoformatcombobox.ActiveText) {
-				case Constants.AVI:
-					s.VideoEncoder = VideoEncoderType.Mpeg4;
-					s.AudioEncoder = AudioEncoderType.Mp3;
-					s.Muxer = VideoMuxerType.Avi;
-					break;
-				case Constants.MP4:
-					s.VideoEncoder = VideoEncoderType.H264;
-					s.AudioEncoder = AudioEncoderType.Aac;
-					s.Muxer = VideoMuxerType.Mp4;
-					break;
-				case Constants.OGG:
-					s.VideoEncoder = VideoEncoderType.Theora;
-					s.AudioEncoder = AudioEncoderType.Vorbis;
-					s.Muxer = VideoMuxerType.Ogg;
-					break;
-				case Constants.WEBM:
-					s.VideoEncoder = VideoEncoderType.VP8;
-					s.AudioEncoder = AudioEncoderType.Vorbis;
-					s.Muxer = VideoMuxerType.WebM;
-					break;
-				}
+				sizecombobox.GetActiveIter(out iter);
+				encSettings.VideoStandard = (VideoStandard) videoStandardList.GetValue(iter, 1);
+			
+				/* Get encoding profile info */
+				videoformatcombobox.GetActiveIter(out iter);
+				encSettings.EncodingProfile = (EncodingProfile) encProfileList.GetValue(iter, 1);
+				
+				s.EncodingSettings = encSettings;
 				return s;
 			}
 		}
@@ -441,17 +409,21 @@ namespace LongoMatch.Gui.Component
 		}
 
 		private void FillFormats() {
-			sizecombobox.AppendText(Catalog.GetString("Keep original size"));
-			sizecombobox.AppendText(PAL_FORMAT);
-			sizecombobox.AppendText(PAL_3_4_FORMAT);
-			sizecombobox.AppendText(PAL_1_2_FORMAT);
+			videoStandardList = new ListStore(typeof(string), typeof (VideoStandard));
+			videoStandardList.AppendValues(VideoStandards.Original.Name, VideoStandards.Original);
+			videoStandardList.AppendValues(VideoStandards.P240.Name, VideoStandards.P240);
+			videoStandardList.AppendValues(VideoStandards.P480.Name, VideoStandards.P480);
+			videoStandardList.AppendValues(VideoStandards.P720.Name, VideoStandards.P720);
+			videoStandardList.AppendValues(VideoStandards.P1080.Name, VideoStandards.P1080);
+			sizecombobox.Model = videoStandardList;
 			sizecombobox.Active = 0;
 
-			videoformatcombobox.AppendText(Constants.AVI);
+			encProfileList = new ListStore(typeof(string), typeof (EncodingProfile));
+			encProfileList.AppendValues(EncodingProfiles.MP4.Name, EncodingProfiles.MP4);
+			encProfileList.AppendValues(EncodingProfiles.Avi.Name, EncodingProfiles.Avi);
 			if(Environment.OSVersion.Platform != PlatformID.Win32NT)
-				videoformatcombobox.AppendText(Constants.WEBM);
-			videoformatcombobox.AppendText(Constants.OGG);
-			videoformatcombobox.AppendText(Constants.MP4);
+				encProfileList.AppendValues(EncodingProfiles.WebM.Name, EncodingProfiles.WebM);
+			videoformatcombobox.Model = encProfileList;
 			videoformatcombobox.Active = 0;
 		}
 
diff --git a/LongoMatch/Gui/Dialog/NewProjectDialog.cs b/LongoMatch/Gui/Dialog/NewProjectDialog.cs
index 82333bb..1c3ad2d 100644
--- a/LongoMatch/Gui/Dialog/NewProjectDialog.cs
+++ b/LongoMatch/Gui/Dialog/NewProjectDialog.cs
@@ -59,9 +59,9 @@ namespace LongoMatch.Gui.Dialog
 			}
 		}
 
-		public CapturePropertiesStruct CaptureProperties {
+		public CaptureSettings CaptureSettings {
 			get {
-				return fdwidget.CaptureProperties;
+				return fdwidget.CaptureSettings;
 			}
 		}
 	}
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 904f1fb..9169925 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -106,7 +106,7 @@ namespace LongoMatch.Gui
 		#endregion
 
 		#region Private Methods
-		private void SetProject(Project project, ProjectType projectType, CapturePropertiesStruct props)
+		private void SetProject(Project project, ProjectType projectType, CaptureSettings props)
 		{
 			bool isLive = false;
 
@@ -211,7 +211,7 @@ namespace LongoMatch.Gui
 			}
 			/* we need to set the opened project to null to avoid calling again CloseOpendProject() */
 			openedProject = null;
-			SetProject(newProject, ProjectType.FileProject, new CapturePropertiesStruct());
+			SetProject(newProject, ProjectType.FileProject, new CaptureSettings());
 			md.Destroy();
 		}
 
@@ -363,14 +363,14 @@ namespace LongoMatch.Gui
 		{
 			Project project;
 			ProjectType projectType;
-			CapturePropertiesStruct captureProps;
+			CaptureSettings captureSettings;
 
 			if(!PromptCloseProject())
 				return;
 
-			ProjectUtils.CreateNewProject(this, out project, out projectType, out captureProps);
+			ProjectUtils.CreateNewProject(this, out project, out projectType, out captureSettings);
 			if(project != null)
-				SetProject(project, projectType, captureProps);
+				SetProject(project, projectType, captureSettings);
 		}
 
 		protected virtual void OnOpenActivated(object sender, System.EventArgs e)
@@ -386,7 +386,7 @@ namespace LongoMatch.Gui
 				project = opd.SelectedProject;
 			opd.Destroy();
 			if(project != null)
-				SetProject(MainClass.DB.GetProject(project.File.FilePath), ProjectType.FileProject, new CapturePropertiesStruct());
+				SetProject(MainClass.DB.GetProject(project.File.FilePath), ProjectType.FileProject, new CaptureSettings());
 		}
 
 		protected virtual void OnSaveProjectActionActivated(object sender, System.EventArgs e)



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