[longomatch] Add support for IP cameras



commit 1abd84fe83cbc4e55914a074c959a070ce60f1c6
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Thu Jan 31 01:49:52 2013 +0100

    Add support for IP cameras

 LongoMatch.Core/Common/Enums.cs                    |    2 +
 LongoMatch.Core/Config.cs                          |    1 +
 LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs      |    2 +
 .../Gui/Component/ProjectDetailsWidget.cs          |   61 +++++---
 .../Gui/Dialog/ProjectSelectionDialog.cs           |    8 +-
 LongoMatch.GUI/Gui/GUIToolkit.cs                   |    8 +-
 LongoMatch.GUI/Gui/MainWindow.cs                   |    6 +-
 ...ongoMatch.Gui.Component.ProjectDetailsWidget.cs |  152 ++++++++++++--------
 .../LongoMatch.Gui.Dialog.NewProjectDialog.cs      |    4 +-
 ...LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs |   68 +++++++---
 LongoMatch.GUI/gtk-gui/gui.stetic                  |   89 +++++++++++-
 LongoMatch.GUI/gtk-gui/objects.xml                 |   26 ++++-
 LongoMatch.Services/Services/EventsManager.cs      |    8 +-
 LongoMatch.Services/Services/ProjectsManager.cs    |    9 +-
 14 files changed, 323 insertions(+), 121 deletions(-)
---
diff --git a/LongoMatch.Core/Common/Enums.cs b/LongoMatch.Core/Common/Enums.cs
index 2ca7ca6..d5d0597 100644
--- a/LongoMatch.Core/Common/Enums.cs
+++ b/LongoMatch.Core/Common/Enums.cs
@@ -24,6 +24,7 @@ namespace LongoMatch.Common
 
 	public enum ProjectType {
 		CaptureProject,
+		URICaptureProject,
 		FakeCaptureProject,
 		FileProject,
 		EditProject,
@@ -109,6 +110,7 @@ namespace LongoMatch.Common
 		None,
 		DV,
 		System,
+		URI,
 	}
 	
 	public enum GameUnitEventType {
diff --git a/LongoMatch.Core/Config.cs b/LongoMatch.Core/Config.cs
index efbe0cc..e245fc0 100644
--- a/LongoMatch.Core/Config.cs
+++ b/LongoMatch.Core/Config.cs
@@ -87,6 +87,7 @@ namespace LongoMatch
 		
 		/* Properties */
 		public static bool useGameUnits = false;
+		public static bool useUriCapture = false;
 
 	}
 }
diff --git a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
index ecbf052..494fc3c 100644
--- a/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
+++ b/LongoMatch.Core/Interfaces/GUI/IGUIToolkit.cs
@@ -54,6 +54,8 @@ namespace LongoMatch.Interfaces.GUI
 		
 		Project NewCaptureProject(IDatabase db, ITemplatesService ts,
 			List<LongoMatch.Common.Device> devices, out CaptureSettings captureSettings);
+		Project NewURICaptureProject(IDatabase db, ITemplatesService ts,
+			out CaptureSettings captureSettings);
 		Project NewFakeProject(IDatabase db, ITemplatesService ts);
 		Project NewFileProject(IDatabase db, ITemplatesService ts);
 		Project EditFakeProject(IDatabase db, Project project, ITemplatesService ts);
diff --git a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
index c514166..7d34441 100644
--- a/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
+++ b/LongoMatch.GUI/Gui/Component/ProjectDetailsWidget.cs
@@ -89,22 +89,31 @@ namespace LongoMatch.Gui.Component
 		
 		public ProjectType Use {
 			set {
-				bool visible1 = value == ProjectType.CaptureProject;
-				bool visible2 = value != ProjectType.FakeCaptureProject;
-				bool visible3 = value != ProjectType.EditProject;
-
-				filelabel.Visible = visible2;
-				filehbox.Visible = visible2;
-
-				tagscombobox.Visible = visible3;
-				localcombobox.Visible = visible3;
-				visitorcombobox.Visible = visible3;
-				localteamlabel.Visible = !visible3;
-				visitorteamlabel.Visible = !visible3;
-
-				expander1.Visible = visible1;
-				device.Visible = visible1;
-				devicecombobox.Visible = visible1;
+				bool deviceVisible, encodingVisible, fileVisible, editionVisible, uriVisible;
+				
+				deviceVisible = value == ProjectType.CaptureProject;
+				encodingVisible = (value == ProjectType.CaptureProject ||
+				                   value == ProjectType.URICaptureProject);
+				fileVisible = value != ProjectType.FakeCaptureProject;
+				editionVisible = value != ProjectType.EditProject;
+				uriVisible = value == ProjectType.URICaptureProject;
+
+				filelabel.Visible = fileVisible;
+				filehbox.Visible = fileVisible;
+
+				tagscombobox.Visible = editionVisible;
+				localcombobox.Visible = editionVisible;
+				visitorcombobox.Visible = editionVisible;
+				localteamlabel.Visible = !editionVisible;
+				visitorteamlabel.Visible = !editionVisible;
+
+				expander1.Visible = encodingVisible;
+				
+				device.Visible = deviceVisible;
+				devicecombobox.Visible = deviceVisible;
+				
+				urilabel.Visible = uriVisible;
+				urientry.Visible = uriVisible;
 
 				useType = value;
 			}
@@ -233,8 +242,13 @@ namespace LongoMatch.Gui.Component
 				encSettings.OutputFile = fileEntry.Text;
 				encSettings.AudioBitrate = (uint)audiobitratespinbutton.Value;
 				encSettings.VideoBitrate = (uint)videobitratespinbutton.Value;
-				s.CaptureSourceType = videoDevices[devicecombobox.Active].DeviceType;
-				s.DeviceID = videoDevices[devicecombobox.Active].ID;
+				if (useType == ProjectType.CaptureProject) {
+					s.CaptureSourceType = videoDevices[devicecombobox.Active].DeviceType;
+					s.DeviceID = videoDevices[devicecombobox.Active].ID;
+				} else if (useType == ProjectType.URICaptureProject) {
+					s.CaptureSourceType = CaptureSourceType.URI;
+					s.DeviceID = urientry.Text;
+				}
 				
 				/* Get size info */
 				sizecombobox.GetActiveIter(out iter);
@@ -286,14 +300,17 @@ namespace LongoMatch.Gui.Component
 
 		public Project GetProject() {
 			if(useType != ProjectType.EditProject) {
-				if(Filename == "" && useType != ProjectType.FakeCaptureProject)
+				if(Filename == "" && useType != ProjectType.FakeCaptureProject) {
 					return null;
-				else {
+				} else if(urientry.Text == "" && useType == ProjectType.URICaptureProject) {
+					return null;
+				} else {
 					if(useType == ProjectType.FakeCaptureProject) {
 						mFile = new MediaFile();
 						mFile.FilePath = Constants.FAKE_PROJECT;
 						mFile.Fps = 25;
-					} else if(useType == ProjectType.CaptureProject) {
+					} else if(useType == ProjectType.CaptureProject ||
+					          useType == ProjectType.URICaptureProject) {
 						mFile = new MediaFile();
 						mFile.FilePath = fileEntry.Text;
 						mFile.Fps = 25;
@@ -433,7 +450,7 @@ namespace LongoMatch.Gui.Component
 		{
 			FileChooserDialog fChooser = null;
 
-			if(useType == ProjectType.CaptureProject) {
+			if(useType == ProjectType.CaptureProject || useType == ProjectType.URICaptureProject) {
 				fChooser = new FileChooserDialog(Catalog.GetString("Output file"),
 				                                 (Gtk.Window)this.Toplevel,
 				                                 FileChooserAction.Save,
diff --git a/LongoMatch.GUI/Gui/Dialog/ProjectSelectionDialog.cs b/LongoMatch.GUI/Gui/Dialog/ProjectSelectionDialog.cs
index e62a596..795296b 100644
--- a/LongoMatch.GUI/Gui/Dialog/ProjectSelectionDialog.cs
+++ b/LongoMatch.GUI/Gui/Dialog/ProjectSelectionDialog.cs
@@ -29,6 +29,7 @@ namespace LongoMatch.Gui.Dialog
 		public ProjectSelectionDialog()
 		{
 			this.Build();
+			ipcamerabox.Visible = Config.useUriCapture;
 		}
 
 		public ProjectType ProjectType {
@@ -37,9 +38,12 @@ namespace LongoMatch.Gui.Dialog
 					return ProjectType.FileProject;
 				else if(liveradiobutton.Active)
 					return ProjectType.CaptureProject;
-				else
+				else if (fakeliveradiobutton.Active)
 					return ProjectType.FakeCaptureProject;
-
+				else if (uriliveradiobutton.Active)
+					return ProjectType.URICaptureProject;
+				else
+					throw new Exception ("Unkown project type");
 			}
 		}
 	}
diff --git a/LongoMatch.GUI/Gui/GUIToolkit.cs b/LongoMatch.GUI/Gui/GUIToolkit.cs
index 2341c02..ce86c6f 100644
--- a/LongoMatch.GUI/Gui/GUIToolkit.cs
+++ b/LongoMatch.GUI/Gui/GUIToolkit.cs
@@ -230,6 +230,12 @@ namespace LongoMatch.Gui
 			return NewProject(db, null, ProjectType.CaptureProject, ts, devices, out captureSettings);
 		}
 		
+		public Project NewURICaptureProject(IDatabase db, ITemplatesService ts,
+		                                    out CaptureSettings captureSettings)
+		{
+			return NewProject(db, null, ProjectType.URICaptureProject, ts, null, out captureSettings);
+		}
+		
 		public Project NewFakeProject(IDatabase db, ITemplatesService ts) {
 			CaptureSettings captureSettings = new CaptureSettings();
 			return NewProject(db, null, ProjectType.FakeCaptureProject, ts, null, out captureSettings);
@@ -277,7 +283,7 @@ namespace LongoMatch.Gui
 					break;
 				}
 			}	
-			if (type == ProjectType.CaptureProject)
+			if (type == ProjectType.CaptureProject || type == ProjectType.URICaptureProject)
 				captureSettings = npd.CaptureSettings;
 			else
 				captureSettings = new CaptureSettings();
diff --git a/LongoMatch.GUI/Gui/MainWindow.cs b/LongoMatch.GUI/Gui/MainWindow.cs
index c78173f..a2919ae 100644
--- a/LongoMatch.GUI/Gui/MainWindow.cs
+++ b/LongoMatch.GUI/Gui/MainWindow.cs
@@ -390,7 +390,8 @@ namespace LongoMatch.Gui
 		}
 		
 		private void CloseCaptureProject() {
-			if(projectType == ProjectType.CaptureProject) {
+			if(projectType == ProjectType.CaptureProject ||
+			   projectType == ProjectType.URICaptureProject) {
 				playercapturer.Close();
 				playercapturer.Mode = PlayerCapturerBin.PlayerOperationMode.Player;
 				EmitSaveProject();
@@ -630,7 +631,8 @@ namespace LongoMatch.Gui
 				return ret;
 
 			if(projectType != ProjectType.CaptureProject &&
-			                projectType != ProjectType.FakeCaptureProject) {
+			   projectType != ProjectType.URICaptureProject &&
+			   projectType != ProjectType.FakeCaptureProject) {
 				switch(key) {
 				case Constants.SEEK_FORWARD:
 					if(modifier == Constants.STEP)
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
index 6b284fb..a6b43af 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Component.ProjectDetailsWidget.cs
@@ -37,6 +37,8 @@ namespace LongoMatch.Gui.Component
 		private global::Gtk.Label label9;
 		private global::Gtk.Entry seasonentry;
 		private global::Gtk.Label seasonlabel;
+		private global::Gtk.Entry urientry;
+		private global::Gtk.Label urilabel;
 		private global::Gtk.Expander expander1;
 		private global::Gtk.Table table2;
 		private global::Gtk.Label audiobitratelabel;
@@ -62,7 +64,7 @@ namespace LongoMatch.Gui.Component
 			this.vbox2.Name = "vbox2";
 			this.vbox2.Spacing = 6;
 			// Container child vbox2.Gtk.Box+BoxChild
-			this.table1 = new global::Gtk.Table (((uint)(8)), ((uint)(2)), false);
+			this.table1 = new global::Gtk.Table (((uint)(9)), ((uint)(2)), false);
 			this.table1.Name = "table1";
 			this.table1.RowSpacing = ((uint)(6));
 			this.table1.ColumnSpacing = ((uint)(6));
@@ -399,9 +401,33 @@ namespace LongoMatch.Gui.Component
 			w39.BottomAttach = ((uint)(4));
 			w39.XOptions = ((global::Gtk.AttachOptions)(4));
 			w39.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table1.Gtk.Table+TableChild
+			this.urientry = new global::Gtk.Entry ();
+			this.urientry.CanFocus = true;
+			this.urientry.Name = "urientry";
+			this.urientry.IsEditable = true;
+			this.urientry.InvisibleChar = 'â';
+			this.table1.Add (this.urientry);
+			global::Gtk.Table.TableChild w40 = ((global::Gtk.Table.TableChild)(this.table1 [this.urientry]));
+			w40.TopAttach = ((uint)(8));
+			w40.BottomAttach = ((uint)(9));
+			w40.LeftAttach = ((uint)(1));
+			w40.RightAttach = ((uint)(2));
+			w40.XOptions = ((global::Gtk.AttachOptions)(4));
+			w40.YOptions = ((global::Gtk.AttachOptions)(4));
+			// Container child table1.Gtk.Table+TableChild
+			this.urilabel = new global::Gtk.Label ();
+			this.urilabel.Name = "urilabel";
+			this.urilabel.LabelProp = global::Mono.Unix.Catalog.GetString ("URL:");
+			this.table1.Add (this.urilabel);
+			global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table1 [this.urilabel]));
+			w41.TopAttach = ((uint)(8));
+			w41.BottomAttach = ((uint)(9));
+			w41.XOptions = ((global::Gtk.AttachOptions)(4));
+			w41.YOptions = ((global::Gtk.AttachOptions)(4));
 			this.vbox2.Add (this.table1);
-			global::Gtk.Box.BoxChild w40 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
-			w40.Position = 0;
+			global::Gtk.Box.BoxChild w42 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.table1]));
+			w42.Position = 0;
 			// Container child vbox2.Gtk.Box+BoxChild
 			this.expander1 = new global::Gtk.Expander (null);
 			this.expander1.CanFocus = true;
@@ -416,11 +442,11 @@ namespace LongoMatch.Gui.Component
 			this.audiobitratelabel.Name = "audiobitratelabel";
 			this.audiobitratelabel.LabelProp = global::Mono.Unix.Catalog.GetString ("Audio Bitrate (kbps):");
 			this.table2.Add (this.audiobitratelabel);
-			global::Gtk.Table.TableChild w41 = ((global::Gtk.Table.TableChild)(this.table2 [this.audiobitratelabel]));
-			w41.TopAttach = ((uint)(4));
-			w41.BottomAttach = ((uint)(5));
-			w41.XOptions = ((global::Gtk.AttachOptions)(4));
-			w41.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table2 [this.audiobitratelabel]));
+			w43.TopAttach = ((uint)(4));
+			w43.BottomAttach = ((uint)(5));
+			w43.XOptions = ((global::Gtk.AttachOptions)(4));
+			w43.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.audiobitratespinbutton = new global::Gtk.SpinButton (0, 360, 1);
 			this.audiobitratespinbutton.CanFocus = true;
@@ -430,61 +456,61 @@ namespace LongoMatch.Gui.Component
 			this.audiobitratespinbutton.Numeric = true;
 			this.audiobitratespinbutton.Value = 64;
 			this.table2.Add (this.audiobitratespinbutton);
-			global::Gtk.Table.TableChild w42 = ((global::Gtk.Table.TableChild)(this.table2 [this.audiobitratespinbutton]));
-			w42.TopAttach = ((uint)(4));
-			w42.BottomAttach = ((uint)(5));
-			w42.LeftAttach = ((uint)(1));
-			w42.RightAttach = ((uint)(2));
-			w42.XOptions = ((global::Gtk.AttachOptions)(1));
-			w42.YOptions = ((global::Gtk.AttachOptions)(1));
+			global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table2 [this.audiobitratespinbutton]));
+			w44.TopAttach = ((uint)(4));
+			w44.BottomAttach = ((uint)(5));
+			w44.LeftAttach = ((uint)(1));
+			w44.RightAttach = ((uint)(2));
+			w44.XOptions = ((global::Gtk.AttachOptions)(1));
+			w44.YOptions = ((global::Gtk.AttachOptions)(1));
 			// Container child table2.Gtk.Table+TableChild
 			this.device = new global::Gtk.Label ();
 			this.device.Name = "device";
 			this.device.LabelProp = global::Mono.Unix.Catalog.GetString ("Device:");
 			this.table2.Add (this.device);
-			global::Gtk.Table.TableChild w43 = ((global::Gtk.Table.TableChild)(this.table2 [this.device]));
-			w43.XOptions = ((global::Gtk.AttachOptions)(4));
-			w43.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table2 [this.device]));
+			w45.XOptions = ((global::Gtk.AttachOptions)(4));
+			w45.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.devicecombobox = global::Gtk.ComboBox.NewText ();
 			this.devicecombobox.Name = "devicecombobox";
 			this.table2.Add (this.devicecombobox);
-			global::Gtk.Table.TableChild w44 = ((global::Gtk.Table.TableChild)(this.table2 [this.devicecombobox]));
-			w44.LeftAttach = ((uint)(1));
-			w44.RightAttach = ((uint)(2));
-			w44.XOptions = ((global::Gtk.AttachOptions)(4));
-			w44.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w46 = ((global::Gtk.Table.TableChild)(this.table2 [this.devicecombobox]));
+			w46.LeftAttach = ((uint)(1));
+			w46.RightAttach = ((uint)(2));
+			w46.XOptions = ((global::Gtk.AttachOptions)(4));
+			w46.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.sizecombobox = global::Gtk.ComboBox.NewText ();
 			this.sizecombobox.Name = "sizecombobox";
 			this.table2.Add (this.sizecombobox);
-			global::Gtk.Table.TableChild w45 = ((global::Gtk.Table.TableChild)(this.table2 [this.sizecombobox]));
-			w45.TopAttach = ((uint)(2));
-			w45.BottomAttach = ((uint)(3));
-			w45.LeftAttach = ((uint)(1));
-			w45.RightAttach = ((uint)(2));
-			w45.XOptions = ((global::Gtk.AttachOptions)(4));
-			w45.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table2 [this.sizecombobox]));
+			w47.TopAttach = ((uint)(2));
+			w47.BottomAttach = ((uint)(3));
+			w47.LeftAttach = ((uint)(1));
+			w47.RightAttach = ((uint)(2));
+			w47.XOptions = ((global::Gtk.AttachOptions)(4));
+			w47.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.sizelabel = new global::Gtk.Label ();
 			this.sizelabel.Name = "sizelabel";
 			this.sizelabel.LabelProp = global::Mono.Unix.Catalog.GetString ("Video Size:");
 			this.table2.Add (this.sizelabel);
-			global::Gtk.Table.TableChild w46 = ((global::Gtk.Table.TableChild)(this.table2 [this.sizelabel]));
-			w46.TopAttach = ((uint)(2));
-			w46.BottomAttach = ((uint)(3));
-			w46.XOptions = ((global::Gtk.AttachOptions)(4));
-			w46.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table2 [this.sizelabel]));
+			w48.TopAttach = ((uint)(2));
+			w48.BottomAttach = ((uint)(3));
+			w48.XOptions = ((global::Gtk.AttachOptions)(4));
+			w48.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.videobitratelabel1 = new global::Gtk.Label ();
 			this.videobitratelabel1.Name = "videobitratelabel1";
 			this.videobitratelabel1.LabelProp = global::Mono.Unix.Catalog.GetString ("Video Bitrate (kbps):");
 			this.table2.Add (this.videobitratelabel1);
-			global::Gtk.Table.TableChild w47 = ((global::Gtk.Table.TableChild)(this.table2 [this.videobitratelabel1]));
-			w47.TopAttach = ((uint)(3));
-			w47.BottomAttach = ((uint)(4));
-			w47.XOptions = ((global::Gtk.AttachOptions)(4));
-			w47.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w49 = ((global::Gtk.Table.TableChild)(this.table2 [this.videobitratelabel1]));
+			w49.TopAttach = ((uint)(3));
+			w49.BottomAttach = ((uint)(4));
+			w49.XOptions = ((global::Gtk.AttachOptions)(4));
+			w49.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.videobitratespinbutton = new global::Gtk.SpinButton (1000, 8000, 1);
 			this.videobitratespinbutton.CanFocus = true;
@@ -494,34 +520,34 @@ namespace LongoMatch.Gui.Component
 			this.videobitratespinbutton.Numeric = true;
 			this.videobitratespinbutton.Value = 4000;
 			this.table2.Add (this.videobitratespinbutton);
-			global::Gtk.Table.TableChild w48 = ((global::Gtk.Table.TableChild)(this.table2 [this.videobitratespinbutton]));
-			w48.TopAttach = ((uint)(3));
-			w48.BottomAttach = ((uint)(4));
-			w48.LeftAttach = ((uint)(1));
-			w48.RightAttach = ((uint)(2));
-			w48.XOptions = ((global::Gtk.AttachOptions)(1));
-			w48.YOptions = ((global::Gtk.AttachOptions)(1));
+			global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table2 [this.videobitratespinbutton]));
+			w50.TopAttach = ((uint)(3));
+			w50.BottomAttach = ((uint)(4));
+			w50.LeftAttach = ((uint)(1));
+			w50.RightAttach = ((uint)(2));
+			w50.XOptions = ((global::Gtk.AttachOptions)(1));
+			w50.YOptions = ((global::Gtk.AttachOptions)(1));
 			// Container child table2.Gtk.Table+TableChild
 			this.videoformatcombobox = global::Gtk.ComboBox.NewText ();
 			this.videoformatcombobox.Name = "videoformatcombobox";
 			this.table2.Add (this.videoformatcombobox);
-			global::Gtk.Table.TableChild w49 = ((global::Gtk.Table.TableChild)(this.table2 [this.videoformatcombobox]));
-			w49.TopAttach = ((uint)(1));
-			w49.BottomAttach = ((uint)(2));
-			w49.LeftAttach = ((uint)(1));
-			w49.RightAttach = ((uint)(2));
-			w49.XOptions = ((global::Gtk.AttachOptions)(4));
-			w49.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w51 = ((global::Gtk.Table.TableChild)(this.table2 [this.videoformatcombobox]));
+			w51.TopAttach = ((uint)(1));
+			w51.BottomAttach = ((uint)(2));
+			w51.LeftAttach = ((uint)(1));
+			w51.RightAttach = ((uint)(2));
+			w51.XOptions = ((global::Gtk.AttachOptions)(4));
+			w51.YOptions = ((global::Gtk.AttachOptions)(4));
 			// Container child table2.Gtk.Table+TableChild
 			this.videoformatlabel = new global::Gtk.Label ();
 			this.videoformatlabel.Name = "videoformatlabel";
 			this.videoformatlabel.LabelProp = global::Mono.Unix.Catalog.GetString ("Video Format:");
 			this.table2.Add (this.videoformatlabel);
-			global::Gtk.Table.TableChild w50 = ((global::Gtk.Table.TableChild)(this.table2 [this.videoformatlabel]));
-			w50.TopAttach = ((uint)(1));
-			w50.BottomAttach = ((uint)(2));
-			w50.XOptions = ((global::Gtk.AttachOptions)(4));
-			w50.YOptions = ((global::Gtk.AttachOptions)(4));
+			global::Gtk.Table.TableChild w52 = ((global::Gtk.Table.TableChild)(this.table2 [this.videoformatlabel]));
+			w52.TopAttach = ((uint)(1));
+			w52.BottomAttach = ((uint)(2));
+			w52.XOptions = ((global::Gtk.AttachOptions)(4));
+			w52.YOptions = ((global::Gtk.AttachOptions)(4));
 			this.expander1.Add (this.table2);
 			this.GtkLabel5 = new global::Gtk.Label ();
 			this.GtkLabel5.Name = "GtkLabel5";
@@ -529,10 +555,10 @@ namespace LongoMatch.Gui.Component
 			this.GtkLabel5.UseUnderline = true;
 			this.expander1.LabelWidget = this.GtkLabel5;
 			this.vbox2.Add (this.expander1);
-			global::Gtk.Box.BoxChild w52 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.expander1]));
-			w52.Position = 1;
-			w52.Expand = false;
-			w52.Fill = false;
+			global::Gtk.Box.BoxChild w54 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.expander1]));
+			w54.Position = 1;
+			w54.Expand = false;
+			w54.Fill = false;
 			this.Add (this.vbox2);
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
index bf99f5a..2cd5a0a 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.NewProjectDialog.cs
@@ -69,8 +69,8 @@ namespace LongoMatch.Gui.Dialog
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
 			}
-			this.DefaultWidth = 384;
-			this.DefaultHeight = 337;
+			this.DefaultWidth = 405;
+			this.DefaultHeight = 579;
 			this.Show ();
 		}
 	}
diff --git a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
index c9bdd49..46a1e31 100644
--- a/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
+++ b/LongoMatch.GUI/gtk-gui/LongoMatch.Gui.Dialog.ProjectSelectionDialog.cs
@@ -14,6 +14,9 @@ namespace LongoMatch.Gui.Dialog
 		private global::Gtk.HBox hbox3;
 		private global::Gtk.RadioButton fakeliveradiobutton;
 		private global::Gtk.Image image62;
+		private global::Gtk.HBox ipcamerabox;
+		private global::Gtk.RadioButton uriliveradiobutton;
+		private global::Gtk.Image image64;
 		private global::Gtk.Button buttonCancel;
 		private global::Gtk.Button buttonOk;
 		
@@ -45,7 +48,6 @@ namespace LongoMatch.Gui.Dialog
 			this.fromfileradiobutton = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("New project using a video file"));
 			this.fromfileradiobutton.CanFocus = true;
 			this.fromfileradiobutton.Name = "fromfileradiobutton";
-			this.fromfileradiobutton.Active = true;
 			this.fromfileradiobutton.DrawIndicator = true;
 			this.fromfileradiobutton.UseUnderline = true;
 			this.fromfileradiobutton.FocusOnClick = false;
@@ -123,17 +125,45 @@ namespace LongoMatch.Gui.Dialog
 			w10.Position = 2;
 			w10.Expand = false;
 			w10.Fill = false;
-			w1.Add (this.vbox2);
-			global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+			// Container child vbox2.Gtk.Box+BoxChild
+			this.ipcamerabox = new global::Gtk.HBox ();
+			this.ipcamerabox.Name = "ipcamerabox";
+			this.ipcamerabox.Spacing = 6;
+			// Container child ipcamerabox.Gtk.Box+BoxChild
+			this.uriliveradiobutton = new global::Gtk.RadioButton (global::Mono.Unix.Catalog.GetString ("Live project using an IP camera"));
+			this.uriliveradiobutton.CanFocus = true;
+			this.uriliveradiobutton.Name = "uriliveradiobutton";
+			this.uriliveradiobutton.DrawIndicator = true;
+			this.uriliveradiobutton.UseUnderline = true;
+			this.uriliveradiobutton.Group = this.fromfileradiobutton.Group;
+			this.ipcamerabox.Add (this.uriliveradiobutton);
+			global::Gtk.Box.BoxChild w11 = ((global::Gtk.Box.BoxChild)(this.ipcamerabox [this.uriliveradiobutton]));
 			w11.Position = 0;
-			w11.Expand = false;
-			w11.Fill = false;
+			// Container child ipcamerabox.Gtk.Box+BoxChild
+			this.image64 = new global::Gtk.Image ();
+			this.image64.Name = "image64";
+			this.image64.Pixbuf = global::Gdk.Pixbuf.LoadFromResource ("camera-video.png");
+			this.ipcamerabox.Add (this.image64);
+			global::Gtk.Box.BoxChild w12 = ((global::Gtk.Box.BoxChild)(this.ipcamerabox [this.image64]));
+			w12.Position = 1;
+			w12.Expand = false;
+			w12.Fill = false;
+			this.vbox2.Add (this.ipcamerabox);
+			global::Gtk.Box.BoxChild w13 = ((global::Gtk.Box.BoxChild)(this.vbox2 [this.ipcamerabox]));
+			w13.Position = 3;
+			w13.Expand = false;
+			w13.Fill = false;
+			w1.Add (this.vbox2);
+			global::Gtk.Box.BoxChild w14 = ((global::Gtk.Box.BoxChild)(w1 [this.vbox2]));
+			w14.Position = 0;
+			w14.Expand = false;
+			w14.Fill = false;
 			// Internal child LongoMatch.Gui.Dialog.ProjectSelectionDialog.ActionArea
-			global::Gtk.HButtonBox w12 = this.ActionArea;
-			w12.Name = "dialog1_ActionArea";
-			w12.Spacing = 6;
-			w12.BorderWidth = ((uint)(5));
-			w12.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
+			global::Gtk.HButtonBox w15 = this.ActionArea;
+			w15.Name = "dialog1_ActionArea";
+			w15.Spacing = 6;
+			w15.BorderWidth = ((uint)(5));
+			w15.LayoutStyle = ((global::Gtk.ButtonBoxStyle)(4));
 			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
 			this.buttonCancel = new global::Gtk.Button ();
 			this.buttonCancel.CanDefault = true;
@@ -143,9 +173,9 @@ namespace LongoMatch.Gui.Dialog
 			this.buttonCancel.UseUnderline = true;
 			this.buttonCancel.Label = "gtk-cancel";
 			this.AddActionWidget (this.buttonCancel, -6);
-			global::Gtk.ButtonBox.ButtonBoxChild w13 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonCancel]));
-			w13.Expand = false;
-			w13.Fill = false;
+			global::Gtk.ButtonBox.ButtonBoxChild w16 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w15 [this.buttonCancel]));
+			w16.Expand = false;
+			w16.Fill = false;
 			// Container child dialog1_ActionArea.Gtk.ButtonBox+ButtonBoxChild
 			this.buttonOk = new global::Gtk.Button ();
 			this.buttonOk.CanDefault = true;
@@ -155,15 +185,15 @@ namespace LongoMatch.Gui.Dialog
 			this.buttonOk.UseUnderline = true;
 			this.buttonOk.Label = "gtk-ok";
 			this.AddActionWidget (this.buttonOk, -5);
-			global::Gtk.ButtonBox.ButtonBoxChild w14 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w12 [this.buttonOk]));
-			w14.Position = 1;
-			w14.Expand = false;
-			w14.Fill = false;
+			global::Gtk.ButtonBox.ButtonBoxChild w17 = ((global::Gtk.ButtonBox.ButtonBoxChild)(w15 [this.buttonOk]));
+			w17.Position = 1;
+			w17.Expand = false;
+			w17.Fill = false;
 			if ((this.Child != null)) {
 				this.Child.ShowAll ();
 			}
-			this.DefaultWidth = 332;
-			this.DefaultHeight = 183;
+			this.DefaultWidth = 348;
+			this.DefaultHeight = 220;
 			this.Show ();
 		}
 	}
diff --git a/LongoMatch.GUI/gtk-gui/gui.stetic b/LongoMatch.GUI/gtk-gui/gui.stetic
index 89e101f..93b7af6 100644
--- a/LongoMatch.GUI/gtk-gui/gui.stetic
+++ b/LongoMatch.GUI/gtk-gui/gui.stetic
@@ -16,7 +16,7 @@
       </source>
     </icon-set>
   </icon-factory>
-  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectDetailsWidget" design-size="399 301">
+  <widget class="Gtk.Bin" id="LongoMatch.Gui.Component.ProjectDetailsWidget" design-size="399 334">
     <property name="MemberName" />
     <child>
       <widget class="Gtk.VBox" id="vbox2">
@@ -25,7 +25,7 @@
         <child>
           <widget class="Gtk.Table" id="table1">
             <property name="MemberName" />
-            <property name="NRows">8</property>
+            <property name="NRows">9</property>
             <property name="NColumns">2</property>
             <property name="RowSpacing">6</property>
             <property name="ColumnSpacing">6</property>
@@ -567,6 +567,48 @@
                 <property name="YShrink">False</property>
               </packing>
             </child>
+            <child>
+              <widget class="Gtk.Entry" id="urientry">
+                <property name="MemberName" />
+                <property name="CanFocus">True</property>
+                <property name="IsEditable">True</property>
+                <property name="InvisibleChar">â</property>
+              </widget>
+              <packing>
+                <property name="TopAttach">8</property>
+                <property name="BottomAttach">9</property>
+                <property name="LeftAttach">1</property>
+                <property name="RightAttach">2</property>
+                <property name="AutoSize">True</property>
+                <property name="XOptions">Fill</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">False</property>
+                <property name="XFill">True</property>
+                <property name="XShrink">False</property>
+                <property name="YExpand">False</property>
+                <property name="YFill">True</property>
+                <property name="YShrink">False</property>
+              </packing>
+            </child>
+            <child>
+              <widget class="Gtk.Label" id="urilabel">
+                <property name="MemberName" />
+                <property name="LabelProp" translatable="yes">URL:</property>
+              </widget>
+              <packing>
+                <property name="TopAttach">8</property>
+                <property name="BottomAttach">9</property>
+                <property name="AutoSize">True</property>
+                <property name="XOptions">Fill</property>
+                <property name="YOptions">Fill</property>
+                <property name="XExpand">False</property>
+                <property name="XFill">True</property>
+                <property name="XShrink">False</property>
+                <property name="YExpand">False</property>
+                <property name="YFill">True</property>
+                <property name="YShrink">False</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="Position">0</property>
@@ -1313,7 +1355,7 @@
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.NewProjectDialog" design-size="384 337">
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.NewProjectDialog" design-size="405 579">
     <property name="MemberName" />
     <property name="Title" translatable="yes">New Project</property>
     <property name="Icon">stock:longomatch Dialog</property>
@@ -5287,7 +5329,7 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
       </widget>
     </child>
   </widget>
-  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectSelectionDialog" design-size="332 183">
+  <widget class="Gtk.Dialog" id="LongoMatch.Gui.Dialog.ProjectSelectionDialog" design-size="348 220">
     <property name="MemberName" />
     <property name="Title" translatable="yes">New Project</property>
     <property name="Icon">stock:longomatch Menu</property>
@@ -5425,6 +5467,45 @@ Show-&gt;&lt;b&gt; S&lt;/b&gt;
                 <property name="Fill">False</property>
               </packing>
             </child>
+            <child>
+              <widget class="Gtk.HBox" id="ipcamerabox">
+                <property name="MemberName" />
+                <property name="Spacing">6</property>
+                <child>
+                  <widget class="Gtk.RadioButton" id="uriliveradiobutton">
+                    <property name="MemberName" />
+                    <property name="CanFocus">True</property>
+                    <property name="Label" translatable="yes">Live project using an IP camera</property>
+                    <property name="DrawIndicator">True</property>
+                    <property name="HasLabel">True</property>
+                    <property name="UseUnderline">True</property>
+                    <property name="Group">project</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">0</property>
+                    <property name="AutoSize">True</property>
+                  </packing>
+                </child>
+                <child>
+                  <widget class="Gtk.Image" id="image64">
+                    <property name="MemberName" />
+                    <property name="Pixbuf">resource:camera-video.png</property>
+                  </widget>
+                  <packing>
+                    <property name="Position">1</property>
+                    <property name="AutoSize">True</property>
+                    <property name="Expand">False</property>
+                    <property name="Fill">False</property>
+                  </packing>
+                </child>
+              </widget>
+              <packing>
+                <property name="Position">3</property>
+                <property name="AutoSize">True</property>
+                <property name="Expand">False</property>
+                <property name="Fill">False</property>
+              </packing>
+            </child>
           </widget>
           <packing>
             <property name="Position">0</property>
diff --git a/LongoMatch.GUI/gtk-gui/objects.xml b/LongoMatch.GUI/gtk-gui/objects.xml
index 1afb28d..aff1431 100644
--- a/LongoMatch.GUI/gtk-gui/objects.xml
+++ b/LongoMatch.GUI/gtk-gui/objects.xml
@@ -219,7 +219,8 @@
     <signals />
   </object>
   <object type="LongoMatch.Gui.Component.TeamTemplateEditorWidget" palette-category="General" allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
-    <itemgroups />
+    <itemgroups>
+    </itemgroups>
     <signals />
   </object>
   <object type="LongoMatch.Gui.Component.StringTaggerWidget" palette-category="General" allow-children="false" base-type="Gtk.Bin">
@@ -300,6 +301,29 @@
       </itemgroup>
     </signals>
   </object>
+  <object type="LongoMatch.Gui.Component.CategoriesTemplateEditorWidget" palette-category="General" allow-children="false" base-type="LongoMatch.Gui.Base.TemplatesEditorBase">
+    <itemgroups>
+    </itemgroups>
+    <signals />
+  </object>
+  <object type="LongoMatch.Gui.Component.PlayersTreeView" palette-category="LongoMatch" allow-children="false" base-type="Gtk.TreeView">
+    <itemgroups>
+      <itemgroup label="ListTreeViewBase Properties">
+        <property name="Colors" />
+      </itemgroup>
+    </itemgroups>
+    <signals>
+      <itemgroup label="ListTreeViewBase Signals">
+        <signal name="TimeNodeChanged" />
+        <signal name="TimeNodeSelected" />
+        <signal name="TimeNodeDeleted" />
+        <signal name="PlayListNodeAdded" />
+        <signal name="SnapshotSeriesEvent" />
+        <signal name="TagPlay" />
+        <signal name="NewRenderingJob" />
+      </itemgroup>
+    </signals>
+  </object>
   <object type="LongoMatch.Gui.Component.ProjectDetailsWidget" palette-category="LongoMatch" allow-children="false" base-type="Gtk.Bin">
     <itemgroups>
       <itemgroup label="ProjectDetailsWidget Properties">
diff --git a/LongoMatch.Services/Services/EventsManager.cs b/LongoMatch.Services/Services/EventsManager.cs
index df942f9..596e87b 100644
--- a/LongoMatch.Services/Services/EventsManager.cs
+++ b/LongoMatch.Services/Services/EventsManager.cs
@@ -111,7 +111,8 @@ namespace LongoMatch.Services
 			fStart = (start < new Time {MSeconds =0}) ? new Time {MSeconds = 0} : start;
 
 			if(projectType == ProjectType.FakeCaptureProject ||
-			   projectType == ProjectType.CaptureProject) {
+			   projectType == ProjectType.CaptureProject ||
+			   projectType == ProjectType.URICaptureProject) {
 				fStop = stop;
 			} else {
 				length = new Time {MSeconds = (int)player.StreamLength};
@@ -126,7 +127,7 @@ namespace LongoMatch.Services
 			Log.Debug(String.Format("New play created start:{0} stop:{1} category:{2}",
 									start, stop, category));
 			/* Get the current frame and get a thumbnail from it */
-			if(projectType == ProjectType.CaptureProject) {
+			if(projectType == ProjectType.CaptureProject || projectType == ProjectType.URICaptureProject) {
 				if(!capturer.Capturing) {
 					guiToolkit.InfoMessage(Catalog.GetString("You can't create a new play if the capturer "+
 						"is not recording."));
@@ -164,7 +165,8 @@ namespace LongoMatch.Services
 			Time pos;
 
 			if(projectType == ProjectType.FakeCaptureProject ||
-			   projectType == ProjectType.CaptureProject) {
+			   projectType == ProjectType.CaptureProject ||
+			   projectType == ProjectType.URICaptureProject) {
 				pos =  new Time { MSeconds = (int)capturer.CurrentTime};
 			} else {
 				pos = new Time {MSeconds = (int)player.CurrentTime};
diff --git a/LongoMatch.Services/Services/ProjectsManager.cs b/LongoMatch.Services/Services/ProjectsManager.cs
index 022114b..509212c 100644
--- a/LongoMatch.Services/Services/ProjectsManager.cs
+++ b/LongoMatch.Services/Services/ProjectsManager.cs
@@ -199,7 +199,8 @@ namespace LongoMatch.Services
 				}
 
 			} else {
-				if(projectType == ProjectType.CaptureProject) {
+				if(projectType == ProjectType.CaptureProject ||
+				   projectType == ProjectType.URICaptureProject) {
 					Capturer.CaptureProperties = props;
 					try {
 						Capturer.Type = CapturerType.Live;
@@ -308,7 +309,8 @@ namespace LongoMatch.Services
 				} catch (Exception e) {
 					Log.Exception(e);
 				}
-			} else if (projectType == ProjectType.CaptureProject) {
+			} else if (projectType == ProjectType.CaptureProject ||
+			           projectType == ProjectType.URICaptureProject) {
 				SaveCaptureProject(project);
 			}
 		}
@@ -337,6 +339,9 @@ namespace LongoMatch.Services
 				project = guiToolkit.NewFileProject(Core.DB, Core.TemplatesService);
 				if (project != null)
 					Core.DB.AddProject(project);
+			} else if (projectType == ProjectType.URICaptureProject) {
+				project = guiToolkit.NewURICaptureProject(Core.DB, Core.TemplatesService,
+				                                          out captureSettings);
 			} else {
 				project = null;
 			}



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