diff options
author | Wim Taymans <wim.taymans@gmail.com> | 2002-06-17 20:35:22 +0000 |
---|---|---|
committer | Wim Taymans <wim.taymans@gmail.com> | 2002-06-17 20:35:22 +0000 |
commit | a4cb924e2f9c1a3683b13af47c607e75619aac64 (patch) | |
tree | 137d4572776975362c8ce5faee1663c930bb80c2 /tests | |
parent | 29cafb74811cf02a7d9d2c55911714b75a3df87a (diff) | |
download | gstreamer-a4cb924e2f9c1a3683b13af47c607e75619aac64.tar.gz |
Added cothread context stress test (that fails)
Original commit message from CVS:
Added cothread context stress test (that fails)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/sched/Makefile.am | 6 | ||||
-rw-r--r-- | tests/sched/sched-stress.c | 30 |
2 files changed, 34 insertions, 2 deletions
diff --git a/tests/sched/Makefile.am b/tests/sched/Makefile.am index d1479cfedd..cd0a3ee5e1 100644 --- a/tests/sched/Makefile.am +++ b/tests/sched/Makefile.am @@ -1,10 +1,12 @@ if GST_DISABLE_LOADSAVE noinst_PROGRAMS = else -noinst_PROGRAMS = runxml dynamic-pipeline +noinst_PROGRAMS = runxml dynamic-pipeline sched-stress endif -dynamic_pipeline_SOURCES = dynamic-pipeline.c +dynamic_pipeline_SOURCES = dynamic-pipeline.c +sched_stress_SOURCES = sched-stress.c +sched_stress_LDADD = $(GST_LIBS) #-lefence LDADD = $(GST_LIBS) AM_CFLAGS = $(GST_CFLAGS) diff --git a/tests/sched/sched-stress.c b/tests/sched/sched-stress.c new file mode 100644 index 0000000000..4430ab473d --- /dev/null +++ b/tests/sched/sched-stress.c @@ -0,0 +1,30 @@ +#include <gst/gst.h> + +#define TAILLE 100 + +int main (int argc, char *argv[]) +{ + GstElement *bin, *src, *dec, *sink; + int i, j; + + gst_init (&argc, &argv); + + free (malloc (8)); /* -lefence */ + + for(i = 0; i < TAILLE; i++) + { + bin = gst_pipeline_new ("pipeline"); + src = gst_element_factory_make ("fakesrc", "source"); + dec = gst_element_factory_make ("identity", "decoder"); + sink = gst_element_factory_make ("fakesink", "sink"); + gst_bin_add_many (GST_BIN (bin), src, dec, sink, NULL); + gst_element_connect_many (src, dec, sink, NULL); + gst_element_set_state (bin, GST_STATE_PLAYING); + for(j = 0; j < 30; j++) + gst_bin_iterate(GST_BIN(bin)); + gst_element_set_state (bin, GST_STATE_PAUSED); + } + + return 0; +} + |