[cheese/camerabin2-format: 22/27] cheese-camera: stop-capture is asynchronous in camerabin2
- From: Oleksij Rempel <orempel src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [cheese/camerabin2-format: 22/27] cheese-camera: stop-capture is asynchronous in camerabin2
- Date: Sat, 24 Mar 2012 08:30:28 +0000 (UTC)
commit ceb48caac4ebc2977707e2e2a42912727640ae1f
Author: Thiago Santos <thiago sousa santos collabora com>
Date: Fri Nov 25 21:12:31 2011 -0300
cheese-camera: stop-capture is asynchronous in camerabin2
Wait for video-done message to signal that capture is over
libcheese/cheese-camera.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/libcheese/cheese-camera.c b/libcheese/cheese-camera.c
index 7d10d95..8ffc74e 100644
--- a/libcheese/cheese-camera.c
+++ b/libcheese/cheese-camera.c
@@ -276,6 +276,11 @@ cheese_camera_bus_message_cb (GstBus *bus, GstMessage *message, CheeseCamera *ca
g_signal_emit (camera, camera_signals[PHOTO_SAVED], 0);
}
}
+ else if (strcmp (gst_structure_get_name (structure), "video-done") == 0)
+ {
+ g_signal_emit (camera, camera_signals[VIDEO_SAVED], 0);
+ priv->is_recording = FALSE;
+ }
}
break;
}
@@ -1059,8 +1064,6 @@ cheese_camera_stop_video_recording (CheeseCamera *camera)
if (state == GST_STATE_PLAYING)
{
g_signal_emit_by_name (priv->camerabin, "stop-capture", 0);
- g_signal_emit (camera, camera_signals[VIDEO_SAVED], 0);
- priv->is_recording = FALSE;
}
else
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]