[chronojump] Start implementing photo capture
- From: Andoni Morales Alastruey <amorales src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Start implementing photo capture
- Date: Tue, 1 Feb 2011 01:12:05 +0000 (UTC)
commit b9efa99a71d938bb81e953a58a66a5faef9892d4
Author: Xavier de Blas <xaviblas gmail com>
Date: Mon Jan 31 23:55:01 2011 +0100
Start implementing photo capture
glade/chronojump.glade | 14 ++++++++++++++
src/gui/chronojump.cs | 15 +++++++++++++++
2 files changed, 29 insertions(+), 0 deletions(-)
---
diff --git a/glade/chronojump.glade b/glade/chronojump.glade
index fbc5ed9..654f273 100644
--- a/glade/chronojump.glade
+++ b/glade/chronojump.glade
@@ -17643,6 +17643,20 @@ by you</property>
</widget>
</child>
<child>
+ <widget class="GtkImageMenuItem" id="menuitem_camera_photo">
+ <property name="label" translatable="yes">camera photo</property>
+ <property name="visible">True</property>
+ <property name="use_stock">False</property>
+ <signal name="activate" handler="on_menuitem_camera_photo"/>
+ <child internal-child="image">
+ <widget class="GtkImage" id="image46">
+ <property name="visible">True</property>
+ <property name="stock">gtk-missing-image</property>
+ </widget>
+ </child>
+ </widget>
+ </child>
+ <child>
<widget class="GtkImageMenuItem" id="menuitem_report_window">
<property name="label" translatable="yes">Report</property>
<property name="visible">True</property>
diff --git a/src/gui/chronojump.cs b/src/gui/chronojump.cs
index ad4ef4d..3a3ce56 100644
--- a/src/gui/chronojump.cs
+++ b/src/gui/chronojump.cs
@@ -2169,6 +2169,21 @@ public class ChronoJumpWindow
d.ShowAll();
capturer.Run();
}
+
+ private void on_menuitem_camera_photo(object o, EventArgs args) {
+ string file = "/tmp/test_photo_chronojump_is_cooler.jpg";
+ GstCameraCapturer gst = new GstCameraCapturer(file);
+ gst.OutputWidth = 360;
+ gst.OutputHeight = 288;
+
+ gst.Run();
+
+ Pixbuf pixbuf;
+ pixbuf = gst.CurrentFrame;
+
+ pixbuf.Save(file, "jpeg");
+ }
+
/* ---------------------------------------------------------
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]