cheese r746 - in branches/cheese-vala: . src



Author: jhaitsma
Date: Mon Jun  2 19:57:35 2008
New Revision: 746
URL: http://svn.gnome.org/viewvc/cheese?rev=746&view=rev

Log:
more stuff

Modified:
   branches/cheese-vala/   (props changed)
   branches/cheese-vala/src/cheese-audio.vala
   branches/cheese-vala/src/cheese-webcam.vala

Modified: branches/cheese-vala/src/cheese-audio.vala
==============================================================================
--- branches/cheese-vala/src/cheese-audio.vala	(original)
+++ branches/cheese-vala/src/cheese-audio.vala	Mon Jun  2 19:57:35 2008
@@ -46,6 +46,7 @@
 	public static bool play_file (string filename) {
 		var audio = new Audio (filename);
 		audio.start ();
+		audio.ref ();
 		return true;
 	}
 	
@@ -58,7 +59,17 @@
 	}
 	
 	bool on_bus_message (Bus bus, Gst.Message message) {
-		
+		switch (message.type) {
+		case (MessageType.EOS):
+			stop ();
+			done ();
+			this.unref ();
+			break;
+		case (MessageType.ERROR):
+			done ();
+			break;
+			
+		}
 		return true;
 	}
 /*

Modified: branches/cheese-vala/src/cheese-webcam.vala
==============================================================================
--- branches/cheese-vala/src/cheese-webcam.vala	(original)
+++ branches/cheese-vala/src/cheese-webcam.vala	Mon Jun  2 19:57:35 2008
@@ -140,13 +140,6 @@
 	bool pipeline_is_playing = false;
 	string photo_filename;
 	
-	/* Dummy variable used to increase ref count */
-	Element sink_ref;
-		
-/*    
-  XF86VidModeGamma normal_gamma;
-  float flash_intensity;
-*/
 	public Webcam (Widget window) {
 		this.video_window = window;
 	}
@@ -226,8 +219,8 @@
 	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);		
-		flash ();
+		photo_handler_id = Signal.connect (photo_sink, "handoff", (GLib.Callback)on_photo_data, this);	
+		// flash.fire ();
 	}
 
 	public ArrayList<Device> get_devices () {
@@ -631,19 +624,7 @@
 		if (!ok)
 			throw new WebcamError.FAILED ("create_video_save_bin (): Error linking gstreamer elements together");		
 	}
-	
-	
-	void flash_set_intensity (float intensity) {
-		
-	}
-	void on_flash_dim () {
 		
-	}
-	
-	void flash () {
-		
-	}
-	
 	void set_effect_filter (Element filter) {
 		
 	}
@@ -654,8 +635,7 @@
 		stop ();
 		src.unlink (old_sink);
 		/* Increase ref with one so old_sink won't get freed */
-		// FIXME: Can be removed as soon as bug has been fixed in vala
-		sink_ref = old_sink;
+		old_sink.ref ();
 		pipeline.remove (old_sink);
 
 		pipeline.add (new_sink);



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