[longomatch] Add property to set the capturer type



commit 5d3b7d71453fc4360e91780800ad517776df74ff
Author: Andoni Morales Alastruey <ylatuya gmail com>
Date:   Wed Feb 17 22:34:08 2010 +0100

    Add property to set the capturer type

 CesarPlayer/Gui/CapturerBin.cs |   18 ++++++++++++++----
 1 files changed, 14 insertions(+), 4 deletions(-)
---
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index 4f1e57a..b2be538 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -36,10 +36,20 @@ namespace LongoMatch.Gui
 		public CapturerBin()
 		{
 			this.Build();
-			MultimediaFactory factory = new MultimediaFactory();
-			capturer = factory.getCapturer();			
-			this.capturerhbox.Add((Widget)capturer);
-			((Widget)capturer).Show();
+			Type = CapturerType.FAKE;		
+		}
+		
+		public CapturerType Type {
+			set{
+				if (capturer != null){
+					capturer.Stop();
+					capturerhbox.Remove(capturer as Gtk.Widget);
+				}
+				MultimediaFactory factory = new MultimediaFactory();
+				capturer = factory.getCapturer(value);			
+				capturerhbox.Add((Widget)capturer);
+				((Widget)capturer).Show();
+			}
 		}
 		 
 		public string OutputFile {



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