mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-20 15:27:07 +00:00
test: improve adder test on event handling
Use new consitency checker api to test event handling in more detail.
This commit is contained in:
parent
ce1b1d82e3
commit
22bef18b96
1 changed files with 21 additions and 4 deletions
|
@ -101,8 +101,8 @@ GST_START_TEST (test_event)
|
||||||
GstBus *bus;
|
GstBus *bus;
|
||||||
GstEvent *seek_event;
|
GstEvent *seek_event;
|
||||||
gboolean res;
|
gboolean res;
|
||||||
GstPad *srcpad;
|
GstPad *srcpad, *sinkpad;
|
||||||
GstStreamConsistency *consist;
|
GstStreamConsistency *chk_1, *chk_2, *chk_3;
|
||||||
|
|
||||||
GST_INFO ("preparing test");
|
GST_INFO ("preparing test");
|
||||||
|
|
||||||
|
@ -130,7 +130,22 @@ GST_START_TEST (test_event)
|
||||||
fail_unless (res == TRUE, NULL);
|
fail_unless (res == TRUE, NULL);
|
||||||
|
|
||||||
srcpad = gst_element_get_static_pad (adder, "src");
|
srcpad = gst_element_get_static_pad (adder, "src");
|
||||||
consist = gst_consistency_checker_new (srcpad);
|
chk_3 = gst_consistency_checker_new (srcpad);
|
||||||
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
|
/* create consistency checkers for the pads */
|
||||||
|
srcpad = gst_element_get_static_pad (src1, "src");
|
||||||
|
chk_1 = gst_consistency_checker_new (srcpad);
|
||||||
|
sinkpad = gst_pad_get_peer (srcpad);
|
||||||
|
gst_consistency_checker_add_pad (chk_3, sinkpad);
|
||||||
|
gst_object_unref (sinkpad);
|
||||||
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
|
srcpad = gst_element_get_static_pad (src2, "src");
|
||||||
|
chk_2 = gst_consistency_checker_new (srcpad);
|
||||||
|
sinkpad = gst_pad_get_peer (srcpad);
|
||||||
|
gst_consistency_checker_add_pad (chk_3, sinkpad);
|
||||||
|
gst_object_unref (sinkpad);
|
||||||
gst_object_unref (srcpad);
|
gst_object_unref (srcpad);
|
||||||
|
|
||||||
seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
|
seek_event = gst_event_new_seek (1.0, GST_FORMAT_TIME,
|
||||||
|
@ -174,7 +189,9 @@ GST_START_TEST (test_event)
|
||||||
|
|
||||||
/* cleanup */
|
/* cleanup */
|
||||||
g_main_loop_unref (main_loop);
|
g_main_loop_unref (main_loop);
|
||||||
gst_consistency_checker_free (consist);
|
gst_consistency_checker_free (chk_1);
|
||||||
|
gst_consistency_checker_free (chk_2);
|
||||||
|
gst_consistency_checker_free (chk_3);
|
||||||
gst_object_unref (G_OBJECT (bus));
|
gst_object_unref (G_OBJECT (bus));
|
||||||
gst_object_unref (G_OBJECT (bin));
|
gst_object_unref (G_OBJECT (bin));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue