[longomatch] Refactor CesarPlayer grouping all the handlers in Common/Handlers.cs



commit 7aa35f11f809ecfac61b1de6714fa80a03b9acfd
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Sun Apr 11 16:23:29 2010 +0200

    Refactor CesarPlayer grouping all the handlers in Common/Handlers.cs

 CesarPlayer/Capturer/FakeCapturer.cs               |    1 -
 CesarPlayer/Capturer/GstCameraCapturer.cs          |    7 +-
 CesarPlayer/Capturer/ICapturer.cs                  |    1 -
 CesarPlayer/CesarPlayer.mdp                        |   10 +--
 CesarPlayer/Common/Handlers.cs                     |   96 ++++++++++++++++++++
 CesarPlayer/Editor/GstVideoSplitter.cs             |   14 ++--
 CesarPlayer/Editor/IVideoEditor.cs                 |    2 +-
 CesarPlayer/Editor/IVideoSplitter.cs               |    4 +-
 CesarPlayer/Gui/PlayerBin.cs                       |    8 +-
 CesarPlayer/Gui/VolumeWindow.cs                    |    2 +-
 CesarPlayer/Makefile.am                            |   10 +--
 CesarPlayer/Player/GstPlayer.cs                    |   23 +++---
 CesarPlayer/Player/IPlayer.cs                      |    4 +-
 CesarPlayer/Utils/FramesCapturer.cs                |    2 +-
 LongoMatch/Gui/Component/PlayListWidget.cs         |    5 +-
 .../Gui/Dialog/FramesCaptureProgressDialog.cs      |    2 +-
 LongoMatch/Gui/MainWindow.cs                       |    3 +-
 LongoMatch/Handlers/EventsManager.cs               |    4 +-
 LongoMatch/Handlers/VideoDrawingsManager.cs        |    2 +-
 LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs    |    6 +-
 Makefile.win32                                     |    8 --
 21 files changed, 142 insertions(+), 72 deletions(-)
---
diff --git a/CesarPlayer/Capturer/FakeCapturer.cs b/CesarPlayer/Capturer/FakeCapturer.cs
index c7e0ff9..0fb66d1 100644
--- a/CesarPlayer/Capturer/FakeCapturer.cs
+++ b/CesarPlayer/Capturer/FakeCapturer.cs
@@ -20,7 +20,6 @@ using System;
 using Mono.Unix;
 using GLib;
 using LongoMatch.Video.Common;
-using LongoMatch.Video.Handlers;
 
 namespace LongoMatch.Video.Capturer
 {
diff --git a/CesarPlayer/Capturer/GstCameraCapturer.cs b/CesarPlayer/Capturer/GstCameraCapturer.cs
index 85dcd31..51c8847 100644
--- a/CesarPlayer/Capturer/GstCameraCapturer.cs
+++ b/CesarPlayer/Capturer/GstCameraCapturer.cs
@@ -21,7 +21,6 @@ namespace LongoMatch.Video.Capturer {
 	using System;
 	using System.Collections;
 	using System.Runtime.InteropServices;
-	using LongoMatch.Video.Handlers;
 	using LongoMatch.Video.Common;
 
 #region Autogenerated code
@@ -126,7 +125,7 @@ namespace LongoMatch.Video.Capturer {
 
 		static void ErrorSignalCallback (IntPtr arg0, IntPtr arg1, IntPtr gch)
 		{
-			LongoMatch.Video.Capturer.ErrorArgs args = new LongoMatch.Video.Capturer.ErrorArgs ();
+			ErrorArgs args = new ErrorArgs ();
 			try {
 				GLib.Signal sig = ((GCHandle) gch).Target as GLib.Signal;
 				if (sig == null)
@@ -134,7 +133,7 @@ namespace LongoMatch.Video.Capturer {
 
 				args.Args = new object[1];
 				args.Args[0] = GLib.Marshaller.Utf8PtrToString (arg1);
-				LongoMatch.Video.Capturer.ErrorHandler handler = (LongoMatch.Video.Capturer.ErrorHandler) sig.Handler;
+				ErrorHandler handler = (ErrorHandler) sig.Handler;
 				handler (GLib.Object.GetObject (arg0), args);
 			} catch (Exception e) {
 				GLib.ExceptionManager.RaiseUnhandledException (e, false);
@@ -179,7 +178,7 @@ namespace LongoMatch.Video.Capturer {
 		}
 
 		[GLib.Signal("error")]
-		public event LongoMatch.Video.Capturer.ErrorHandler Error {
+		public event ErrorHandler Error {
 			add {
 				GLib.Signal sig = GLib.Signal.Lookup (this, "error", new ErrorSignalDelegate(ErrorSignalCallback));
 				sig.AddDelegate (value);
diff --git a/CesarPlayer/Capturer/ICapturer.cs b/CesarPlayer/Capturer/ICapturer.cs
index 40e5765..cbfad62 100644
--- a/CesarPlayer/Capturer/ICapturer.cs
+++ b/CesarPlayer/Capturer/ICapturer.cs
@@ -19,7 +19,6 @@
 //
 
 using System;
-using LongoMatch.Video.Handlers;
 using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video.Capturer
diff --git a/CesarPlayer/CesarPlayer.mdp b/CesarPlayer/CesarPlayer.mdp
index 075cf0a..e34b822 100644
--- a/CesarPlayer/CesarPlayer.mdp
+++ b/CesarPlayer/CesarPlayer.mdp
@@ -18,14 +18,9 @@
     <File name="gtk-gui/objects.xml" subtype="Code" buildaction="EmbedAsResource" />
     <File name="gtk-gui/gui.stetic" subtype="Code" buildaction="EmbedAsResource" />
     <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
-    <File name="Handlers" subtype="Directory" buildaction="Compile" />
-    <File name="Handlers/ErrorHandler.cs" subtype="Code" buildaction="Compile" />
-    <File name="Handlers/Handlers.cs" subtype="Code" buildaction="Compile" />
-    <File name="Handlers/TickHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="Player" subtype="Directory" buildaction="Compile" />
     <File name="Player/GstPlayer.cs" subtype="Code" buildaction="Compile" />
     <File name="Player/IPlayer.cs" subtype="Code" buildaction="Compile" />
-    <File name="Handlers/StateChangedHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="cesarplayer.key" subtype="Code" buildaction="Nothing" />
     <File name="Utils" subtype="Directory" buildaction="Compile" />
     <File name="Utils/TimeString.cs" subtype="Code" buildaction="Compile" />
@@ -34,7 +29,6 @@
     <File name="gtk-gui/LongoMatch.Gui.VolumeWindow.cs" subtype="Code" buildaction="Compile" />
     <File name="Gui/VolumeWindow.cs" subtype="Code" buildaction="Compile" />
     <File name="Capturer" subtype="Directory" buildaction="Compile" />
-    <File name="Capturer/ErrorHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="Capturer/ICapturer.cs" subtype="Code" buildaction="Compile" />
     <File name="Gui/CapturerBin.cs" subtype="Code" buildaction="Compile" />
     <File name="MultimediaFactory.cs" subtype="Code" buildaction="Compile" />
@@ -45,21 +39,19 @@
     <File name="Utils/IMetadataReader.cs" subtype="Code" buildaction="Compile" />
     <File name="Gui/PlayerBin.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor" subtype="Directory" buildaction="Compile" />
-    <File name="Editor/ErrorHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/IVideoEditor.cs" subtype="Code" buildaction="Compile" />
-    <File name="Editor/PercentCompletedHandler.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/GstVideoSplitter.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/VideoSegment.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/EditorState.cs" subtype="Code" buildaction="Compile" />
     <File name="Editor/IVideoSplitter.cs" subtype="Code" buildaction="Compile" />
     <File name="Utils/MediaFile.cs" subtype="Code" buildaction="Compile" />
-    <File name="Player/GstError.cs" subtype="Code" buildaction="Compile" />
     <File name="Utils/PreviewMediaFile.cs" subtype="Code" buildaction="Compile" />
     <File name="Capturer/FakeCapturer.cs" subtype="Code" buildaction="Compile" />
     <File name="Capturer/GstCameraCapturer.cs" subtype="Code" buildaction="Compile" />
     <File name="gtk-gui/LongoMatch.Gui.CapturerBin.cs" subtype="Code" buildaction="Compile" />
     <File name="Common" subtype="Directory" buildaction="Compile" />
     <File name="Common/Enum.cs" subtype="Code" buildaction="Compile" />
+    <File name="Common/Handlers.cs" subtype="Code" buildaction="Compile" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
diff --git a/CesarPlayer/Common/Handlers.cs b/CesarPlayer/Common/Handlers.cs
new file mode 100644
index 0000000..15718d1
--- /dev/null
+++ b/CesarPlayer/Common/Handlers.cs
@@ -0,0 +1,96 @@
+// 
+//  Copyright (C) 2010 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 Gdk;
+
+namespace LongoMatch.Video.Common
+{
+	
+	public delegate void PlayListSegmentDoneHandler ();
+	public delegate void SegmentClosedHandler();
+	public delegate void SegmentDoneHandler();
+	public delegate void SeekEventHandler(long pos);
+	public delegate void VolumeChangedHandler (double level);
+	public delegate void NextButtonClickedHandler ();
+	public delegate void PrevButtonClickedHandler ();
+	public delegate void ProgressHandler (float progress);
+	public delegate void FramesProgressHandler (int actual, int total,Pixbuf frame);
+	public delegate void DrawFrameHandler (int time);
+	public delegate void EllpasedTimeHandler (int ellapsedTime);	
+	
+	
+	public delegate void ErrorHandler(object o, ErrorArgs args);
+	public delegate void PercentCompletedHandler(object o, PercentCompletedArgs args);
+	public delegate void StateChangeHandler(object o, StateChangeArgs args);
+	public delegate void TickHandler(object o, TickArgs args);
+	
+	
+	
+	public class ErrorArgs : GLib.SignalArgs {
+		public string Message{
+			get {
+				return (string) Args[0];
+			}
+		}
+
+	}	
+
+	public class PercentCompletedArgs : GLib.SignalArgs {
+		public float Percent{
+			get {
+				return (float) Args[0];
+			}
+		}
+
+	}
+
+	public class StateChangeArgs : GLib.SignalArgs {
+		public bool Playing{
+			get {
+				return (bool) Args[0];
+			}
+		}
+	}	
+
+	public class TickArgs : GLib.SignalArgs {
+		public long CurrentTime{
+			get {
+				return (long) Args[0];
+			}
+		}
+
+		public long StreamLength{
+			get {
+				return (long) Args[1];
+			}
+		}
+
+		public float CurrentPosition{
+			get {
+				return (float) Args[2];
+			}
+		}
+
+		public bool Seekable{
+			get {
+				return (bool) Args[3];
+			}
+		}
+	}	
+}
diff --git a/CesarPlayer/Editor/GstVideoSplitter.cs b/CesarPlayer/Editor/GstVideoSplitter.cs
index bad081d..3d5a8fb 100644
--- a/CesarPlayer/Editor/GstVideoSplitter.cs
+++ b/CesarPlayer/Editor/GstVideoSplitter.cs
@@ -31,7 +31,7 @@ namespace LongoMatch.Video.Editor {
 		[DllImport("libcesarplayer.dll")]
 		static extern unsafe IntPtr gst_video_editor_new(out IntPtr err);
 
-		public event LongoMatch.Video.Handlers.ProgressHandler Progress;
+		public event ProgressHandler Progress;
 		
 		public unsafe GstVideoSplitter () : base (IntPtr.Zero)
 		{
@@ -198,13 +198,13 @@ namespace LongoMatch.Video.Editor {
 		}
 
 		[GLib.Signal("error")]
-		public event LongoMatch.Video.Editor.ErrorHandler Error {
+		public event ErrorHandler Error {
 			add {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (LongoMatch.Video.Editor.ErrorArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (ErrorArgs));
 				sig.AddDelegate (value);
 			}
 			remove {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (LongoMatch.Video.Editor.ErrorArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (ErrorArgs));
 				sig.RemoveDelegate (value);
 			}
 		}
@@ -248,13 +248,13 @@ namespace LongoMatch.Video.Editor {
 		}
 
 		[GLib.Signal("percent_completed")]
-		public event LongoMatch.Video.Editor.PercentCompletedHandler PercentCompleted {
+		public event PercentCompletedHandler PercentCompleted {
 			add {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "percent_completed", typeof (LongoMatch.Video.Editor.PercentCompletedArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "percent_completed", typeof (PercentCompletedArgs));
 				sig.AddDelegate (value);
 			}
 			remove {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "percent_completed", typeof (LongoMatch.Video.Editor.PercentCompletedArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "percent_completed", typeof (PercentCompletedArgs));
 				sig.RemoveDelegate (value);
 			}
 		}
diff --git a/CesarPlayer/Editor/IVideoEditor.cs b/CesarPlayer/Editor/IVideoEditor.cs
index 0c065b3..68cc46c 100644
--- a/CesarPlayer/Editor/IVideoEditor.cs
+++ b/CesarPlayer/Editor/IVideoEditor.cs
@@ -28,7 +28,7 @@ namespace LongoMatch.Video.Editor
 	
 	public interface IVideoEditor
 	{
-		event LongoMatch.Video.Handlers.ProgressHandler Progress;		
+		event ProgressHandler Progress;		
 		
 		VideoQuality VideoQuality{
 			set;
diff --git a/CesarPlayer/Editor/IVideoSplitter.cs b/CesarPlayer/Editor/IVideoSplitter.cs
index c715815..9f5a76c 100644
--- a/CesarPlayer/Editor/IVideoSplitter.cs
+++ b/CesarPlayer/Editor/IVideoSplitter.cs
@@ -25,8 +25,8 @@ namespace LongoMatch.Video.Editor
 	
 	public interface IVideoSplitter
 	{
-		event LongoMatch.Video.Editor.PercentCompletedHandler PercentCompleted;	
-		event LongoMatch.Video.Editor.ErrorHandler Error;
+		event PercentCompletedHandler PercentCompleted;	
+		event ErrorHandler Error;
 		
 		bool EnableAudio{
 			set;
diff --git a/CesarPlayer/Gui/PlayerBin.cs b/CesarPlayer/Gui/PlayerBin.cs
index 4678214..9eba8d7 100644
--- a/CesarPlayer/Gui/PlayerBin.cs
+++ b/CesarPlayer/Gui/PlayerBin.cs
@@ -22,10 +22,10 @@ using Gtk;
 using Gdk;
 using Mono.Unix;
 using System.Runtime.InteropServices;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video;
+using LongoMatch.Video.Common;
 using LongoMatch.Video.Player;
 using LongoMatch.Video.Utils;
-using LongoMatch.Video;
 
 namespace LongoMatch.Gui
 {
@@ -353,7 +353,7 @@ namespace LongoMatch.Gui
 			
 			tickHandler = new TickHandler(OnTick);
 			player.Tick += tickHandler;
-			player.StateChange += new LongoMatch.Video.Handlers.StateChangeHandler(OnStateChanged);
+			player.StateChange += new StateChangeHandler(OnStateChanged);
 			player.Eos += new EventHandler (OnEndOfStream);
 			player.Error += new ErrorHandler (OnError);
 			player.ReadyToSeek += new EventHandler(OnReadyToSeek);
@@ -382,7 +382,7 @@ namespace LongoMatch.Gui
 #endregion
 		
 #region Callbacks
-		protected virtual void OnStateChanged(object o, LongoMatch.Video.Handlers.StateChangeArgs args){
+		protected virtual void OnStateChanged(object o, StateChangeArgs args){
 			if (args.Playing){
 				playbutton.Hide();
 				pausebutton.Show();
diff --git a/CesarPlayer/Gui/VolumeWindow.cs b/CesarPlayer/Gui/VolumeWindow.cs
index 4496d20..6b4945e 100644
--- a/CesarPlayer/Gui/VolumeWindow.cs
+++ b/CesarPlayer/Gui/VolumeWindow.cs
@@ -18,7 +18,7 @@
 //
 //
 using System;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Gui
 {
diff --git a/CesarPlayer/Makefile.am b/CesarPlayer/Makefile.am
index 220ea29..e7235e4 100644
--- a/CesarPlayer/Makefile.am
+++ b/CesarPlayer/Makefile.am
@@ -47,10 +47,7 @@ FILES = \
 	AssemblyInfo.cs \
 	gtk-gui/generated.cs \
 	Common/Enum.cs\
-	Handlers/ErrorHandler.cs \
-	Handlers/Handlers.cs \
-	Handlers/TickHandler.cs \
-	Handlers/StateChangedHandler.cs \
+	Common/Handlers.cs\
 	Player/GstPlayer.cs \
 	Player/IPlayer.cs \
 	Player/ObjectManager.cs \
@@ -66,15 +63,12 @@ FILES = \
 	Utils/IMetadataReader.cs \
 	Utils/TimeString.cs \
 	Capturer/GstCameraCapturer.cs \
-	Capturer/ErrorHandler.cs \
 	Capturer/FakeCapturer.cs \
 	Capturer/ICapturer.cs \
 	Capturer/ObjectManager.cs \
-	Editor/ErrorHandler.cs \
+	Editor/GstVideoSplitter.cs \
 	Editor/IVideoEditor.cs \
 	Editor/IVideoSplitter.cs \
-	Editor/PercentCompletedHandler.cs \
-	Editor/GstVideoSplitter.cs \
 	Editor/VideoSegment.cs \
 	Editor/EditorState.cs \
 	Utils/MediaFile.cs \
diff --git a/CesarPlayer/Player/GstPlayer.cs b/CesarPlayer/Player/GstPlayer.cs
index 362ca8e..ea28005 100644
--- a/CesarPlayer/Player/GstPlayer.cs
+++ b/CesarPlayer/Player/GstPlayer.cs
@@ -22,7 +22,6 @@ namespace LongoMatch.Video.Player {
 	using System.Collections;
 	using System.Runtime.InteropServices;
 	using LongoMatch.Video.Common;
-	using LongoMatch.Video.Handlers;
 	using LongoMatch.Video.Utils;
 
 #region Autogenerated code
@@ -259,13 +258,13 @@ namespace LongoMatch.Video.Player {
 		}
 
 		[GLib.Signal("state_change")]
-		public event LongoMatch.Video.Handlers.StateChangeHandler StateChange {
+		public event StateChangeHandler StateChange {
 			add {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "state_change", typeof (LongoMatch.Video.Handlers.StateChangeArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "state_change", typeof (StateChangeArgs));
 				sig.AddDelegate (value);
 			}
 			remove {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "state_change", typeof (LongoMatch.Video.Handlers.StateChangeArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "state_change", typeof (StateChangeArgs));
 				sig.RemoveDelegate (value);
 			}
 		}
@@ -308,7 +307,7 @@ namespace LongoMatch.Video.Player {
 		}
 
 		[GLib.Signal("got-redirect")]
-		public event LongoMatch.Video.Handlers.GotRedirectHandler GotRedirect {
+		public event GotRedirectHandler GotRedirect {
 			add {
 				GLib.Signal sig = GLib.Signal.Lookup (this, "got-redirect", typeof (LongoMatch.GotRedirectArgs));
 				sig.AddDelegate (value);
@@ -451,13 +450,13 @@ namespace LongoMatch.Video.Player {
 		}
 
 		[GLib.Signal("error")]
-		public event LongoMatch.Video.Handlers.ErrorHandler Error {
+		public event ErrorHandler Error {
 			add {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (LongoMatch.Video.Handlers.ErrorArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (ErrorArgs));
 				sig.AddDelegate (value);
 			}
 			remove {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (LongoMatch.Video.Handlers.ErrorArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "error", typeof (ErrorArgs));
 				sig.RemoveDelegate (value);
 			}
 		}
@@ -649,13 +648,13 @@ namespace LongoMatch.Video.Player {
 		}
 
 		[GLib.Signal("tick")]
-		public event LongoMatch.Video.Handlers.TickHandler Tick {
+		public event TickHandler Tick {
 			add {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "tick", typeof (LongoMatch.Video.Handlers.TickArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "tick", typeof (TickArgs));
 				sig.AddDelegate (value);
 			}
 			remove {
-				GLib.Signal sig = GLib.Signal.Lookup (this, "tick", typeof (LongoMatch.Video.Handlers.TickArgs));
+				GLib.Signal sig = GLib.Signal.Lookup (this, "tick", typeof (TickArgs));
 				sig.RemoveDelegate (value);
 			}
 		}
@@ -698,7 +697,7 @@ namespace LongoMatch.Video.Player {
 		}
 
 		[GLib.Signal("title-change")]
-		public event LongoMatch.Video.Handlers.TitleChangeHandler TitleChange {
+		public event TitleChangeHandler TitleChange {
 			add {
 				GLib.Signal sig = GLib.Signal.Lookup (this, "title-change", typeof (LongoMatch.TitleChangeArgs));
 				sig.AddDelegate (value);
diff --git a/CesarPlayer/Player/IPlayer.cs b/CesarPlayer/Player/IPlayer.cs
index 1abf1b2..0f18b51 100644
--- a/CesarPlayer/Player/IPlayer.cs
+++ b/CesarPlayer/Player/IPlayer.cs
@@ -21,7 +21,7 @@
 using System;
 using Gtk;
 using Gdk;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 
 
 namespace LongoMatch.Video.Player
@@ -36,7 +36,7 @@ namespace LongoMatch.Video.Player
 	
 		event         ErrorHandler Error;
 		event         System.EventHandler Eos;
-		event         LongoMatch.Video.Handlers.StateChangeHandler StateChange;
+		event         StateChangeHandler StateChange;
 		event         TickHandler Tick;
 		event         System.EventHandler GotDuration;
 		event         System.EventHandler SegmentDone;
diff --git a/CesarPlayer/Utils/FramesCapturer.cs b/CesarPlayer/Utils/FramesCapturer.cs
index c050189..189bed3 100644
--- a/CesarPlayer/Utils/FramesCapturer.cs
+++ b/CesarPlayer/Utils/FramesCapturer.cs
@@ -24,7 +24,7 @@ using LongoMatch.Video;
 using Gdk;
 using Gtk;
 using System.Threading;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Video.Utils
 {
diff --git a/LongoMatch/Gui/Component/PlayListWidget.cs b/LongoMatch/Gui/Component/PlayListWidget.cs
index bcd33c9..708d112 100644
--- a/LongoMatch/Gui/Component/PlayListWidget.cs
+++ b/LongoMatch/Gui/Component/PlayListWidget.cs
@@ -25,7 +25,6 @@ using LongoMatch.Video.Editor;
 using Mono.Unix;
 using System.IO;
 using LongoMatch.Handlers;
-using LongoMatch.Video.Handlers;
 using LongoMatch.TimeNodes;
 using LongoMatch.Video.Player;
 using LongoMatch.Video;
@@ -45,7 +44,7 @@ namespace LongoMatch.Gui.Component
 	{
 		public event PlayListNodeSelectedHandler PlayListNodeSelected;
 		public event ApplyCurrentRateHandler ApplyCurrentRate;
-		public event LongoMatch.Video.Handlers.ProgressHandler Progress;
+		public event ProgressHandler Progress;
 
 		private PlayerBin player;
 		private PlayListTimeNode plNode;
@@ -194,7 +193,7 @@ namespace LongoMatch.Gui.Component
 
 		private void LoadEditor() {
 			videoEditor = factory.getVideoEditor();
-			videoEditor.Progress += new LongoMatch.Video.Handlers.ProgressHandler(OnProgress);
+			videoEditor.Progress += new ProgressHandler(OnProgress);
 		}
 
 		protected virtual void OnPlaylisttreeview1RowActivated(object o, Gtk.RowActivatedArgs args)
diff --git a/LongoMatch/Gui/Dialog/FramesCaptureProgressDialog.cs b/LongoMatch/Gui/Dialog/FramesCaptureProgressDialog.cs
index a5991b3..ed46201 100644
--- a/LongoMatch/Gui/Dialog/FramesCaptureProgressDialog.cs
+++ b/LongoMatch/Gui/Dialog/FramesCaptureProgressDialog.cs
@@ -23,7 +23,7 @@ using Gtk;
 using Gdk;
 using Mono.Unix;
 using LongoMatch.Video.Utils;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 
 namespace LongoMatch.Gui.Dialog
 {
diff --git a/LongoMatch/Gui/MainWindow.cs b/LongoMatch/Gui/MainWindow.cs
index 266e534..3586894 100644
--- a/LongoMatch/Gui/MainWindow.cs
+++ b/LongoMatch/Gui/MainWindow.cs
@@ -32,6 +32,7 @@ using LongoMatch.Gui.Dialog;
 using LongoMatch.Gui.Popup;
 using LongoMatch.Video;
 using LongoMatch.Video.Capturer;
+using LongoMatch.Video.Common;
 using LongoMatch.Video.Player;
 using LongoMatch.Video.Utils;
 using LongoMatch.Updates;
@@ -461,7 +462,7 @@ namespace LongoMatch.Gui
 				hpaned.Position = args.Requisition.Width;
 		}		
 
-		protected virtual void OnPlayerbin1Error(object o,LongoMatch.Video.Handlers.ErrorArgs args)
+		protected virtual void OnPlayerbin1Error(object o, ErrorArgs args)
 		{
 			MessagePopup.PopupMessage(this, MessageType.Info,
 			                          Catalog.GetString("The actual project will be closed due to an error in the media player:")+"\n" +args.Message);
diff --git a/LongoMatch/Handlers/EventsManager.cs b/LongoMatch/Handlers/EventsManager.cs
index 5dcfde9..8a129df 100644
--- a/LongoMatch/Handlers/EventsManager.cs
+++ b/LongoMatch/Handlers/EventsManager.cs
@@ -25,7 +25,7 @@ using LongoMatch.Gui.Dialog;
 using LongoMatch.TimeNodes;
 using LongoMatch.DB;
 using LongoMatch.Video.Player;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 using LongoMatch.Video.Utils;
 using LongoMatch.Video.Editor;
 using LongoMatch.Video;
@@ -379,7 +379,7 @@ namespace LongoMatch
 				player.SeekTo(0,false);
 		}
 
-		protected virtual void OnTick(object o, LongoMatch.Video.Handlers.TickArgs args)
+		protected virtual void OnTick(object o, TickArgs args)
 		{
 			if (args.CurrentTime != 0 && timeline != null && openedProject != null)
 				timeline.CurrentFrame=(uint)(args.CurrentTime * openedProject.File.Fps / 1000);
diff --git a/LongoMatch/Handlers/VideoDrawingsManager.cs b/LongoMatch/Handlers/VideoDrawingsManager.cs
index 53b82f4..229de8c 100644
--- a/LongoMatch/Handlers/VideoDrawingsManager.cs
+++ b/LongoMatch/Handlers/VideoDrawingsManager.cs
@@ -21,7 +21,7 @@ using System.Collections.Generic;
 using Gdk;
 using LongoMatch.TimeNodes;
 using LongoMatch.Gui;
-using LongoMatch.Video.Handlers;
+using LongoMatch.Video.Common;
 
 
 
diff --git a/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs b/LongoMatch/gtk-gui/LongoMatch.Gui.MainWindow.cs
index ac24646..78d2be8 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.CaptureModeAction.Group;
+            this.FreeCaptureModeAction.Group = this.AnalyzeModeAction.Group;
             this.FreeCaptureModeAction.Sensitive = false;
             this.FreeCaptureModeAction.ShortLabel = Mono.Unix.Catalog.GetString("Free Capture Mode");
             w1.Add(this.FreeCaptureModeAction, null);
@@ -436,8 +436,8 @@ namespace LongoMatch.Gui {
             this.ImportProjectAction.Activated += new System.EventHandler(this.OnImportProjectActionActivated);
             this.FreeCaptureModeAction.Toggled += new System.EventHandler(this.OnViewToggled);
             this.treewidget1.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
-            this.playerbin1.Error += new LongoMatch.Video.Handlers.ErrorHandler(this.OnPlayerbin1Error);
-            this.playerbin1.SegmentClosedEvent += new LongoMatch.Video.Handlers.SegmentClosedHandler(this.OnSegmentClosedEvent);
+            this.playerbin1.Error += new LongoMatch.Video.Common.ErrorHandler(this.OnPlayerbin1Error);
+            this.playerbin1.SegmentClosedEvent += new LongoMatch.Video.Common.SegmentClosedHandler(this.OnSegmentClosedEvent);
             this.timelinewidget1.TimeNodeSelected += new LongoMatch.Handlers.TimeNodeSelectedHandler(this.OnTimeNodeSelected);
         }
     }
diff --git a/Makefile.win32 b/Makefile.win32
index 5945336..cf1f4d4 100644
--- a/Makefile.win32
+++ b/Makefile.win32
@@ -57,11 +57,6 @@ CESARPLAYER_COMPILE_TARGET = library
 CESARPLAYER_FILES = \
 	AssemblyInfo.cs \
 	gtk-gui/generated.cs \
-	Handlers/ErrorHandler.cs \
-	Handlers/Handlers.cs \
-	Handlers/TickHandler.cs \
-	Handlers/StateChangedHandler.cs \
-	Player/GstError.cs \
 	Player/GstPlayer.cs \
 	Player/IPlayer.cs \
 	Player/ObjectManager.cs \
@@ -78,13 +73,10 @@ CESARPLAYER_FILES = \
 	Utils/TimeString.cs \
 	Capturer/FakeCapturer.cs \
 	Capturer/GstCameraCapturer.cs \
-	Capturer/ErrorHandler.cs \
 	Capturer/ICapturer.cs \
 	Capturer/ObjectManager.cs \
-	Editor/ErrorHandler.cs \
 	Editor/IVideoEditor.cs \
 	Editor/IVideoSplitter.cs \
-	Editor/PercentCompletedHandler.cs \
 	Editor/GstVideoSplitter.cs \
 	Editor/VideoSegment.cs \
 	Editor/EditorState.cs \



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