[chronojump/video-capture] Added miniframe to snapshot



commit 21da8c4654922f5d1c4c5c940ff8be01713342c5
Author: Xavier de Blas <xaviblas gmail com>
Date:   Tue Feb 1 18:28:06 2011 +0100

    Added miniframe to snapshot

 CesarPlayer/Capturer/ICapturer.cs |    5 +++++
 CesarPlayer/Gui/CapturerBin.cs    |   15 ++++++++++++++-
 src/gui/chronojump.cs             |    4 ++++
 3 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/CesarPlayer/Capturer/ICapturer.cs b/CesarPlayer/Capturer/ICapturer.cs
index 4960bdb..8a3cf6c 100644
--- a/CesarPlayer/Capturer/ICapturer.cs
+++ b/CesarPlayer/Capturer/ICapturer.cs
@@ -65,6 +65,11 @@ namespace LongoMatch.Video.Capturer
 			get;
 		}
 		
+//		Pixbuf CurrentMiniatureFrame {
+//			get;
+//		}
+		
+		
 		string DeviceID {
 			set;
 			get;
diff --git a/CesarPlayer/Gui/CapturerBin.cs b/CesarPlayer/Gui/CapturerBin.cs
index 1b4f014..e3fcc55 100644
--- a/CesarPlayer/Gui/CapturerBin.cs
+++ b/CesarPlayer/Gui/CapturerBin.cs
@@ -39,13 +39,14 @@ namespace LongoMatch.Gui
 		public event EventHandler CaptureFinished;
 		public event ErrorHandler Error;
 		public event NewSnapshotHandler NewSnapshot;
+		public event NewSnapshotHandler NewSnapshotMini;
 		
 		private Pixbuf logopix;
 		private CapturePropertiesStruct captureProps;
 		private CapturerType capturerType;
 		private bool captureStarted;
 		private bool capturing;
-		private const int THUMBNAIL_MAX_WIDTH = 100;		
+		private const int THUMBNAIL_MAX_WIDTH = 200;		
 		
 		ICapturer capturer;
 		
@@ -135,6 +136,13 @@ namespace LongoMatch.Gui
 			
 			capturer.Start();
 		}
+/*
+		public void SnapshotDone(){
+			if (capturer == null)
+				return;
+
+		}
+*/
 		
 		public void TogglePause(){
 			if (capturer == null)
@@ -381,6 +389,11 @@ namespace LongoMatch.Gui
 			if (frame != null && NewSnapshot != null) {
 				NewSnapshot(frame);
 			}
+			//Pixbuf frameMini = capturer.CurrentMiniatureFrame;
+			Pixbuf frameMini = CurrentMiniatureFrame;
+			if (frameMini != null && NewSnapshotMini != null) {
+				NewSnapshotMini(frameMini);
+			}
 		}
 		
 		
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index b224de3..f5592b8 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2181,6 +2181,7 @@ public class ChronoJumpWindow
 		capturer.Type = CapturerType.Snapshot;
 		capturer.Visible=true;
 		capturer.NewSnapshot += on_snapshot_done;
+		capturer.NewSnapshotMini += on_snapshot_mini_done;
 		
 		Gtk.Window d = new Gtk.Window("Capturer");
 		d.Add(capturer);
@@ -2192,6 +2193,9 @@ public class ChronoJumpWindow
 	private void on_snapshot_done(Pixbuf pixbuf) {
 		pixbuf.Save("/tmp/test-foto.jpg","jpeg");
 	}
+	private void on_snapshot_mini_done(Pixbuf pixbuf) {
+		pixbuf.Save("/tmp/test-foto-mini.jpg","jpeg");
+	}
 
 
 	/* ---------------------------------------------------------



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