mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-06 02:32:23 +00:00
camerabin: rework signaling and tests
Revert the GString change. There are no marshallers for it. A better change is now described in http://bugzilla.gnome.org/show_bug.cgi?id=573370. Test should work again.
This commit is contained in:
parent
5f2d5aa5a5
commit
fab9dfa5d0
4 changed files with 10 additions and 7 deletions
|
@ -1,4 +1,4 @@
|
|||
glib_enum_prefix = gst_camerabin
|
||||
glib_enum_prefix = __gst_camerabin
|
||||
|
||||
include $(top_srcdir)/common/glib-gen.mak
|
||||
|
||||
|
|
|
@ -3,4 +3,4 @@
|
|||
|
||||
VOID:INT,INT,INT,INT
|
||||
VOID:INT,INT
|
||||
BOOLEAN:STRING
|
||||
BOOLEAN:POINTER
|
||||
|
|
|
@ -882,7 +882,7 @@ gst_camerabin_image_capture_continue (GstCameraBin * camera, GString * filename,
|
|||
g_signal_emit (G_OBJECT (camera), camerabin_signals[IMG_DONE_SIGNAL], 0,
|
||||
filename, cont);
|
||||
|
||||
GST_DEBUG_OBJECT (camera, "emitted img_done, new filename:%s, continue:%d",
|
||||
GST_DEBUG_OBJECT (camera, "emitted img_done, new filename: %s, continue: %d",
|
||||
filename->str, *cont);
|
||||
}
|
||||
|
||||
|
@ -2265,7 +2265,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
|
|||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||
G_STRUCT_OFFSET (GstCameraBinClass, user_res_fps),
|
||||
NULL, NULL, gst_camerabin_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4,
|
||||
NULL, NULL, __gst_camerabin_marshal_VOID__INT_INT_INT_INT, G_TYPE_NONE, 4,
|
||||
G_TYPE_INT, G_TYPE_INT, G_TYPE_INT, G_TYPE_INT);
|
||||
|
||||
/**
|
||||
|
@ -2284,13 +2284,13 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
|
|||
G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||
G_STRUCT_OFFSET (GstCameraBinClass, user_image_res),
|
||||
NULL, NULL, gst_camerabin_marshal_VOID__INT_INT, G_TYPE_NONE, 2,
|
||||
NULL, NULL, __gst_camerabin_marshal_VOID__INT_INT, G_TYPE_NONE, 2,
|
||||
G_TYPE_INT, G_TYPE_INT);
|
||||
|
||||
/**
|
||||
* GstCameraBin::img-done:
|
||||
* @camera: the camera bin element
|
||||
* @filename: the name of the file just saved
|
||||
* @filename: the name of the file just saved as a GString*
|
||||
*
|
||||
* Signal emited when the file has just been saved. To continue taking
|
||||
* pictures just update @filename and return TRUE, otherwise return FALSE.
|
||||
|
@ -2303,7 +2303,8 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
|
|||
g_signal_new ("img-done", G_TYPE_FROM_CLASS (klass),
|
||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCameraBinClass, img_done),
|
||||
g_signal_accumulator_true_handled, NULL,
|
||||
gst_camerabin_marshal_BOOLEAN__STRING, G_TYPE_BOOLEAN, 1, G_TYPE_GSTRING);
|
||||
__gst_camerabin_marshal_BOOLEAN__POINTER, G_TYPE_BOOLEAN, 1,
|
||||
G_TYPE_POINTER);
|
||||
|
||||
klass->user_start = gst_camerabin_user_start;
|
||||
klass->user_stop = gst_camerabin_user_stop;
|
||||
|
|
|
@ -82,6 +82,7 @@ capture_done (GstElement * elem, GString * filename, gpointer user_data)
|
|||
|
||||
if (captured_images >= MAX_BURST_IMAGES) {
|
||||
/* release the shutter button */
|
||||
GST_DEBUG ("signal for img-done");
|
||||
g_mutex_lock (cam_mutex);
|
||||
g_cond_signal (cam_cond);
|
||||
g_mutex_unlock (cam_mutex);
|
||||
|
@ -334,6 +335,7 @@ GST_START_TEST (test_burst_image_capture)
|
|||
g_mutex_lock (cam_mutex);
|
||||
g_cond_wait (cam_cond, cam_mutex);
|
||||
g_mutex_unlock (cam_mutex);
|
||||
GST_DEBUG ("received img-done");
|
||||
|
||||
g_signal_emit_by_name (camera, "user-stop", 0);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue