summaryrefslogtreecommitdiff
path: root/tests/check
diff options
context:
space:
mode:
authorTim-Philipp Müller <tim.muller@collabora.co.uk>2011-11-24 00:38:21 +0000
committerTim-Philipp Müller <tim.muller@collabora.co.uk>2011-11-24 00:38:21 +0000
commite0d4715b7731c2c528eedea6a84b1b28b5d6774b (patch)
tree195bbaaa5af132841f23786eaf24735065096e57 /tests/check
parente3957d141793282518c015a02f81c52b2118b2ff (diff)
gnl, tests: update for pad probe API changes
But unit tests time out after pad gets blocked, so still something missing somewhere.
Diffstat (limited to 'tests/check')
-rw-r--r--tests/check/gnl/common.h10
-rw-r--r--tests/check/gnl/complex.c4
-rw-r--r--tests/check/gnl/gnlcomposition.c8
-rw-r--r--tests/check/gnl/gnloperation.c2
-rw-r--r--tests/check/gnl/gnlsource.c4
-rw-r--r--tests/check/gnl/seek.c2
-rw-r--r--tests/check/gnl/simple.c8
7 files changed, 19 insertions, 19 deletions
diff --git a/tests/check/gnl/common.h b/tests/check/gnl/common.h
index 1827934..72c8998 100644
--- a/tests/check/gnl/common.h
+++ b/tests/check/gnl/common.h
@@ -122,12 +122,12 @@ sinkpad_buffer_probe (GstPad * sinkpad, GstBuffer * buffer, CollectStructure * c
}
static GstPadProbeReturn
-sinkpad_probe (GstPad *sinkpad, GstPadProbeType ptype, gpointer data, CollectStructure * collect)
+sinkpad_probe (GstPad *sinkpad, GstPadProbeInfo * info, CollectStructure * collect)
{
- if (ptype & GST_PAD_PROBE_TYPE_BUFFER)
- return sinkpad_buffer_probe (sinkpad, (GstBuffer*) data, collect);
- if (ptype & GST_PAD_PROBE_TYPE_EVENT)
- return sinkpad_event_probe (sinkpad, (GstEvent *) data, collect);
+ if (info->type & GST_PAD_PROBE_TYPE_BUFFER)
+ return sinkpad_buffer_probe (sinkpad, (GstBuffer*) info->data, collect);
+ if (info->type & GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM)
+ return sinkpad_event_probe (sinkpad, (GstEvent *) info->data, collect);
return GST_PAD_PROBE_OK;
}
diff --git a/tests/check/gnl/complex.c b/tests/check/gnl/complex.c
index 2eedb00..14e830b 100644
--- a/tests/check/gnl/complex.c
+++ b/tests/check/gnl/complex.c
@@ -29,7 +29,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
@@ -535,7 +535,7 @@ GST_START_TEST (test_renegotiation)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
diff --git a/tests/check/gnl/gnlcomposition.c b/tests/check/gnl/gnlcomposition.c
index 13319a8..20ac7c3 100644
--- a/tests/check/gnl/gnlcomposition.c
+++ b/tests/check/gnl/gnlcomposition.c
@@ -30,10 +30,10 @@ static int seek_events;
static gulong blockprobeid;
static GstPadProbeReturn
-on_source1_pad_event_cb (GstPad * pad, GstPadProbeType ptype,
- GstEvent * event, gpointer user_data)
+on_source1_pad_event_cb (GstPad * pad, GstPadProbeInfo * info,
+ gpointer user_data)
{
- if (event->type == GST_EVENT_SEEK)
+ if (GST_EVENT_TYPE (info->data) == GST_EVENT_SEEK)
++seek_events;
return GST_PAD_PROBE_OK;
@@ -42,7 +42,7 @@ on_source1_pad_event_cb (GstPad * pad, GstPadProbeType ptype,
static void
on_source1_pad_added_cb (GstElement * source, GstPad * pad, gpointer user_data)
{
- gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT,
+ gst_pad_add_probe (pad, GST_PAD_PROBE_TYPE_EVENT_UPSTREAM,
(GstPadProbeCallback) on_source1_pad_event_cb, NULL, NULL);
}
diff --git a/tests/check/gnl/gnloperation.c b/tests/check/gnl/gnloperation.c
index bec3ef0..2ebdf84 100644
--- a/tests/check/gnl/gnloperation.c
+++ b/tests/check/gnl/gnloperation.c
@@ -29,7 +29,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
diff --git a/tests/check/gnl/gnlsource.c b/tests/check/gnl/gnlsource.c
index 41bf6db..1325a09 100644
--- a/tests/check/gnl/gnlsource.c
+++ b/tests/check/gnl/gnlsource.c
@@ -44,7 +44,7 @@ GST_START_TEST (test_simple_videotestsrc)
sinkpad = gst_element_get_static_pad (sink, "sink");
fail_if (sinkpad == NULL);
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (pipeline);
@@ -145,7 +145,7 @@ GST_START_TEST (test_videotestsrc_in_bin)
sinkpad = gst_element_get_static_pad (sink, "sink");
fail_if (sinkpad == NULL);
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (pipeline);
diff --git a/tests/check/gnl/seek.c b/tests/check/gnl/seek.c
index 0547b26..be5c96c 100644
--- a/tests/check/gnl/seek.c
+++ b/tests/check/gnl/seek.c
@@ -51,7 +51,7 @@ fill_pipeline_and_check (GstElement * comp, GList * segments, GList * seeks)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_EVENT,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_EVENT_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
diff --git a/tests/check/gnl/simple.c b/tests/check/gnl/simple.c
index ee25309..0a11725 100644
--- a/tests/check/gnl/simple.c
+++ b/tests/check/gnl/simple.c
@@ -62,7 +62,7 @@ test_simplest_full (gboolean async)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
@@ -339,7 +339,7 @@ test_one_after_other_full (gboolean async)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
@@ -539,7 +539,7 @@ test_one_under_another_full (gboolean async)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));
@@ -687,7 +687,7 @@ test_one_bin_after_other_full (gboolean async)
G_CALLBACK (composition_pad_added_cb), collect);
sinkpad = gst_element_get_static_pad (sink, "sink");
- gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA,
+ gst_pad_add_probe (sinkpad, GST_PAD_PROBE_TYPE_DATA_DOWNSTREAM,
(GstPadProbeCallback) sinkpad_probe, collect, NULL);
bus = gst_element_get_bus (GST_ELEMENT (pipeline));