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
@ -1,4 +1,4 @@
|
|||||||
glib_enum_prefix = gst_camerabin
|
glib_enum_prefix = __gst_camerabin
|
||||||
|
|
||||||
include $(top_srcdir)/common/glib-gen.mak
|
include $(top_srcdir)/common/glib-gen.mak
|
||||||
|
|
||||||
|
@ -3,4 +3,4 @@
|
|||||||
|
|
||||||
VOID:INT,INT,INT,INT
|
VOID:INT,INT,INT,INT
|
||||||
VOID: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,
|
g_signal_emit (G_OBJECT (camera), camerabin_signals[IMG_DONE_SIGNAL], 0,
|
||||||
filename, cont);
|
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);
|
filename->str, *cont);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2265,7 +2265,7 @@ gst_camerabin_class_init (GstCameraBinClass * klass)
|
|||||||
G_TYPE_FROM_CLASS (klass),
|
G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||||
G_STRUCT_OFFSET (GstCameraBinClass, user_res_fps),
|
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);
|
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_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
G_SIGNAL_RUN_LAST | G_SIGNAL_ACTION,
|
||||||
G_STRUCT_OFFSET (GstCameraBinClass, user_image_res),
|
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);
|
G_TYPE_INT, G_TYPE_INT);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* GstCameraBin::img-done:
|
* GstCameraBin::img-done:
|
||||||
* @camera: the camera bin element
|
* @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
|
* Signal emited when the file has just been saved. To continue taking
|
||||||
* pictures just update @filename and return TRUE, otherwise return FALSE.
|
* 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_new ("img-done", G_TYPE_FROM_CLASS (klass),
|
||||||
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCameraBinClass, img_done),
|
G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (GstCameraBinClass, img_done),
|
||||||
g_signal_accumulator_true_handled, NULL,
|
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_start = gst_camerabin_user_start;
|
||||||
klass->user_stop = gst_camerabin_user_stop;
|
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) {
|
if (captured_images >= MAX_BURST_IMAGES) {
|
||||||
/* release the shutter button */
|
/* release the shutter button */
|
||||||
|
GST_DEBUG ("signal for img-done");
|
||||||
g_mutex_lock (cam_mutex);
|
g_mutex_lock (cam_mutex);
|
||||||
g_cond_signal (cam_cond);
|
g_cond_signal (cam_cond);
|
||||||
g_mutex_unlock (cam_mutex);
|
g_mutex_unlock (cam_mutex);
|
||||||
@ -334,6 +335,7 @@ GST_START_TEST (test_burst_image_capture)
|
|||||||
g_mutex_lock (cam_mutex);
|
g_mutex_lock (cam_mutex);
|
||||||
g_cond_wait (cam_cond, cam_mutex);
|
g_cond_wait (cam_cond, cam_mutex);
|
||||||
g_mutex_unlock (cam_mutex);
|
g_mutex_unlock (cam_mutex);
|
||||||
|
GST_DEBUG ("received img-done");
|
||||||
|
|
||||||
g_signal_emit_by_name (camera, "user-stop", 0);
|
g_signal_emit_by_name (camera, "user-stop", 0);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user