summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorStefan Sauer <ensonic@users.sf.net>2017-10-23 11:52:38 +0200
committerStefan Sauer <ensonic@users.sf.net>2017-10-23 11:54:53 +0200
commit97c81b0a36bcd9507cb8790a80c07f582526daaa (patch)
tree32cf2da401cbe154cbc811ded159149c4f17156b /tests
parent0a2ff1ecda238116e7999f8e95a655a806e2041a (diff)
tests: comment and logging cleanups for audiomixer and aggregator
Remove some references to 'collectpads'. Logs pads through the object variants. Add some more comments. Remove a left over comment.
Diffstat (limited to 'tests')
-rw-r--r--tests/check/elements/audiomixer.c2
-rw-r--r--tests/check/libs/aggregator.c13
2 files changed, 10 insertions, 5 deletions
diff --git a/tests/check/elements/audiomixer.c b/tests/check/elements/audiomixer.c
index 4abddda38..4d04093a5 100644
--- a/tests/check/elements/audiomixer.c
+++ b/tests/check/elements/audiomixer.c
@@ -1596,6 +1596,7 @@ GST_START_TEST (test_segment_base_handling)
sink = gst_element_factory_make ("appsink", "sink");
g_object_set (sink, "caps", caps, "sync", FALSE, NULL);
gst_caps_unref (caps);
+ /* 50 buffers of 1/10 sec = 5 sec */
src1 = gst_element_factory_make ("audiotestsrc", "src1");
g_object_set (src1, "samplesperbuffer", 4410, "num-buffers", 50, NULL);
src2 = gst_element_factory_make ("audiotestsrc", "src2");
@@ -1612,6 +1613,7 @@ GST_START_TEST (test_segment_base_handling)
srcpad = gst_element_get_static_pad (src2, "src");
sinkpad = gst_element_get_request_pad (mix, "sink_2");
fail_unless (gst_pad_link (srcpad, sinkpad) == GST_PAD_LINK_OK);
+ /* set a pad offset of another 5 seconds */
gst_pad_set_offset (sinkpad, 5 * GST_SECOND);
gst_object_unref (sinkpad);
gst_object_unref (srcpad);
diff --git a/tests/check/libs/aggregator.c b/tests/check/libs/aggregator.c
index 28a0c46fe..06ef40311 100644
--- a/tests/check/libs/aggregator.c
+++ b/tests/check/libs/aggregator.c
@@ -593,8 +593,6 @@ GST_START_TEST (test_aggregate_handle_queries)
g_thread_join (thread1);
g_thread_join (thread2);
- // FIXME: need to make sure all data was aggregated
-
_chain_data_clear (&data1);
_chain_data_clear (&data2);
_test_data_clear (&test);
@@ -819,20 +817,24 @@ GST_START_TEST (test_flushing_seek)
fail_unless_equals_int (test.flush_start_events, 0);
fail_unless_equals_int (test.flush_stop_events, 0);
- /* flush ogg:sink_0. This flushs collectpads, calls ::flush() and sends
- * FLUSH_START downstream */
- GST_DEBUG ("Flushing: %s:%s", GST_DEBUG_PAD_NAME (data2.sinkpad));
+ /* send a first FLUSH_START on agg:sink_0, will be sent downstream */
+ GST_DEBUG_OBJECT (data2.sinkpad, "send flush_start");
fail_unless (gst_pad_push_event (data2.srcpad, gst_event_new_flush_start ()));
+ fail_unless_equals_int (test.flush_start_events, 1);
+ fail_unless_equals_int (test.flush_stop_events, 0);
/* expect this buffer to be flushed */
data2.expected_result = GST_FLOW_FLUSHING;
thread2 = g_thread_try_new ("gst-check", push_data, &data2, NULL);
+ /* this should send not additional flush_start */
+ GST_DEBUG_OBJECT (data1.sinkpad, "send flush_start");
fail_unless (gst_pad_push_event (data1.srcpad, gst_event_new_flush_start ()));
fail_unless_equals_int (test.flush_start_events, 1);
fail_unless_equals_int (test.flush_stop_events, 0);
/* the first FLUSH_STOP is not forwarded downstream */
+ GST_DEBUG_OBJECT (data1.srcpad, "send flush_stop");
fail_unless (gst_pad_push_event (data1.srcpad,
gst_event_new_flush_stop (TRUE)));
fail_unless_equals_int (test.flush_start_events, 1);
@@ -848,6 +850,7 @@ GST_START_TEST (test_flushing_seek)
/* flush agg:sink_1 as well. This completes the flushing seek so a FLUSH_STOP is
* sent downstream */
+ GST_DEBUG_OBJECT (data2.srcpad, "send flush_stop");
gst_pad_push_event (data2.srcpad, gst_event_new_flush_stop (TRUE));
/* and the last FLUSH_STOP is forwarded downstream */