summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Kost <ensonic@users.sf.net>2009-02-27 12:35:14 +0200
committerStefan Kost <ensonic@users.sf.net>2009-02-27 12:35:14 +0200
commitfab9dfa5d093a27dd6a0bfb16d020f3753523964 (patch)
tree851f01e630fcfbbef2e627dd3b2a76ec0af9ca36
parent5f2d5aa5a547427e5f564ab4b309cfc8f26fba18 (diff)
downloadgst-plugins-bad-fab9dfa5d093a27dd6a0bfb16d020f3753523964.tar.gz
gst-plugins-bad-fab9dfa5d093a27dd6a0bfb16d020f3753523964.tar.bz2
gst-plugins-bad-fab9dfa5d093a27dd6a0bfb16d020f3753523964.zip
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.
-rw-r--r--gst/camerabin/Makefile.am2
-rw-r--r--gst/camerabin/gstcamerabin-marshal.list2
-rw-r--r--gst/camerabin/gstcamerabin.c11
-rw-r--r--tests/check/elements/camerabin.c2
4 files changed, 10 insertions, 7 deletions
diff --git a/gst/camerabin/Makefile.am b/gst/camerabin/Makefile.am
index 583b2c55..376d6787 100644
--- a/gst/camerabin/Makefile.am
+++ b/gst/camerabin/Makefile.am
@@ -1,4 +1,4 @@
-glib_enum_prefix = gst_camerabin
+glib_enum_prefix = __gst_camerabin
include $(top_srcdir)/common/glib-gen.mak
diff --git a/gst/camerabin/gstcamerabin-marshal.list b/gst/camerabin/gstcamerabin-marshal.list
index 40829e54..4c1670ef 100644
--- a/gst/camerabin/gstcamerabin-marshal.list
+++ b/gst/camerabin/gstcamerabin-marshal.list
@@ -3,4 +3,4 @@
VOID:INT,INT,INT,INT
VOID:INT,INT
-BOOLEAN:STRING
+BOOLEAN:POINTER
diff --git a/gst/camerabin/gstcamerabin.c b/gst/camerabin/gstcamerabin.c
index 5dbd386f..905a8c9c 100644
--- a/gst/camerabin/gstcamerabin.c
+++ b/gst/camerabin/gstcamerabin.c
@@ -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;
diff --git a/tests/check/elements/camerabin.c b/tests/check/elements/camerabin.c
index 82b218b9..53e0e5fa 100644
--- a/tests/check/elements/camerabin.c
+++ b/tests/check/elements/camerabin.c
@@ -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);
}