diff --git a/tests/check/Makefile.am b/tests/check/Makefile.am index 3124aa1ceb..b9e90e51be 100644 --- a/tests/check/Makefile.am +++ b/tests/check/Makefile.am @@ -119,6 +119,7 @@ check_PROGRAMS = \ gst/gstobject \ gst/gstpad \ gst/gstparamspecs \ + gst/gstpipeline \ gst/gstpoll \ gst/gstsegment \ gst/gstsystemclock \ @@ -144,7 +145,6 @@ check_PROGRAMS = \ # failing tests noinst_PROGRAMS = \ - gst/gstpipeline \ libs/collectpads # elements to ignore for the state tests diff --git a/tests/check/gst/gstpipeline.c b/tests/check/gst/gstpipeline.c index 4e34eeae11..be43c462f9 100644 --- a/tests/check/gst/gstpipeline.c +++ b/tests/check/gst/gstpipeline.c @@ -240,10 +240,19 @@ GST_END_TEST; static GMutex *probe_lock; static GCond *probe_cond; -static gboolean -sink_pad_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer, - GstClockTime * first_timestamp) +static GstPadProbeReturn +sink_pad_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data) { + GstClockTime *first_timestamp = user_data; + GstBuffer *buffer; + + fail_unless ((GST_PAD_PROBE_INFO_TYPE (info) & GST_PAD_PROBE_TYPE_BUFFER)); + + buffer = GST_BUFFER (info->data); + + GST_LOG_OBJECT (pad, "buffer with timestamp %" GST_TIME_FORMAT, + GST_TIME_ARGS (GST_BUFFER_TIMESTAMP (buffer))); + fail_if (GST_BUFFER_TIMESTAMP (buffer) == GST_CLOCK_TIME_NONE, "testing if buffer timestamps are right, but got CLOCK_TIME_NONE"); @@ -255,7 +264,7 @@ sink_pad_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer, g_cond_signal (probe_cond); g_mutex_unlock (probe_lock); - return TRUE; + return GST_PAD_PROBE_OK; } GST_START_TEST (test_base_time) @@ -277,8 +286,8 @@ GST_START_TEST (test_base_time) gst_element_link (fakesrc, fakesink); sink = gst_element_get_static_pad (fakesink, "sink"); - gst_pad_add_probe (sink, GST_PAD_PROBE_TYPE_BUFFER, - (GstPadProbeCallback) sink_pad_probe, &observed, NULL); + gst_pad_add_probe (sink, GST_PAD_PROBE_TYPE_BUFFER, sink_pad_probe, + &observed, NULL); fail_unless (gst_element_set_state (pipeline, GST_STATE_PAUSED) == GST_STATE_CHANGE_NO_PREROLL, "expected no-preroll from live pipeline"); @@ -489,6 +498,8 @@ GST_START_TEST (test_base_time) GST_TIME_ARGS (observed), GST_TIME_ARGS (oldobserved)); } + gst_element_set_state (pipeline, GST_STATE_NULL); + gst_object_unref (sink); gst_object_unref (clock); gst_object_unref (pipeline);