diff options
Diffstat (limited to 'tests/check/elements/camerabin2.c')
-rw-r--r-- | tests/check/elements/camerabin2.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tests/check/elements/camerabin2.c b/tests/check/elements/camerabin2.c index 25f6ac8d2..efdd977f0 100644 --- a/tests/check/elements/camerabin2.c +++ b/tests/check/elements/camerabin2.c @@ -363,6 +363,7 @@ extract_jpeg_tags (const gchar * filename, gint num) gst_object_unref (bus); g_source_remove (source); gst_object_unref (pipeline); + g_main_loop_unref (loop); } static void @@ -579,6 +580,7 @@ check_file_validity (const gchar * filename, gint num, GstTagList * taglist, g_source_remove (source); gst_object_unref (bus); gst_object_unref (playbin); + g_main_loop_unref (loop); return TRUE; } @@ -626,6 +628,8 @@ wait_for_element_message (GstElement * camera, const gchar * name, if (gst_structure_has_name (st, name)) break; + else + gst_message_unref (msg); } else { gst_message_unref (msg); msg = NULL; @@ -649,7 +653,8 @@ wait_for_idle_state (void) if (idle) break; - g_usleep (GST_SECOND / 5); + GST_LOG ("waiting for idle state.."); + g_usleep (G_USEC_PER_SEC / 5); } fail_unless (idle); } @@ -832,6 +837,7 @@ GST_START_TEST (test_multiple_video_recordings) gst_caps_unref (caps); + GST_LOG ("starting #%d with caps %" GST_PTR_FORMAT, i, caps); g_signal_emit_by_name (camera, "start-capture", NULL); g_object_get (camera, "idle", &idle, NULL); @@ -840,15 +846,20 @@ GST_START_TEST (test_multiple_video_recordings) g_timeout_add_seconds (VIDEO_DURATION, (GSourceFunc) g_main_loop_quit, main_loop); g_main_loop_run (main_loop); + + GST_LOG ("stopping run %d", i); g_signal_emit_by_name (camera, "stop-capture", NULL); msg = wait_for_element_message (camera, "video-done", GST_CLOCK_TIME_NONE); fail_unless (msg != NULL); gst_message_unref (msg); + GST_LOG ("video done, checking preview image"); check_preview_image (camera, video_filename, i); + GST_LOG ("waiting for idle state"); wait_for_idle_state (); + GST_LOG ("finished run %d", i); } gst_element_set_state (GST_ELEMENT (camera), GST_STATE_NULL); |