mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-08 16:35:40 +00:00
tests/check/gst/gstevent.c: Improve debugging.
Original commit message from CVS: * tests/check/gst/gstevent.c: (event_probe), (test_event), (GST_START_TEST): Improve debugging.
This commit is contained in:
parent
a02edf4d61
commit
6f24e3101e
2 changed files with 15 additions and 5 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
2007-02-15 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
|
* tests/check/gst/gstevent.c: (event_probe), (test_event),
|
||||||
|
(GST_START_TEST):
|
||||||
|
Improve debugging.
|
||||||
|
|
||||||
2007-02-15 Wim Taymans <wim@fluendo.com>
|
2007-02-15 Wim Taymans <wim@fluendo.com>
|
||||||
|
|
||||||
* gst/gstpad.c: (gst_pad_get_internal_links_default),
|
* gst/gstpad.c: (gst_pad_get_internal_links_default),
|
||||||
|
|
|
@ -261,6 +261,8 @@ event_probe (GstPad * pad, GstMiniObject ** data, gpointer user_data)
|
||||||
|
|
||||||
fail_unless (GST_IS_EVENT (data));
|
fail_unless (GST_IS_EVENT (data));
|
||||||
|
|
||||||
|
GST_DEBUG ("event probe called");
|
||||||
|
|
||||||
if (before_q) {
|
if (before_q) {
|
||||||
switch (GST_EVENT_TYPE (GST_EVENT (data))) {
|
switch (GST_EVENT_TYPE (GST_EVENT (data))) {
|
||||||
case GST_EVENT_CUSTOM_UPSTREAM:
|
case GST_EVENT_CUSTOM_UPSTREAM:
|
||||||
|
@ -309,6 +311,8 @@ static void test_event
|
||||||
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL,
|
gst_element_get_state (GST_ELEMENT (pipeline), NULL, NULL,
|
||||||
GST_CLOCK_TIME_NONE);
|
GST_CLOCK_TIME_NONE);
|
||||||
|
|
||||||
|
GST_DEBUG ("test event called");
|
||||||
|
|
||||||
event = gst_event_new_custom (type,
|
event = gst_event_new_custom (type,
|
||||||
gst_structure_empty_new ("application/x-custom"));
|
gst_structure_empty_new ("application/x-custom"));
|
||||||
g_get_current_time (&sent_event_time);
|
g_get_current_time (&sent_event_time);
|
||||||
|
@ -404,32 +408,32 @@ GST_START_TEST (send_custom_events)
|
||||||
test_event (pipeline, GST_EVENT_CUSTOM_UPSTREAM, sinkpad, TRUE, srcpad);
|
test_event (pipeline, GST_EVENT_CUSTOM_UPSTREAM, sinkpad, TRUE, srcpad);
|
||||||
fail_unless (timediff (&got_event_time,
|
fail_unless (timediff (&got_event_time,
|
||||||
&sent_event_time) < G_USEC_PER_SEC / 2,
|
&sent_event_time) < G_USEC_PER_SEC / 2,
|
||||||
"GST_EVENT_CUSTOM_UP took to long to reach source: %"
|
"GST_EVENT_CUSTOM_UP took too long to reach source: %"
|
||||||
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
||||||
|
|
||||||
test_event (pipeline, GST_EVENT_CUSTOM_BOTH, sinkpad, TRUE, srcpad);
|
test_event (pipeline, GST_EVENT_CUSTOM_BOTH, sinkpad, TRUE, srcpad);
|
||||||
fail_unless (timediff (&got_event_time,
|
fail_unless (timediff (&got_event_time,
|
||||||
&sent_event_time) < G_USEC_PER_SEC / 2,
|
&sent_event_time) < G_USEC_PER_SEC / 2,
|
||||||
"GST_EVENT_CUSTOM_BOTH took to long to reach source: %"
|
"GST_EVENT_CUSTOM_BOTH took too long to reach source: %"
|
||||||
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
||||||
|
|
||||||
test_event (pipeline, GST_EVENT_CUSTOM_BOTH_OOB, sinkpad, TRUE, srcpad);
|
test_event (pipeline, GST_EVENT_CUSTOM_BOTH_OOB, sinkpad, TRUE, srcpad);
|
||||||
fail_unless (timediff (&got_event_time,
|
fail_unless (timediff (&got_event_time,
|
||||||
&sent_event_time) < G_USEC_PER_SEC / 2,
|
&sent_event_time) < G_USEC_PER_SEC / 2,
|
||||||
"GST_EVENT_CUSTOM_BOTH_OOB took to long to reach source: %"
|
"GST_EVENT_CUSTOM_BOTH_OOB took too long to reach source: %"
|
||||||
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
||||||
|
|
||||||
/* Out of band downstream events */
|
/* Out of band downstream events */
|
||||||
test_event (pipeline, GST_EVENT_CUSTOM_DOWNSTREAM_OOB, srcpad, FALSE, srcpad);
|
test_event (pipeline, GST_EVENT_CUSTOM_DOWNSTREAM_OOB, srcpad, FALSE, srcpad);
|
||||||
fail_unless (timediff (&got_event_time,
|
fail_unless (timediff (&got_event_time,
|
||||||
&sent_event_time) < G_USEC_PER_SEC / 2,
|
&sent_event_time) < G_USEC_PER_SEC / 2,
|
||||||
"GST_EVENT_CUSTOM_DS_OOB took to long to reach source: %"
|
"GST_EVENT_CUSTOM_DS_OOB took too long to reach source: %"
|
||||||
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
||||||
|
|
||||||
test_event (pipeline, GST_EVENT_CUSTOM_BOTH_OOB, srcpad, FALSE, srcpad);
|
test_event (pipeline, GST_EVENT_CUSTOM_BOTH_OOB, srcpad, FALSE, srcpad);
|
||||||
fail_unless (timediff (&got_event_time,
|
fail_unless (timediff (&got_event_time,
|
||||||
&sent_event_time) < G_USEC_PER_SEC / 2,
|
&sent_event_time) < G_USEC_PER_SEC / 2,
|
||||||
"GST_EVENT_CUSTOM_BOTH_OOB took to long to reach source: %"
|
"GST_EVENT_CUSTOM_BOTH_OOB took too long to reach source: %"
|
||||||
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
G_GINT64_FORMAT " us", timediff (&got_event_time, &sent_event_time));
|
||||||
|
|
||||||
/* In-band downstream events are expected to take at least 1 second
|
/* In-band downstream events are expected to take at least 1 second
|
||||||
|
|
Loading…
Reference in a new issue