mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
tests: fix pipeline unit test
Which was disabled because it failed.
This commit is contained in:
parent
283c117468
commit
31e28180b3
2 changed files with 18 additions and 7 deletions
|
@ -119,6 +119,7 @@ check_PROGRAMS = \
|
||||||
gst/gstobject \
|
gst/gstobject \
|
||||||
gst/gstpad \
|
gst/gstpad \
|
||||||
gst/gstparamspecs \
|
gst/gstparamspecs \
|
||||||
|
gst/gstpipeline \
|
||||||
gst/gstpoll \
|
gst/gstpoll \
|
||||||
gst/gstsegment \
|
gst/gstsegment \
|
||||||
gst/gstsystemclock \
|
gst/gstsystemclock \
|
||||||
|
@ -144,7 +145,6 @@ check_PROGRAMS = \
|
||||||
|
|
||||||
# failing tests
|
# failing tests
|
||||||
noinst_PROGRAMS = \
|
noinst_PROGRAMS = \
|
||||||
gst/gstpipeline \
|
|
||||||
libs/collectpads
|
libs/collectpads
|
||||||
|
|
||||||
# elements to ignore for the state tests
|
# elements to ignore for the state tests
|
||||||
|
|
|
@ -240,10 +240,19 @@ GST_END_TEST;
|
||||||
static GMutex *probe_lock;
|
static GMutex *probe_lock;
|
||||||
static GCond *probe_cond;
|
static GCond *probe_cond;
|
||||||
|
|
||||||
static gboolean
|
static GstPadProbeReturn
|
||||||
sink_pad_probe (GstPad * pad, GstPadProbeType type, GstBuffer * buffer,
|
sink_pad_probe (GstPad * pad, GstPadProbeInfo * info, gpointer user_data)
|
||||||
GstClockTime * first_timestamp)
|
|
||||||
{
|
{
|
||||||
|
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,
|
fail_if (GST_BUFFER_TIMESTAMP (buffer) == GST_CLOCK_TIME_NONE,
|
||||||
"testing if buffer timestamps are right, but got 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_cond_signal (probe_cond);
|
||||||
g_mutex_unlock (probe_lock);
|
g_mutex_unlock (probe_lock);
|
||||||
|
|
||||||
return TRUE;
|
return GST_PAD_PROBE_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
GST_START_TEST (test_base_time)
|
GST_START_TEST (test_base_time)
|
||||||
|
@ -277,8 +286,8 @@ GST_START_TEST (test_base_time)
|
||||||
gst_element_link (fakesrc, fakesink);
|
gst_element_link (fakesrc, fakesink);
|
||||||
|
|
||||||
sink = gst_element_get_static_pad (fakesink, "sink");
|
sink = gst_element_get_static_pad (fakesink, "sink");
|
||||||
gst_pad_add_probe (sink, GST_PAD_PROBE_TYPE_BUFFER,
|
gst_pad_add_probe (sink, GST_PAD_PROBE_TYPE_BUFFER, sink_pad_probe,
|
||||||
(GstPadProbeCallback) sink_pad_probe, &observed, NULL);
|
&observed, NULL);
|
||||||
|
|
||||||
fail_unless (gst_element_set_state (pipeline, GST_STATE_PAUSED)
|
fail_unless (gst_element_set_state (pipeline, GST_STATE_PAUSED)
|
||||||
== GST_STATE_CHANGE_NO_PREROLL, "expected no-preroll from live pipeline");
|
== 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_TIME_ARGS (observed), GST_TIME_ARGS (oldobserved));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||||
|
|
||||||
gst_object_unref (sink);
|
gst_object_unref (sink);
|
||||||
gst_object_unref (clock);
|
gst_object_unref (clock);
|
||||||
gst_object_unref (pipeline);
|
gst_object_unref (pipeline);
|
||||||
|
|
Loading…
Reference in a new issue