mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-31 20:48:56 +00:00
testsuite/schedulers/: add test for opt breakage in bug #143777
Original commit message from CVS: * testsuite/schedulers/.cvsignore: * testsuite/schedulers/Makefile.am: * testsuite/schedulers/143777-2.c: (main): add test for opt breakage in bug #143777
This commit is contained in:
parent
94821aea61
commit
a0873781bf
7 changed files with 129 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
|||
2004-06-20 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* testsuite/schedulers/.cvsignore:
|
||||
* testsuite/schedulers/Makefile.am:
|
||||
* testsuite/schedulers/143777-2.c: (main):
|
||||
add test for opt breakage in bug #143777
|
||||
|
||||
2004-06-20 Benjamin Otte <otte@gnome.org>
|
||||
|
||||
* gst/gstpad.c: (gst_pad_call_chain_function):
|
||||
|
|
2
tests/old/testsuite/schedulers/.gitignore
vendored
2
tests/old/testsuite/schedulers/.gitignore
vendored
|
@ -5,3 +5,5 @@ unlink_src
|
|||
unref_sink
|
||||
unref_src
|
||||
useless_iteration
|
||||
143777
|
||||
143777-2
|
||||
|
|
58
tests/old/testsuite/schedulers/143777-2.c
Normal file
58
tests/old/testsuite/schedulers/143777-2.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GstElement *src, *sink, *enc, *tee;
|
||||
GstElement *pipeline;
|
||||
int i;
|
||||
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
||||
|
||||
src = gst_element_factory_make ("fakesrc", "src");
|
||||
g_assert (src);
|
||||
tee = gst_element_factory_make ("tee", "tee1");
|
||||
g_assert (tee);
|
||||
enc = gst_element_factory_make ("identity", "enc");
|
||||
g_assert (enc);
|
||||
sink = gst_element_factory_make ("fakesink", "sink");
|
||||
g_assert (sink);
|
||||
|
||||
gst_bin_add_many (GST_BIN (pipeline), src, tee, enc, sink, NULL);
|
||||
if (!gst_element_link_many (src, tee, enc, sink, NULL))
|
||||
g_assert_not_reached ();
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
|
||||
g_assert_not_reached ();
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (!gst_bin_iterate (GST_BIN (pipeline)))
|
||||
g_assert_not_reached ();
|
||||
g_print ("%d\n", i);
|
||||
}
|
||||
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PAUSED) != GST_STATE_SUCCESS)
|
||||
g_assert_not_reached ();
|
||||
gst_element_unlink_many (tee, enc, sink, NULL);
|
||||
gst_bin_remove_many (GST_BIN (pipeline), enc, sink, NULL);
|
||||
|
||||
enc = gst_element_factory_make ("identity", "enc");
|
||||
g_assert (enc);
|
||||
sink = gst_element_factory_make ("fakesink", "sink");
|
||||
g_assert (sink);
|
||||
gst_bin_add_many (GST_BIN (pipeline), enc, sink, NULL);
|
||||
if (!gst_element_link_many (tee, enc, sink, NULL))
|
||||
g_assert_not_reached ();
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
|
||||
g_assert_not_reached ();
|
||||
|
||||
for (i = 5; i < 10; i++) {
|
||||
if (!gst_bin_iterate (GST_BIN (pipeline)))
|
||||
g_assert_not_reached ();
|
||||
g_print ("%d\n", i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -9,7 +9,7 @@ tests_pass = \
|
|||
# don't enable this one unless it actually works.
|
||||
# useless_iteration
|
||||
|
||||
tests_fail =
|
||||
tests_fail = 143777-2
|
||||
tests_ignore =
|
||||
|
||||
unlink_src_SOURCES = unlink.c
|
||||
|
|
2
testsuite/schedulers/.gitignore
vendored
2
testsuite/schedulers/.gitignore
vendored
|
@ -5,3 +5,5 @@ unlink_src
|
|||
unref_sink
|
||||
unref_src
|
||||
useless_iteration
|
||||
143777
|
||||
143777-2
|
||||
|
|
58
testsuite/schedulers/143777-2.c
Normal file
58
testsuite/schedulers/143777-2.c
Normal file
|
@ -0,0 +1,58 @@
|
|||
|
||||
#include <gst/gst.h>
|
||||
|
||||
int
|
||||
main (int argc, char **argv)
|
||||
{
|
||||
GstElement *src, *sink, *enc, *tee;
|
||||
GstElement *pipeline;
|
||||
int i;
|
||||
|
||||
|
||||
gst_init (&argc, &argv);
|
||||
pipeline = gst_element_factory_make ("pipeline", "pipeline");
|
||||
|
||||
src = gst_element_factory_make ("fakesrc", "src");
|
||||
g_assert (src);
|
||||
tee = gst_element_factory_make ("tee", "tee1");
|
||||
g_assert (tee);
|
||||
enc = gst_element_factory_make ("identity", "enc");
|
||||
g_assert (enc);
|
||||
sink = gst_element_factory_make ("fakesink", "sink");
|
||||
g_assert (sink);
|
||||
|
||||
gst_bin_add_many (GST_BIN (pipeline), src, tee, enc, sink, NULL);
|
||||
if (!gst_element_link_many (src, tee, enc, sink, NULL))
|
||||
g_assert_not_reached ();
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
|
||||
g_assert_not_reached ();
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
if (!gst_bin_iterate (GST_BIN (pipeline)))
|
||||
g_assert_not_reached ();
|
||||
g_print ("%d\n", i);
|
||||
}
|
||||
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PAUSED) != GST_STATE_SUCCESS)
|
||||
g_assert_not_reached ();
|
||||
gst_element_unlink_many (tee, enc, sink, NULL);
|
||||
gst_bin_remove_many (GST_BIN (pipeline), enc, sink, NULL);
|
||||
|
||||
enc = gst_element_factory_make ("identity", "enc");
|
||||
g_assert (enc);
|
||||
sink = gst_element_factory_make ("fakesink", "sink");
|
||||
g_assert (sink);
|
||||
gst_bin_add_many (GST_BIN (pipeline), enc, sink, NULL);
|
||||
if (!gst_element_link_many (tee, enc, sink, NULL))
|
||||
g_assert_not_reached ();
|
||||
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
|
||||
g_assert_not_reached ();
|
||||
|
||||
for (i = 5; i < 10; i++) {
|
||||
if (!gst_bin_iterate (GST_BIN (pipeline)))
|
||||
g_assert_not_reached ();
|
||||
g_print ("%d\n", i);
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
|
@ -9,7 +9,7 @@ tests_pass = \
|
|||
# don't enable this one unless it actually works.
|
||||
# useless_iteration
|
||||
|
||||
tests_fail =
|
||||
tests_fail = 143777-2
|
||||
tests_ignore =
|
||||
|
||||
unlink_src_SOURCES = unlink.c
|
||||
|
|
Loading…
Reference in a new issue