From bf973273b445be06b73b061cc84ab2ac1b4d1d40 Mon Sep 17 00:00:00 2001 From: Edward Hervey Date: Tue, 25 Sep 2012 14:23:31 +0200 Subject: !!PENDING WORK --- tests/check/gnl/common.h | 16 +++++++++++----- tests/check/gnl/gnlcomposition.c | 5 +++-- tests/check/gnl/seek.c | 8 ++------ tests/check/gnl/simple.c | 3 +++ 4 files changed, 19 insertions(+), 13 deletions(-) diff --git a/tests/check/gnl/common.h b/tests/check/gnl/common.h index 760c3f7..1cb9295 100644 --- a/tests/check/gnl/common.h +++ b/tests/check/gnl/common.h @@ -72,10 +72,13 @@ compare_segments (Segment * segment, GstEvent * event) gst_event_parse_segment (event, &orig); GST_DEBUG ("Got Segment rate:%f, format:%s, start:%"GST_TIME_FORMAT - ", stop:%"GST_TIME_FORMAT", position:%"GST_TIME_FORMAT, + ", stop:%"GST_TIME_FORMAT", position:%"GST_TIME_FORMAT + ", base:%"GST_TIME_FORMAT", offset:%"GST_TIME_FORMAT, orig->rate, gst_format_get_name(orig->format), GST_TIME_ARGS (orig->start), GST_TIME_ARGS (orig->stop), - GST_TIME_ARGS (orig->position)); + GST_TIME_ARGS (orig->position), + GST_TIME_ARGS (orig->base), + GST_TIME_ARGS (orig->offset)); GST_DEBUG ("Expecting rate:%f, format:%s, start:%"GST_TIME_FORMAT ", stop:%"GST_TIME_FORMAT", position:%"GST_TIME_FORMAT, @@ -100,7 +103,9 @@ sinkpad_event_probe (GstPad * sinkpad, GstEvent * event, CollectStructure * coll { Segment * segment; - GST_DEBUG_OBJECT (sinkpad, "event:%p , collect:%p", event, collect); + GST_DEBUG_OBJECT (sinkpad, "event:%p (%s seqnum:%d) , collect:%p", event, + GST_EVENT_TYPE_NAME (event), + GST_EVENT_SEQNUM (event), collect); if (GST_EVENT_TYPE (event) == GST_EVENT_SEGMENT) { fail_if (collect->expected_segments == NULL, "Received unexpected segment"); @@ -119,8 +124,9 @@ sinkpad_event_probe (GstPad * sinkpad, GstEvent * event, CollectStructure * coll static GstPadProbeReturn sinkpad_buffer_probe (GstPad * sinkpad, GstBuffer * buffer, CollectStructure * collect) { - GST_DEBUG_OBJECT (sinkpad, "buffer:%p , collect:%p", buffer, collect); - fail_if(!collect->gotsegment); + GST_DEBUG_OBJECT (sinkpad, "buffer:%p (%"GST_TIME_FORMAT") , collect:%p", buffer, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer)), collect); + fail_if(!collect->gotsegment, "Received a buffer without a preceding segment"); return GST_PAD_PROBE_OK; } diff --git a/tests/check/gnl/gnlcomposition.c b/tests/check/gnl/gnlcomposition.c index 186d94f..a5b9146 100644 --- a/tests/check/gnl/gnlcomposition.c +++ b/tests/check/gnl/gnlcomposition.c @@ -27,7 +27,7 @@ typedef struct static int composition_pad_added; static int composition_pad_removed; static int seek_events; -static gulong blockprobeid; +static gulong blockprobeid = 0; static GstPadProbeReturn on_source1_pad_event_cb (GstPad * pad, GstPadProbeInfo * info, @@ -243,7 +243,8 @@ pad_block (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) gst_element_add_pad (GST_ELEMENT (bin), ghost); - gst_pad_remove_probe (pad, blockprobeid); + if (blockprobeid) + gst_pad_remove_probe (pad, blockprobeid); return GST_PAD_PROBE_OK; } diff --git a/tests/check/gnl/seek.c b/tests/check/gnl/seek.c index 30e8270..8689f90 100644 --- a/tests/check/gnl/seek.c +++ b/tests/check/gnl/seek.c @@ -727,12 +727,8 @@ gnonlin_suite (void) tcase_add_test (tc_chain, test_one_after_other); tcase_add_test (tc_chain, test_one_under_another); tcase_add_test (tc_chain, test_one_bin_after_other); - if (gst_registry_check_feature_version (gst_registry_get (), "videomixer", 0, - 11, 0)) { - tcase_add_test (tc_chain, test_complex_operations); - tcase_add_test (tc_chain, test_complex_operations_bis); - } else - GST_WARNING ("videomixer element not available, skipping 1 test"); + tcase_add_test (tc_chain, test_complex_operations); + tcase_add_test (tc_chain, test_complex_operations_bis); return s; } diff --git a/tests/check/gnl/simple.c b/tests/check/gnl/simple.c index 0a11725..14d53c2 100644 --- a/tests/check/gnl/simple.c +++ b/tests/check/gnl/simple.c @@ -544,6 +544,7 @@ test_one_under_another_full (gboolean async) bus = gst_element_get_bus (GST_ELEMENT (pipeline)); + GST_DEBUG ("Setting pipeline to PLAYING"); fail_if (gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING) == GST_STATE_CHANGE_FAILURE); @@ -569,6 +570,8 @@ test_one_under_another_full (gboolean async) } } + GST_DEBUG ("done playing"); + fail_if (collect->expected_segments != NULL); fail_if (gst_element_set_state (GST_ELEMENT (pipeline), -- cgit v1.2.3