cheese r761 - in branches/cheese-vala: . src
- From: jhaitsma svn gnome org
- To: svn-commits-list gnome org
- Subject: cheese r761 - in branches/cheese-vala: . src
- Date: Thu, 12 Jun 2008 19:34:13 +0000 (UTC)
Author: jhaitsma
Date: Thu Jun 12 19:34:13 2008
New Revision: 761
URL: http://svn.gnome.org/viewvc/cheese?rev=761&view=rev
Log:
on_photo_data callback works now. Now we still need to fix disconnecting
Modified:
branches/cheese-vala/ (props changed)
branches/cheese-vala/src/cheese-webcam.vala
Modified: branches/cheese-vala/src/cheese-webcam.vala
==============================================================================
--- branches/cheese-vala/src/cheese-webcam.vala (original)
+++ branches/cheese-vala/src/cheese-webcam.vala Thu Jun 12 19:34:13 2008
@@ -116,7 +116,7 @@
Element video_source;
Element capsfilter;
Element video_file_sink;
- Element photo_sink;
+ dynamic Element photo_sink;
Element audio_source;
Element audio_enc;
Element video_enc;
@@ -214,7 +214,7 @@
public void take_photo (string filename) {
photo_filename = filename;
/* Take the photo by connecting the handoff signal */
- photo_handler_id = Signal.connect (photo_sink, "handoff", (GLib.Callback)on_photo_data, this);
+ photo_sink.handoff += on_photo_data;
flash.fire ();
}
@@ -254,6 +254,7 @@
}
void on_photo_data (Element element, Buffer buffer, Pad pad) {
+ print ("on_photo_data\n");
var caps = buffer.get_caps ();
weak Structure structure;
structure = caps.get_structure (0);
@@ -270,7 +271,7 @@
/* Emit photo_saved signal */
photo_saved ();
- SignalHandler.disconnect (photo_sink, photo_handler_id);
+ SignalHandler.disconnect_by_func (photo_sink, (void *)on_photo_data, this);
}
void on_bus_message (Gst.Bus bus, Message message) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]