mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2025-01-10 17:35:59 +00:00
tests/check/gst/gstutils.c: Only events up to the pipeline EOS are counted, there are some more when going to NULL cu...
Original commit message from CVS: * tests/check/gst/gstutils.c: (data_probe), (buffer_probe), (event_probe), (GST_START_TEST): Only events up to the pipeline EOS are counted, there are some more when going to NULL currently which we don't care about for now.
This commit is contained in:
parent
0d8a01f595
commit
8521262f84
2 changed files with 15 additions and 3 deletions
|
@ -1,3 +1,11 @@
|
|||
2006-02-13 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* tests/check/gst/gstutils.c: (data_probe), (buffer_probe),
|
||||
(event_probe), (GST_START_TEST):
|
||||
Only events up to the pipeline EOS are counted, there are
|
||||
some more when going to NULL currently which we don't care
|
||||
about for now.
|
||||
|
||||
2006-02-13 Wim Taymans <wim@fluendo.com>
|
||||
|
||||
* gst/gstpad.c: (gst_pad_send_event):
|
||||
|
|
|
@ -31,6 +31,7 @@ static gboolean
|
|||
data_probe (GstPad * pad, GstMiniObject * obj, gpointer data)
|
||||
{
|
||||
n_data_probes++;
|
||||
GST_DEBUG ("data probe %d", n_data_probes);
|
||||
g_assert (GST_IS_MINI_OBJECT (obj));
|
||||
g_assert (data == SPECIAL_POINTER (0));
|
||||
return TRUE;
|
||||
|
@ -40,6 +41,7 @@ static gboolean
|
|||
buffer_probe (GstPad * pad, GstBuffer * obj, gpointer data)
|
||||
{
|
||||
n_buffer_probes++;
|
||||
GST_DEBUG ("buffer probe %d", n_buffer_probes);
|
||||
g_assert (GST_IS_BUFFER (obj));
|
||||
g_assert (data == SPECIAL_POINTER (1));
|
||||
return TRUE;
|
||||
|
@ -49,6 +51,7 @@ static gboolean
|
|||
event_probe (GstPad * pad, GstEvent * obj, gpointer data)
|
||||
{
|
||||
n_event_probes++;
|
||||
GST_DEBUG ("event probe %d", n_event_probes);
|
||||
g_assert (GST_IS_EVENT (obj));
|
||||
g_assert (data == SPECIAL_POINTER (2));
|
||||
return TRUE;
|
||||
|
@ -84,12 +87,13 @@ GST_START_TEST (test_buffer_probe_n_times)
|
|||
gst_message_unref (message);
|
||||
gst_object_unref (bus);
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_object_unref (pipeline);
|
||||
|
||||
g_assert (n_buffer_probes == 10); /* one for every buffer */
|
||||
g_assert (n_event_probes == 2); /* new segment and eos */
|
||||
g_assert (n_data_probes == 12); /* duh */
|
||||
|
||||
gst_element_set_state (pipeline, GST_STATE_NULL);
|
||||
gst_object_unref (pipeline);
|
||||
|
||||
} GST_END_TEST;
|
||||
|
||||
static int n_data_probes_once = 0;
|
||||
|
|
Loading…
Reference in a new issue