summaryrefslogtreecommitdiff
path: root/tests/check
diff options
context:
space:
mode:
Diffstat (limited to 'tests/check')
-rw-r--r--tests/check/elements/selector.c19
-rw-r--r--tests/check/gst/gstevent.c6
-rw-r--r--tests/check/gst/gstpad.c12
-rw-r--r--tests/check/gst/gstpipeline.c4
-rw-r--r--tests/check/gst/gstutils.c4
-rw-r--r--tests/check/libs/basesrc.c65
-rw-r--r--tests/check/pipelines/queue-error.c8
7 files changed, 110 insertions, 8 deletions
diff --git a/tests/check/elements/selector.c b/tests/check/elements/selector.c
index 4f36b1f6a..690c4f3de 100644
--- a/tests/check/elements/selector.c
+++ b/tests/check/elements/selector.c
@@ -33,6 +33,7 @@ static GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
GST_PAD_ALWAYS,
GST_STATIC_CAPS_ANY);
+#if 0
/* Data probe cb to drop everything but count buffers and events */
static gboolean
probe_cb (GstPad * pad, GstMiniObject * obj, gpointer user_data)
@@ -58,13 +59,16 @@ probe_cb (GstPad * pad, GstMiniObject * obj, gpointer user_data)
/* drop everything */
return FALSE;
}
+#endif
/* Create and link output pad: selector:src%d ! output_pad */
static GstPad *
setup_output_pad (GstElement * element, GstStaticPadTemplate * tmpl)
{
GstPad *srcpad = NULL, *output_pad = NULL;
+#if 0
gulong probe_id = 0;
+#endif
if (tmpl == NULL)
tmpl = &sinktemplate;
@@ -73,10 +77,12 @@ setup_output_pad (GstElement * element, GstStaticPadTemplate * tmpl)
output_pad = gst_pad_new_from_static_template (tmpl, "sink");
fail_if (output_pad == NULL, "Could not create a output_pad");
+#if 0
/* add probe */
probe_id = gst_pad_add_data_probe (output_pad, G_CALLBACK (probe_cb), NULL);
g_object_set_data (G_OBJECT (output_pad), "probe_id",
GINT_TO_POINTER (probe_id));
+#endif
/* request src pad */
srcpad = gst_element_get_request_pad (element, "src%d");
@@ -103,14 +109,18 @@ static void
cleanup_pad (GstPad * pad, GstElement * element)
{
GstPad *selpad = NULL;
+#if 0
guint probe_id = 0;
+#endif
fail_if (pad == NULL, "pad doesn't exist");
+#if 0
/* remove probe if necessary */
probe_id = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (pad), "probe_id"));
if (probe_id)
gst_pad_remove_data_probe (pad, probe_id);
+#endif
/* unlink */
selpad = gst_pad_get_peer (pad);
@@ -302,7 +312,10 @@ run_input_selector_buffer_count (gint num_input_pads,
gint num_buffers_per_input)
{
/* set up input_pads ! selector ! output_pad */
- gint i = 0, probe_id = 0;
+ gint i = 0;
+#if 0
+ gint probe_id = 0;
+#endif
GList *input_pads = NULL, *output_pads = NULL;
GstElement *sel = gst_check_setup_element ("input-selector");
GstPad *output_pad = gst_check_setup_sink_pad (sel, &sinktemplate, NULL);
@@ -312,10 +325,12 @@ run_input_selector_buffer_count (gint num_input_pads,
for (i = 0; i < num_input_pads; i++) {
input_pads = g_list_append (input_pads, setup_input_pad (sel));
}
+#if 0
/* add probe */
probe_id = gst_pad_add_data_probe (output_pad, G_CALLBACK (probe_cb), NULL);
g_object_set_data (G_OBJECT (output_pad), "probe_id",
GINT_TO_POINTER (probe_id));
+#endif
/* run the test */
fail_unless (gst_element_set_state (sel,
@@ -327,7 +342,9 @@ run_input_selector_buffer_count (gint num_input_pads,
GST_STATE_NULL) == GST_STATE_CHANGE_SUCCESS, "could not set to null");
/* clean up */
+#if 0
gst_pad_remove_data_probe (output_pad, probe_id);
+#endif
gst_pad_set_active (output_pad, FALSE);
gst_check_teardown_sink_pad (sel);
GST_DEBUG ("setting selector pad to NULL");
diff --git a/tests/check/gst/gstevent.c b/tests/check/gst/gstevent.c
index 4579317a6..217617b15 100644
--- a/tests/check/gst/gstevent.c
+++ b/tests/check/gst/gstevent.c
@@ -264,6 +264,7 @@ static GTimeVal sent_event_time;
static GstEvent *got_event_before_q, *got_event_after_q;
static GTimeVal got_event_time;
+#if 0
static gboolean
event_probe (GstPad * pad, GstMiniObject ** data, gpointer user_data)
{
@@ -306,6 +307,7 @@ event_probe (GstPad * pad, GstMiniObject ** data, gpointer user_data)
return TRUE;
}
+#endif
static void test_event
(GstBin * pipeline, GstEventType type, GstPad * pad,
@@ -408,12 +410,16 @@ GST_START_TEST (send_custom_events)
/* add pad-probes to faksrc.src and fakesink.sink */
fail_if ((srcpad = gst_element_get_static_pad (fakesrc, "src")) == NULL);
+#if 0
gst_pad_add_event_probe (srcpad, (GCallback) event_probe,
GINT_TO_POINTER (TRUE));
+#endif
fail_if ((sinkpad = gst_element_get_static_pad (fakesink, "sink")) == NULL);
+#if 0
gst_pad_add_event_probe (sinkpad, (GCallback) event_probe,
GINT_TO_POINTER (FALSE));
+#endif
/* Upstream events */
test_event (pipeline, GST_EVENT_CUSTOM_UPSTREAM, sinkpad, TRUE, srcpad);
diff --git a/tests/check/gst/gstpad.c b/tests/check/gst/gstpad.c
index a65130f6b..e3443f1d4 100644
--- a/tests/check/gst/gstpad.c
+++ b/tests/check/gst/gstpad.c
@@ -249,6 +249,7 @@ GST_START_TEST (test_name_is_valid)
GST_END_TEST;
+#if 0
static gboolean
_probe_handler (GstPad * pad, GstBuffer * buffer, gpointer userdata)
{
@@ -258,13 +259,16 @@ _probe_handler (GstPad * pad, GstBuffer * buffer, gpointer userdata)
return TRUE;
return FALSE;
}
+#endif
GST_START_TEST (test_push_unlinked)
{
GstPad *src;
GstCaps *caps;
GstBuffer *buffer;
+#if 0
gulong id;
+#endif
src = gst_pad_new ("src", GST_PAD_SRC);
fail_if (src == NULL);
@@ -283,6 +287,7 @@ GST_START_TEST (test_push_unlinked)
ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1);
gst_buffer_unref (buffer);
+#if 0
/* adding a probe that returns FALSE will drop the buffer without trying
* to chain */
id = gst_pad_add_buffer_probe (src, (GCallback) _probe_handler,
@@ -293,7 +298,9 @@ GST_START_TEST (test_push_unlinked)
ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1);
gst_buffer_unref (buffer);
gst_pad_remove_buffer_probe (src, id);
+#endif
+#if 0
/* adding a probe that returns TRUE will still chain the buffer,
* and hence drop because pad is unlinked */
id = gst_pad_add_buffer_probe (src, (GCallback) _probe_handler,
@@ -304,6 +311,7 @@ GST_START_TEST (test_push_unlinked)
ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 1);
gst_buffer_unref (buffer);
gst_pad_remove_buffer_probe (src, id);
+#endif
/* cleanup */
@@ -324,7 +332,9 @@ GST_START_TEST (test_push_linked)
GstPadLinkReturn plr;
GstCaps *caps;
GstBuffer *buffer;
+#if 0
gulong id;
+#endif
/* setup */
sink = gst_pad_new ("sink", GST_PAD_SINK);
@@ -374,6 +384,7 @@ GST_START_TEST (test_push_linked)
g_list_free (buffers);
buffers = NULL;
+#if 0
/* adding a probe that returns FALSE will drop the buffer without trying
* to chain */
id = gst_pad_add_buffer_probe (src, (GCallback) _probe_handler,
@@ -393,6 +404,7 @@ GST_START_TEST (test_push_linked)
gst_buffer_ref (buffer);
fail_unless (gst_pad_push (src, buffer) == GST_FLOW_OK);
gst_pad_remove_buffer_probe (src, id);
+#endif
ASSERT_MINI_OBJECT_REFCOUNT (buffer, "buffer", 2);
gst_buffer_unref (buffer);
diff --git a/tests/check/gst/gstpipeline.c b/tests/check/gst/gstpipeline.c
index 02b6dc2b2..3a740166a 100644
--- a/tests/check/gst/gstpipeline.c
+++ b/tests/check/gst/gstpipeline.c
@@ -237,6 +237,7 @@ GST_END_TEST;
static GMutex *probe_lock;
static GCond *probe_cond;
+#if 0
static gboolean
sink_pad_probe (GstPad * pad, GstBuffer * buffer,
GstClockTime * first_timestamp)
@@ -254,6 +255,7 @@ sink_pad_probe (GstPad * pad, GstBuffer * buffer,
return TRUE;
}
+#endif
GST_START_TEST (test_base_time)
{
@@ -274,7 +276,9 @@ GST_START_TEST (test_base_time)
gst_element_link (fakesrc, fakesink);
sink = gst_element_get_static_pad (fakesink, "sink");
+#if 0
gst_pad_add_buffer_probe (sink, G_CALLBACK (sink_pad_probe), &observed);
+#endif
fail_unless (gst_element_set_state (pipeline, GST_STATE_PAUSED)
== GST_STATE_CHANGE_NO_PREROLL, "expected no-preroll from live pipeline");
diff --git a/tests/check/gst/gstutils.c b/tests/check/gst/gstutils.c
index 22d4fb3be..6d0e74a46 100644
--- a/tests/check/gst/gstutils.c
+++ b/tests/check/gst/gstutils.c
@@ -28,6 +28,7 @@
#define SPECIAL_POINTER(x) ((void*)(19283847+(x)))
+#if 0
static int n_data_probes = 0;
static int n_buffer_probes = 0;
static int n_event_probes = 0;
@@ -199,6 +200,7 @@ GST_START_TEST (test_buffer_probe_once)
g_assert (n_event_probes_once == 1); /* i said, can we hit it and quit? */
g_assert (n_data_probes_once == 1); /* let's hit it and quit!!! */
} GST_END_TEST;
+#endif
GST_START_TEST (test_math_scale)
{
@@ -1068,8 +1070,10 @@ gst_utils_suite (void)
TCase *tc_chain = tcase_create ("general");
suite_add_tcase (s, tc_chain);
+#if 0
tcase_add_test (tc_chain, test_buffer_probe_n_times);
tcase_add_test (tc_chain, test_buffer_probe_once);
+#endif
tcase_add_test (tc_chain, test_math_scale);
tcase_add_test (tc_chain, test_math_scale_round);
tcase_add_test (tc_chain, test_math_scale_ceil);
diff --git a/tests/check/libs/basesrc.c b/tests/check/libs/basesrc.c
index 750d9babb..9f4966ab7 100644
--- a/tests/check/libs/basesrc.c
+++ b/tests/check/libs/basesrc.c
@@ -27,6 +27,7 @@
#include <gst/check/gstcheck.h>
#include <gst/base/gstbasesrc.h>
+#if 0
static gboolean
eos_event_counter (GstObject * pad, GstEvent * event, guint * p_num_eos)
{
@@ -38,6 +39,7 @@ eos_event_counter (GstObject * pad, GstEvent * event, guint * p_num_eos)
return TRUE;
}
+#endif
/* basesrc_eos_events_push_live_op:
* - make sure source does send an EOS event when operating in push
@@ -51,7 +53,10 @@ GST_START_TEST (basesrc_eos_events_push_live_op)
GstMessage *msg;
GstBus *bus;
GstPad *srcpad;
- guint probe, num_eos = 0;
+#if 0
+ guint probe;
+#endif
+ guint num_eos = 0;
pipe = gst_pipeline_new ("pipeline");
sink = gst_element_factory_make ("fakesink", "sink");
@@ -76,8 +81,10 @@ GST_START_TEST (basesrc_eos_events_push_live_op)
srcpad = gst_element_get_static_pad (src, "src");
fail_unless (srcpad != NULL);
+#if 0
probe = gst_pad_add_event_probe (srcpad,
G_CALLBACK (eos_event_counter), &num_eos);
+#endif
bus = gst_element_get_bus (pipe);
@@ -110,7 +117,9 @@ GST_START_TEST (basesrc_eos_events_push_live_op)
/* make sure source hasn't sent a second one when going PAUSED => READY */
fail_unless (num_eos == 1);
+#if 0
gst_pad_remove_event_probe (srcpad, probe);
+#endif
gst_object_unref (srcpad);
gst_message_unref (msg);
gst_object_unref (bus);
@@ -130,7 +139,10 @@ GST_START_TEST (basesrc_eos_events_push)
GstMessage *msg;
GstBus *bus;
GstPad *srcpad;
- guint probe, num_eos = 0;
+#if 0
+ guint probe;
+#endif
+ guint num_eos = 0;
pipe = gst_pipeline_new ("pipeline");
sink = gst_element_factory_make ("fakesink", "sink");
@@ -156,8 +168,10 @@ GST_START_TEST (basesrc_eos_events_push)
srcpad = gst_element_get_static_pad (src, "src");
fail_unless (srcpad != NULL);
+#if 0
probe = gst_pad_add_event_probe (srcpad,
G_CALLBACK (eos_event_counter), &num_eos);
+#endif
bus = gst_element_get_bus (pipe);
@@ -179,7 +193,9 @@ GST_START_TEST (basesrc_eos_events_push)
/* make sure source hasn't sent a second one when going PAUSED => READY */
fail_unless (num_eos == 1);
+#if 0
gst_pad_remove_event_probe (srcpad, probe);
+#endif
gst_object_unref (srcpad);
gst_message_unref (msg);
gst_object_unref (bus);
@@ -198,7 +214,10 @@ GST_START_TEST (basesrc_eos_events_pull_live_op)
GstStateChangeReturn state_ret;
GstElement *src, *sink, *pipe;
GstPad *srcpad;
- guint probe, num_eos = 0;
+#if 0
+ guint probe;
+#endif
+ guint num_eos = 0;
pipe = gst_pipeline_new ("pipeline");
sink = gst_element_factory_make ("fakesink", "sink");
@@ -223,8 +242,10 @@ GST_START_TEST (basesrc_eos_events_pull_live_op)
srcpad = gst_element_get_static_pad (src, "src");
fail_unless (srcpad != NULL);
+#if 0
probe = gst_pad_add_event_probe (srcpad,
G_CALLBACK (eos_event_counter), &num_eos);
+#endif
gst_element_set_state (pipe, GST_STATE_PLAYING);
state_ret = gst_element_get_state (pipe, NULL, NULL, -1);
@@ -249,7 +270,9 @@ GST_START_TEST (basesrc_eos_events_pull_live_op)
/* make sure source hasn't sent an EOS when going PAUSED => READY either */
fail_unless (num_eos == 0);
+#if 0
gst_pad_remove_event_probe (srcpad, probe);
+#endif
gst_object_unref (srcpad);
gst_object_unref (pipe);
}
@@ -269,7 +292,10 @@ GST_START_TEST (basesrc_eos_events_pull)
GstMessage *msg;
GstBus *bus;
GstPad *srcpad;
- guint probe, num_eos = 0;
+#if 0
+ guint probe;
+#endif
+ guint num_eos = 0;
pipe = gst_pipeline_new ("pipeline");
sink = gst_element_factory_make ("fakesink", "sink");
@@ -295,8 +321,10 @@ GST_START_TEST (basesrc_eos_events_pull)
srcpad = gst_element_get_static_pad (src, "src");
fail_unless (srcpad != NULL);
+#if 0
probe = gst_pad_add_event_probe (srcpad,
G_CALLBACK (eos_event_counter), &num_eos);
+#endif
bus = gst_element_get_bus (pipe);
@@ -318,7 +346,9 @@ GST_START_TEST (basesrc_eos_events_pull)
/* make sure source hasn't sent an EOS when going PAUSED => READY either */
fail_unless (num_eos == 0);
+#if 0
gst_pad_remove_event_probe (srcpad, probe);
+#endif
gst_object_unref (srcpad);
gst_message_unref (msg);
gst_object_unref (bus);
@@ -339,7 +369,10 @@ GST_START_TEST (basesrc_eos_events_push_live_eos)
GstMessage *msg;
GstBus *bus;
GstPad *srcpad;
- guint probe, num_eos = 0;
+#if 0
+ guint probe;
+#endif
+ guint num_eos = 0;
gboolean res;
pipe = gst_pipeline_new ("pipeline");
@@ -365,8 +398,10 @@ GST_START_TEST (basesrc_eos_events_push_live_eos)
srcpad = gst_element_get_static_pad (src, "src");
fail_unless (srcpad != NULL);
+#if 0
probe = gst_pad_add_event_probe (srcpad,
G_CALLBACK (eos_event_counter), &num_eos);
+#endif
bus = gst_element_get_bus (pipe);
@@ -396,7 +431,9 @@ GST_START_TEST (basesrc_eos_events_push_live_eos)
/* make sure source hasn't sent a second one when going PAUSED => READY */
fail_unless (num_eos == 1);
+#if 0
gst_pad_remove_event_probe (srcpad, probe);
+#endif
gst_object_unref (srcpad);
gst_message_unref (msg);
gst_object_unref (bus);
@@ -416,7 +453,10 @@ GST_START_TEST (basesrc_eos_events_pull_live_eos)
GstMessage *msg;
GstBus *bus;
GstPad *srcpad;
- guint probe, num_eos = 0;
+#if 0
+ guint probe;
+#endif
+ guint num_eos = 0;
gboolean res;
pipe = gst_pipeline_new ("pipeline");
@@ -442,8 +482,10 @@ GST_START_TEST (basesrc_eos_events_pull_live_eos)
srcpad = gst_element_get_static_pad (src, "src");
fail_unless (srcpad != NULL);
+#if 0
probe = gst_pad_add_event_probe (srcpad,
G_CALLBACK (eos_event_counter), &num_eos);
+#endif
bus = gst_element_get_bus (pipe);
@@ -473,7 +515,9 @@ GST_START_TEST (basesrc_eos_events_pull_live_eos)
/* make sure source hasn't sent a second one when going PAUSED => READY */
fail_unless (num_eos == 0);
+#if 0
gst_pad_remove_event_probe (srcpad, probe);
+#endif
gst_object_unref (srcpad);
gst_message_unref (msg);
gst_object_unref (bus);
@@ -482,7 +526,7 @@ GST_START_TEST (basesrc_eos_events_pull_live_eos)
GST_END_TEST;
-
+#if 0
static gboolean
segment_event_catcher (GstObject * pad, GstEvent * event, gpointer * user_data)
{
@@ -499,6 +543,7 @@ segment_event_catcher (GstObject * pad, GstEvent * event, gpointer * user_data)
return TRUE;
}
+#endif
/* basesrc_seek_events_rate_update:
* - make sure we get expected segment after sending a seek event
@@ -510,7 +555,9 @@ GST_START_TEST (basesrc_seek_events_rate_update)
GstMessage *msg;
GstBus *bus;
GstPad *probe_pad;
+#if 0
guint probe;
+#endif
GstEvent *seg_event = NULL;
GstEvent *rate_seek;
gboolean event_ret;
@@ -535,8 +582,10 @@ GST_START_TEST (basesrc_seek_events_rate_update)
probe_pad = gst_element_get_static_pad (sink, "sink");
fail_unless (probe_pad != NULL);
+#if 0
probe = gst_pad_add_event_probe (probe_pad,
G_CALLBACK (segment_event_catcher), &seg_event);
+#endif
/* prepare the seek */
rate_seek = gst_event_new_seek (0.5, GST_FORMAT_TIME, GST_SEEK_FLAG_NONE,
@@ -583,7 +632,9 @@ GST_START_TEST (basesrc_seek_events_rate_update)
gst_event_parse_segment (seg_event, &segment);
fail_unless (segment->rate == 0.5);
+#if 0
gst_pad_remove_event_probe (probe_pad, probe);
+#endif
gst_object_unref (probe_pad);
gst_message_unref (msg);
gst_event_unref (seg_event);
diff --git a/tests/check/pipelines/queue-error.c b/tests/check/pipelines/queue-error.c
index b43e085ca..343879712 100644
--- a/tests/check/pipelines/queue-error.c
+++ b/tests/check/pipelines/queue-error.c
@@ -23,6 +23,7 @@
#include <gst/gst.h>
+#if 0
static gboolean
modify_caps (GstObject * pad, GstEvent * event, gpointer data)
{
@@ -42,6 +43,7 @@ modify_caps (GstObject * pad, GstEvent * event, gpointer data)
return TRUE;
}
+#endif
GST_START_TEST (test_queue)
{
@@ -50,7 +52,9 @@ GST_START_TEST (test_queue)
GstElement *pipeline, *filter, *queue;
GstBus *bus;
GstPad *pad;
+#if 0
guint probe;
+#endif
gchar *pipe_desc =
g_strdup_printf ("fakesrc num-buffers=1 ! video/x-raw-yuv ! "
"queue min-threshold-buffers=2 name=queue ! "
@@ -69,7 +73,9 @@ GST_START_TEST (test_queue)
fail_unless (queue != NULL);
pad = gst_element_get_static_pad (queue, "sink");
fail_unless (pad != NULL);
+#if 0
probe = gst_pad_add_event_probe (pad, G_CALLBACK (modify_caps), filter);
+#endif
bus = gst_element_get_bus (pipeline);
@@ -85,7 +91,9 @@ GST_START_TEST (test_queue)
fail_unless_equals_int (gst_element_set_state (pipeline, GST_STATE_NULL),
GST_STATE_CHANGE_SUCCESS);
+#if 0
gst_pad_remove_event_probe (pad, probe);
+#endif
gst_object_unref (queue);
gst_object_unref (pad);
gst_object_unref (filter);