[cheese/gnome-2-30] camera: emit video-saved signal by name in gst threads



commit 83a580c2445cd136a0436f465f71b4c0a69e9249
Author: Filippo Argiolas <filippo argiolas gmail com>
Date:   Wed Aug 25 12:14:09 2010 +0200

    camera: emit video-saved signal by name in gst threads
    
    Static camera_signals array is not initizialized in the gstreamer thread
    so we get a critical assertion failed (signal_id > 0) if we emit by id.
    This should workaround the issue.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=620637

 libcheese/cheese-camera.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 453fcde..f129d90 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -280,7 +280,9 @@ cheese_camera_bus_message_cb (GstBus *bus, GstMessage *message, CheeseCamera *ca
 
       g_source_remove (priv->eos_timeout_id);
 
-      g_signal_emit (camera, camera_signals[VIDEO_SAVED], 0);
+      /* emit signal by name here as the camera_signals array is empty in this thread */
+      /* TODO: really understand how threads and static works and why this is needed */
+      g_signal_emit_by_name (camera, "video-saved", NULL);
 
       cheese_camera_change_sink (camera, priv->video_display_bin,
                                  priv->photo_save_bin, priv->video_save_bin);



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