summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/Makefile.am11
-rw-r--r--tests/lat.c237
-rw-r--r--tests/muxing/Makefile.am4
-rw-r--r--tests/muxing/case1.c74
-rw-r--r--tests/old/testsuite/Makefile.am2
-rw-r--r--tests/old/testsuite/bytestream/Makefile.am5
-rw-r--r--tests/old/testsuite/bytestream/gstbstest.c419
-rw-r--r--tests/old/testsuite/cleanup/Makefile.am3
-rw-r--r--tests/old/testsuite/cleanup/cleanup3.c68
-rw-r--r--tests/old/testsuite/clock/Makefile.am2
-rw-r--r--tests/old/testsuite/clock/clock1.c1
-rw-r--r--tests/old/testsuite/clock/clock2.c55
-rw-r--r--tests/old/testsuite/dlopen/loadgst.c12
-rw-r--r--tests/old/testsuite/elements/fake.c16
-rw-r--r--tests/old/testsuite/elements/struct_i386.h4
-rw-r--r--tests/old/testsuite/elements/tee.c51
-rw-r--r--tests/old/testsuite/ghostpads/ghostpads.c5
-rw-r--r--tests/old/testsuite/pad/Makefile.am4
-rw-r--r--tests/old/testsuite/pad/chainnopull.c66
-rw-r--r--tests/old/testsuite/pad/getnopush.c14
-rw-r--r--tests/old/testsuite/pad/link.c194
-rw-r--r--tests/old/testsuite/parse/parse1.c2
-rw-r--r--tests/old/testsuite/schedulers/142183-2.c3
-rw-r--r--tests/old/testsuite/schedulers/142183.c94
-rw-r--r--tests/old/testsuite/schedulers/143777-2.c15
-rw-r--r--tests/old/testsuite/schedulers/143777.c10
-rw-r--r--tests/old/testsuite/schedulers/147713.c89
-rw-r--r--tests/old/testsuite/schedulers/147819.c21
-rw-r--r--tests/old/testsuite/schedulers/147894-2.c136
-rw-r--r--tests/old/testsuite/schedulers/147894.c142
-rw-r--r--tests/old/testsuite/schedulers/Makefile.am10
-rw-r--r--tests/old/testsuite/schedulers/group_link.c2
-rw-r--r--tests/old/testsuite/schedulers/queue_link.c3
-rw-r--r--tests/old/testsuite/schedulers/relink.c8
-rw-r--r--tests/old/testsuite/schedulers/unlink.c3
-rw-r--r--tests/old/testsuite/schedulers/unref.c7
-rw-r--r--tests/old/testsuite/schedulers/useless_iteration.c11
-rw-r--r--tests/sched/.gitignore18
-rw-r--r--tests/sched/Makefile.am12
-rw-r--r--tests/sched/dynamic-pipeline.c63
-rw-r--r--tests/sched/interrupt1.c38
-rw-r--r--tests/sched/interrupt2.c42
-rw-r--r--tests/sched/interrupt3.c45
-rwxr-xr-xtests/sched/runtestcases15
-rw-r--r--tests/sched/runxml.c96
-rw-r--r--tests/sched/sched-stress.c29
-rw-r--r--tests/sched/testcases1060
-rw-r--r--tests/sched/testcases1.tc18
-rw-r--r--tests/threadstate/.gitignore18
-rw-r--r--tests/threadstate/Makefile.am4
-rw-r--r--tests/threadstate/test1.c104
-rw-r--r--tests/threadstate/test2.c108
-rw-r--r--tests/threadstate/threadstate1.c41
-rw-r--r--tests/threadstate/threadstate2.c69
-rw-r--r--tests/threadstate/threadstate3.c44
-rw-r--r--tests/threadstate/threadstate4.c52
-rw-r--r--tests/threadstate/threadstate5.c52
57 files changed, 58 insertions, 3673 deletions
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4cf093c462..68cb4fb84a 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,12 +1,5 @@
-SUBDIRS = instantiate memchunk muxing sched threadstate seeking # bufspeed
-
-if GST_DISABLE_TRACE
-LAT =
-else
-LAT = lat
-
-endif
+SUBDIRS = instantiate memchunk seeking # bufspeed
noinst_PROGRAMS = $(LAT) spidey_bench mass_elements
@@ -14,4 +7,4 @@ AM_CFLAGS = $(GST_OBJ_CFLAGS)
LIBS = $(GST_OBJ_LIBS)
EXTRA_DIST = README
-DIST_SUBDIRS= bufspeed instantiate memchunk muxing sched threadstate seeking
+DIST_SUBDIRS= bufspeed instantiate memchunk sched threadstate seeking
diff --git a/tests/lat.c b/tests/lat.c
deleted file mode 100644
index c542b6eb66..0000000000
--- a/tests/lat.c
+++ /dev/null
@@ -1,237 +0,0 @@
-#include <gst/gst.h>
-#include <stdlib.h>
-#include <string.h>
-
-/* FIXME: WTF does this do? */
-
-static guint64 max = 0, min = -1, total = 0;
-static guint count = 0;
-static guint print_del = 1;
-static guint iterations = 0;
-static guint mhz = 0;
-
-void
-handoff_src (GstElement * src, GstBuffer * buf, gpointer user_data)
-{
- gst_trace_read_tsc (&GST_BUFFER_TIMESTAMP (buf));
-}
-
-void
-handoff_sink (GstElement * sink, GstBuffer * buf, gpointer user_data)
-{
- guint64 end, d, avg;
- guint avg_ns;
-
- gst_trace_read_tsc (&end);
- d = end - GST_BUFFER_TIMESTAMP (buf);
- if (d > max)
- max = d;
- if (d < min)
- min = d;
- total += d;
- count++;
- avg = total / count;
- avg_ns = (guint) (1000.0 * (double) avg / (double) mhz);
-
- if ((count % print_del) == 0) {
- g_print ("%07d:%08" G_GUINT64_FORMAT " min:%08" G_GUINT64_FORMAT " max:%08"
- G_GUINT64_FORMAT " avg:%08" G_GUINT64_FORMAT " avg-s:0.%09d\r", count,
- d, min, max, avg, avg_ns);
- }
-}
-
-GstElement *
-identity_add (GstPipeline * pipeline, GstElement * first, int count)
-{
- GstElement *last, *ident;
- int i;
- char buf[20];
-
- last = first;
-
- for (i = 0; i < count; i++) {
- snprintf (buf, 20, "identity_%03d", i);
- ident = gst_element_factory_make ("identity", buf);
- g_return_val_if_fail (ident != NULL, NULL);
- g_object_set (G_OBJECT (ident), "silent", TRUE, NULL);
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (ident));
- gst_pad_link (gst_element_get_pad (last, "src"),
- gst_element_get_pad (ident, "sink"));
- last = ident;
- }
-
- return last;
-}
-
-GstElement *
-fakesrc (void)
-{
- GstElement *src;
-
- src = gst_element_factory_make ("fakesrc", "src");
- g_return_val_if_fail (src != NULL, NULL);
- g_object_set (G_OBJECT (src), "silent", TRUE, NULL);
- g_object_set (G_OBJECT (src), "num_buffers", iterations, NULL);
- g_signal_connect (G_OBJECT (src), "handoff", G_CALLBACK (handoff_src), NULL);
-
- return src;
-}
-
-GstElement *
-fakesink (void)
-{
- GstElement *sink;
-
- sink = gst_element_factory_make ("fakesink", "fakesink");
- g_return_val_if_fail (sink != NULL, NULL);
- g_object_set (G_OBJECT (sink), "silent", TRUE, NULL);
- g_signal_connect (G_OBJECT (sink),
- "handoff", G_CALLBACK (handoff_sink), NULL);
-
- return sink;
-}
-
-GstPipeline *
-simple (int argc, int argi, char *argv[])
-{
- GstPipeline *pipeline;
- GstElement *last, *src, *sink;
- int idents;
-
- if ((argc - argi) < 1) {
- fprintf (stderr, "bad params");
- return NULL;
- }
- idents = atoi (argv[argi]);
- if ((argc - argi) == 2) {
- gst_scheduler_factory_set_default_name (argv[argi + 1]);
- }
-
- pipeline = GST_PIPELINE (gst_pipeline_new ("pipeline"));
- g_return_val_if_fail (pipeline != NULL, NULL);
-
- src = fakesrc ();
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (src));
- last = identity_add (pipeline, src, idents);
- sink = fakesink ();
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (sink));
- gst_pad_link (gst_element_get_pad (last, "src"),
- gst_element_get_pad (sink, "sink"));
-
- return pipeline;
-}
-
-GstPipeline *
-queue (int argc, int argi, char *argv[])
-{
- GstPipeline *pipeline;
- GstElement *last, *src, *sink, *src_thr, *src_q, *sink_q, *sink_thr;
- int idents;
-
- if ((argc - argi) < 1) {
- fprintf (stderr, "bad params");
- return NULL;
- }
- idents = atoi (argv[argi]);
-
- if ((argc - argi) == 2) {
- gst_scheduler_factory_set_default_name (argv[argi + 1]);
- }
-
- pipeline = GST_PIPELINE (gst_pipeline_new ("pipeline"));
- g_return_val_if_fail (pipeline != NULL, NULL);
-
- src_thr = GST_ELEMENT (gst_thread_new ("src_thread"));
- g_return_val_if_fail (src_thr != NULL, NULL);
-
- src = fakesrc ();
- g_return_val_if_fail (src != NULL, NULL);
- gst_bin_add (GST_BIN (src_thr), GST_ELEMENT (src));
-
- src_q = gst_element_factory_make ("queue", "src_q");
- g_return_val_if_fail (src_q != NULL, NULL);
- gst_bin_add (GST_BIN (src_thr), GST_ELEMENT (src_q));
- gst_pad_link (gst_element_get_pad (src, "src"),
- gst_element_get_pad (src_q, "sink"));
-
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (src_thr));
-
- last = identity_add (pipeline, src_q, idents);
-
- sink_q = gst_element_factory_make ("queue", "sink_q");
- g_return_val_if_fail (sink_q != NULL, NULL);
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (sink_q));
- gst_pad_link (gst_element_get_pad (last, "src"),
- gst_element_get_pad (sink_q, "sink"));
-
- sink_thr = GST_ELEMENT (gst_thread_new ("sink_thread"));
- g_return_val_if_fail (sink_thr != NULL, NULL);
-
- sink = fakesink ();
- g_return_val_if_fail (sink != NULL, NULL);
- gst_bin_add (GST_BIN (sink_thr), GST_ELEMENT (sink));
-
- gst_bin_add (GST_BIN (pipeline), GST_ELEMENT (sink_thr));
-
- gst_pad_link (gst_element_get_pad (sink_q, "src"),
- gst_element_get_pad (sink, "sink"));
-
- return pipeline;
-}
-
-struct test
-{
- char *name;
- char *params;
- GstPipeline *(*func) (int argc, int argi, char *argv[]);
-};
-
-static struct test tests[] = {
- {"simple", "ident_count [scheduler_name]", simple},
- {"queue", "ident_count [scheduler_name]", queue},
- {NULL, NULL, NULL}
-};
-
-int
-main (int argc, char *argv[])
-{
- GstPipeline *pipeline;
- int i;
- char *name;
-
- gst_init (&argc, &argv);
-
- if (argc < 3) {
- fprintf (stderr,
- "usage: %s iterations print_del mhz test_name [test_params...]\n",
- argv[0]);
- for (i = 0; tests[i].name; i++) {
- fprintf (stderr, " %s %s\n", tests[i].name, tests[i].params);
- }
- exit (1);
- } else {
- iterations = atoi (argv[1]);
- print_del = atoi (argv[2]);
- mhz = atoi (argv[3]);
- name = argv[4];
- }
-
- pipeline = NULL;
- for (i = 0; tests[i].name && !pipeline; i++) {
- if (!strcmp (name, tests[i].name)) {
- pipeline = tests[i].func (argc, 5, argv);
- }
- }
- g_return_val_if_fail (pipeline != NULL, -1);
-
- /*xmlSaveFile("lat.gst", gst_xml_write(GST_ELEMENT(pipeline))); */
-
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
-
- while (count < iterations) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
- g_print ("\n");
-
- return 0;
-}
diff --git a/tests/muxing/Makefile.am b/tests/muxing/Makefile.am
deleted file mode 100644
index 96e5ea6123..0000000000
--- a/tests/muxing/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-noinst_PROGRAMS = case1
-
-LDADD = $(GST_OBJ_LIBS)
-AM_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/muxing/case1.c b/tests/muxing/case1.c
deleted file mode 100644
index 27e940e27b..0000000000
--- a/tests/muxing/case1.c
+++ /dev/null
@@ -1,74 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-gboolean playing = TRUE;
-
-static void
-handoff_signal (GstElement * element, GstBuffer * buf)
-{
- g_print ("handoff \"%s\" %" G_GINT64_FORMAT "\n",
- gst_element_get_name (element), GST_BUFFER_TIMESTAMP (buf));
-}
-
-static void
-eos_signal (GstElement * element)
-{
- g_print ("eos received from \"%s\"\n", gst_element_get_name (element));
-
- playing = FALSE;
-}
-
-int
-main (int argc, char *argv[])
-{
- GstBin *pipeline;
- GstElement *src, *tee, *identity1, *identity2, *aggregator, *sink;
-
- gst_init (&argc, &argv);
-
- pipeline = GST_BIN (gst_pipeline_new ("pipeline"));
- g_return_val_if_fail (pipeline != NULL, 1);
-
- src = gst_element_factory_make ("fakesrc", "src");
- g_object_set (G_OBJECT (src), "num_buffers", 40, NULL);
- g_return_val_if_fail (src != NULL, 2);
- tee = gst_element_factory_make ("tee", "tee");
- g_return_val_if_fail (tee != NULL, 3);
- identity1 = gst_element_factory_make ("identity", "identity0");
- g_return_val_if_fail (identity1 != NULL, 3);
- identity2 = gst_element_factory_make ("identity", "identity1");
- g_object_set (G_OBJECT (identity2), "duplicate", 2, NULL);
- g_object_set (G_OBJECT (identity2), "loop_based", TRUE, NULL);
- g_return_val_if_fail (identity2 != NULL, 3);
- aggregator = gst_element_factory_make ("aggregator", "aggregator");
- g_object_set (G_OBJECT (aggregator), "sched", 4, NULL);
- g_return_val_if_fail (aggregator != NULL, 3);
- sink = gst_element_factory_make ("fakesink", "sink");
- g_return_val_if_fail (sink != NULL, 4);
-
- gst_bin_add_many (pipeline, src, tee, identity1, identity2, aggregator, sink,
- NULL);
-
- gst_element_link_pads (src, "src", tee, "sink");
- gst_pad_link (gst_element_get_request_pad (tee, "src%d"),
- gst_element_get_pad (identity1, "sink"));
- gst_pad_link (gst_element_get_request_pad (tee, "src%d"),
- gst_element_get_pad (identity2, "sink"));
- gst_pad_link (gst_element_get_pad (identity1, "src"),
- gst_element_get_request_pad (aggregator, "sink%d"));
- gst_pad_link (gst_element_get_pad (identity2, "src"),
- gst_element_get_request_pad (aggregator, "sink%d"));
- gst_element_link_pads (aggregator, "src", sink, "sink");
-
- g_signal_connect (G_OBJECT (src), "eos", G_CALLBACK (eos_signal), NULL);
- g_signal_connect (G_OBJECT (sink), "handoff",
- G_CALLBACK (handoff_signal), NULL);
-
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_PLAYING);
-
- while (gst_bin_iterate (pipeline));
-
- gst_element_set_state (GST_ELEMENT (pipeline), GST_STATE_NULL);
-
- exit (0);
-}
diff --git a/tests/old/testsuite/Makefile.am b/tests/old/testsuite/Makefile.am
index df8249a062..16a2b7dab1 100644
--- a/tests/old/testsuite/Makefile.am
+++ b/tests/old/testsuite/Makefile.am
@@ -19,7 +19,7 @@ SUBDIRS = \
dlopen dynparams \
elements ghostpads indexers negotiation pad \
$(GST_PARSE_DIRS) \
- plugin refcounting schedulers states tags threads
+ plugin refcounting schedulers states tags
DIST_SUBDIRS = \
bins bytestream caps childproxy cleanup clock \
diff --git a/tests/old/testsuite/bytestream/Makefile.am b/tests/old/testsuite/bytestream/Makefile.am
index 790dca8d84..28db18d0b3 100644
--- a/tests/old/testsuite/bytestream/Makefile.am
+++ b/tests/old/testsuite/bytestream/Makefile.am
@@ -1,11 +1,8 @@
include ../Rules
tests_pass = filepadsink
-tests_fail = test1
+tests_fail =
tests_ignore =
-test1_SOURCES = test1.c gstbstest.c
-test1_LDFLAGS = $(top_builddir)/libs/gst/bytestream/libgstbytestream.la
-
filepadsink_CFLAGS = $(AM_CFLAGS) -DTHE_FILE=\""$(top_srcdir)/configure.ac"\"
filepadsink_LDFLAGS = $(top_builddir)/libs/gst/bytestream/libgstbytestream.la
diff --git a/tests/old/testsuite/bytestream/gstbstest.c b/tests/old/testsuite/bytestream/gstbstest.c
deleted file mode 100644
index 3eb6ae4437..0000000000
--- a/tests/old/testsuite/bytestream/gstbstest.c
+++ /dev/null
@@ -1,419 +0,0 @@
-/* GStreamer
- * Copyright (C) 1999,2000 Erik Walthinsen <omega@cse.ogi.edu>
- * 2000 Wim Taymans <wtay@chello.be>
- *
- * gstbstest.c:
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#ifdef HAVE_CONFIG_H
-#include "config.h"
-#endif
-#include <stdlib.h>
-#include <string.h>
-
-#include <gst/gst.h>
-#include <gst/bytestream/bytestream.h>
-
-#define GST_TYPE_BSTEST (gst_bstest_get_type())
-#define GST_BSTEST(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_BSTEST,GstBsTest))
-#define GST_BSTEST_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_BSTEST,GstBsTestClass))
-#define GST_IS_BSTEST(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_BSTEST))
-#define GST_IS_BSTEST_CLASS(obj) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_BSTEST))
-
-typedef struct _GstBsTest GstBsTest;
-typedef struct _GstBsTestClass GstBsTestClass;
-
-struct _GstBsTest
-{
- GstElement element;
-
- GstPad *sinkpad;
- GstPad *srcpad;
-
- GstByteStream *bs;
-
- gchar *accesspattern;
- guint num_patterns;
- gchar **patterns;
- guint sizemin;
- guint sizemax;
- gint count;
- gboolean silent;
-};
-
-struct _GstBsTestClass
-{
- GstElementClass parent_class;
-};
-
-GType gst_bstest_get_type (void);
-
-
-GstElementDetails gst_bstest_details = GST_ELEMENT_DETAILS ("ByteStreamTest",
- "Filter",
- "Test for the GstByteStream code",
- "Erik Walthinsen <omega@temple-baptist.com>, "
- "Wim Taymans <wim.taymans@chello.be>");
-
-
-/* BsTest signals and args */
-enum
-{
- /* FILL ME */
- LAST_SIGNAL
-};
-
-enum
-{
- ARG_0,
- ARG_SIZEMIN,
- ARG_SIZEMAX,
- ARG_COUNT,
- ARG_SILENT,
- ARG_ACCESSPATTERN,
-};
-
-
-static void gst_bstest_base_init (gpointer g_class);
-static void gst_bstest_class_init (GstBsTestClass * klass);
-static void gst_bstest_init (GstBsTest * bstest);
-
-static void gst_bstest_set_property (GObject * object, guint prop_id,
- const GValue * value, GParamSpec * pspec);
-static void gst_bstest_get_property (GObject * object, guint prop_id,
- GValue * value, GParamSpec * pspec);
-
-static GstElementStateReturn gst_bstest_change_state (GstElement * element);
-static void gst_bstest_loop (GstElement * element);
-
-static GstElementClass *parent_class = NULL;
-
-/* static guint gst_bstest_signals[LAST_SIGNAL] = { 0 }; */
-
-GType
-gst_bstest_get_type (void)
-{
- static GType bstest_type = 0;
-
- if (!bstest_type) {
- static const GTypeInfo bstest_info = {
- sizeof (GstBsTestClass),
- gst_bstest_base_init,
- NULL,
- (GClassInitFunc) gst_bstest_class_init,
- NULL,
- NULL,
- sizeof (GstBsTest),
- 0,
- (GInstanceInitFunc) gst_bstest_init,
- };
-
- bstest_type =
- g_type_register_static (GST_TYPE_ELEMENT, "BSTest", &bstest_info, 0);
- }
- return bstest_type;
-}
-static void
-gst_bstest_base_init (gpointer g_class)
-{
- GstElementClass *gstelement_class = GST_ELEMENT_CLASS (g_class);
-
- gst_element_class_set_details (gstelement_class, &gst_bstest_details);
-}
-
-static void
-gst_bstest_class_init (GstBsTestClass * klass)
-{
- GObjectClass *gobject_class;
- GstElementClass *gstelement_class;
-
- gobject_class = (GObjectClass *) klass;
- gstelement_class = (GstElementClass *) klass;
-
- parent_class = g_type_class_ref (GST_TYPE_ELEMENT);
-
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SIZEMIN,
- g_param_spec_int ("sizemin", "sizemin", "sizemin", 0, G_MAXINT,
- 0, G_PARAM_READWRITE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SIZEMAX,
- g_param_spec_int ("sizemax", "sizemax", "sizemax", 0, G_MAXINT,
- 384, G_PARAM_READWRITE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_ACCESSPATTERN,
- g_param_spec_string ("accesspattern", "accesspattern", "accesspattern",
- "r", G_PARAM_READWRITE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_COUNT,
- g_param_spec_uint ("count", "count", "count",
- 0, G_MAXUINT, 0, G_PARAM_READWRITE));
- g_object_class_install_property (G_OBJECT_CLASS (klass), ARG_SILENT,
- g_param_spec_boolean ("silent", "silent", "silent",
- FALSE, G_PARAM_READWRITE));
-
- gobject_class->set_property = GST_DEBUG_FUNCPTR (gst_bstest_set_property);
- gobject_class->get_property = GST_DEBUG_FUNCPTR (gst_bstest_get_property);
-
- gstelement_class->change_state = gst_bstest_change_state;
-
-}
-
-static GstCaps *
-gst_bstest_getcaps (GstPad * pad)
-{
- GstBsTest *bstest = GST_BSTEST (gst_pad_get_parent (pad));
- GstPad *otherpad;
-
- otherpad = (pad == bstest->srcpad) ? bstest->sinkpad : bstest->srcpad;
-
- return gst_pad_get_allowed_caps (otherpad);
-}
-
-GstStaticPadTemplate srctemplate = GST_STATIC_PAD_TEMPLATE ("src",
- GST_PAD_SRC,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS_ANY);
-
-GstStaticPadTemplate sinktemplate = GST_STATIC_PAD_TEMPLATE ("sink",
- GST_PAD_SINK,
- GST_PAD_ALWAYS,
- GST_STATIC_CAPS_ANY);
-
-static void
-gst_bstest_init (GstBsTest * bstest)
-{
- bstest->sinkpad =
- gst_pad_new_from_template (gst_static_pad_template_get (&sinktemplate),
- "sink");
- gst_element_add_pad (GST_ELEMENT (bstest), bstest->sinkpad);
- gst_pad_set_getcaps_function (bstest->sinkpad, gst_bstest_getcaps);
-
- bstest->srcpad =
- gst_pad_new_from_template (gst_static_pad_template_get (&srctemplate),
- "src");
- gst_element_add_pad (GST_ELEMENT (bstest), bstest->srcpad);
- gst_pad_set_getcaps_function (bstest->srcpad, gst_bstest_getcaps);
-
- gst_element_set_loop_function (GST_ELEMENT (bstest), gst_bstest_loop);
-
- bstest->sizemin = 0;
- bstest->sizemax = 384;
- bstest->accesspattern = g_strdup ("r");
- bstest->patterns = g_strsplit (bstest->accesspattern, ":", 0);
- bstest->count = 5;
- bstest->silent = FALSE;
- bstest->bs = NULL;
-}
-
-static guint
-gst_bstest_get_size (GstBsTest * bstest, gchar * sizestring, guint prevsize)
-{
- guint size;
-
- if (sizestring[0] == 0) {
- size = bstest->sizemax;
- } else if (sizestring[0] == 'r') {
- size =
- bstest->sizemin +
- (guint8) (((gfloat) bstest->sizemax) * rand () / (RAND_MAX +
- (gfloat) bstest->sizemin));
- } else if (sizestring[0] == '<') {
- size = prevsize;
- } else {
- size = atoi (sizestring);
- }
-
- if (size == 0)
- size++;
-
- return size;
-}
-
-static void
-gst_bstest_loop (GstElement * element)
-{
- GstBsTest *bstest;
- GstBuffer *buf = NULL;
-
- g_return_if_fail (element != NULL);
- g_return_if_fail (GST_IS_BSTEST (element));
-
- bstest = GST_BSTEST (element);
-
- do {
- guint size = 0;
- guint i = 0;
- guint8 *ptr;
-
- while (i < bstest->num_patterns) {
- buf = NULL;
-
- if (bstest->patterns[i][0] == 'r') {
- size = gst_bstest_get_size (bstest, &bstest->patterns[i][1], size);
- if (!bstest->silent)
- g_print ("bstest: ***** read %d bytes\n", size);
- gst_bytestream_read (bstest->bs, &buf, size);
- } else if (bstest->patterns[i][0] == 'f') {
- size = gst_bstest_get_size (bstest, &bstest->patterns[i][1], size);
- if (!bstest->silent)
- g_print ("bstest: ***** flush %d bytes\n", size);
- gst_bytestream_flush (bstest->bs, size);
- } else if (!strncmp (bstest->patterns[i], "pb", 2)) {
- size = gst_bstest_get_size (bstest, &bstest->patterns[i][2], size);
- if (!bstest->silent)
- g_print ("bstest: ***** peek bytes %d bytes\n", size);
- gst_bytestream_peek_bytes (bstest->bs, &ptr, size);
- } else if (bstest->patterns[i][0] == 'p') {
- size = gst_bstest_get_size (bstest, &bstest->patterns[i][1], size);
- if (!bstest->silent)
- g_print ("bstest: ***** peek %d bytes\n", size);
- gst_bytestream_peek (bstest->bs, &buf, size);
- gst_buffer_unref (buf);
- buf = NULL;
- }
-
- if (buf)
- gst_pad_push (bstest->srcpad, GST_DATA (buf));
-
- i++;
- }
-/* } while (!GST_ELEMENT_IS_COTHREAD_STOPPING (element)); */
-
- } while (0);
-}
-
-static void
-gst_bstest_set_property (GObject * object, guint prop_id, const GValue * value,
- GParamSpec * pspec)
-{
- GstBsTest *bstest;
-
- /* it's not null if we got it, but it might not be ours */
- g_return_if_fail (GST_IS_BSTEST (object));
-
- bstest = GST_BSTEST (object);
-
- switch (prop_id) {
- case ARG_SIZEMIN:
- bstest->sizemin = g_value_get_int (value);
- break;
- case ARG_SIZEMAX:
- bstest->sizemax = g_value_get_int (value);
- break;
- case ARG_ACCESSPATTERN:
- if (bstest->accesspattern) {
- g_free (bstest->accesspattern);
- g_strfreev (bstest->patterns);
- }
- if (g_value_get_string (value) == NULL) {
- gst_element_set_state (GST_ELEMENT (object), GST_STATE_NULL);
- bstest->accesspattern = NULL;
- bstest->num_patterns = 0;
- } else {
- guint i = 0;
-
- bstest->accesspattern = g_strdup (g_value_get_string (value));
- bstest->patterns = g_strsplit (bstest->accesspattern, ":", 0);
- while (bstest->patterns[i++]);
- bstest->num_patterns = i - 1;
- }
- break;
- case ARG_COUNT:
- bstest->count = g_value_get_uint (value);
- break;
- case ARG_SILENT:
- bstest->silent = g_value_get_boolean (value);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static void
-gst_bstest_get_property (GObject * object, guint prop_id, GValue * value,
- GParamSpec * pspec)
-{
- GstBsTest *bstest;
-
- /* it's not null if we got it, but it might not be ours */
- g_return_if_fail (GST_IS_BSTEST (object));
-
- bstest = GST_BSTEST (object);
-
- switch (prop_id) {
- case ARG_SIZEMIN:
- g_value_set_int (value, bstest->sizemin);
- break;
- case ARG_SIZEMAX:
- g_value_set_int (value, bstest->sizemax);
- break;
- case ARG_ACCESSPATTERN:
- g_value_set_string (value, bstest->accesspattern);
- break;
- case ARG_COUNT:
- g_value_set_uint (value, bstest->count);
- break;
- case ARG_SILENT:
- g_value_set_boolean (value, bstest->silent);
- break;
- default:
- G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
- break;
- }
-}
-
-static GstElementStateReturn
-gst_bstest_change_state (GstElement * element)
-{
- GstBsTest *bstest;
-
- g_return_val_if_fail (GST_IS_BSTEST (element), GST_STATE_FAILURE);
-
- bstest = GST_BSTEST (element);
-
- if (GST_STATE_PENDING (element) == GST_STATE_NULL) {
- if (bstest->bs) {
- gst_bytestream_destroy (bstest->bs);
- bstest->bs = NULL;
- }
- } else {
- if (!bstest->bs) {
- bstest->bs = gst_bytestream_new (bstest->sinkpad);
- }
- }
-
- if (GST_ELEMENT_CLASS (parent_class)->change_state)
- return GST_ELEMENT_CLASS (parent_class)->change_state (element);
-
- return GST_STATE_SUCCESS;
-}
-
-static gboolean
-plugin_init (GstPlugin * plugin)
-{
- /* We need to create an ElementFactory for each element we provide.
- * This consists of the name of the element, the GType identifier,
- * and a pointer to the details structure at the top of the file.
- */
- return gst_element_register (plugin, "bstest", GST_RANK_PRIMARY,
- GST_TYPE_BSTEST);
-}
-
-GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
- GST_VERSION_MINOR,
- "bstest",
- "test for the bytestream element",
- plugin_init, VERSION, GST_LICENSE, GST_PACKAGE, GST_ORIGIN)
diff --git a/tests/old/testsuite/cleanup/Makefile.am b/tests/old/testsuite/cleanup/Makefile.am
index ba1e603d54..c8affe9f72 100644
--- a/tests/old/testsuite/cleanup/Makefile.am
+++ b/tests/old/testsuite/cleanup/Makefile.am
@@ -2,6 +2,3 @@ include ../Rules
tests_pass = cleanup1 cleanup2 cleanup4 cleanup5
tests_fail =
-
-# cleanup3 fails depending on the machine
-tests_ignore = cleanup3
diff --git a/tests/old/testsuite/cleanup/cleanup3.c b/tests/old/testsuite/cleanup/cleanup3.c
deleted file mode 100644
index 37498ba2b6..0000000000
--- a/tests/old/testsuite/cleanup/cleanup3.c
+++ /dev/null
@@ -1,68 +0,0 @@
-#include <gst/gst.h>
-
-static GstElement *
-create_pipeline (void)
-{
- GstElement *fakesrc, *fakesink;
- GstElement *pipeline;
- GstElement *thread, *queue;
-
- pipeline = gst_pipeline_new ("main_pipeline");
-
- fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
- thread = gst_thread_new ("thread");
- fakesink = gst_element_factory_make ("fakesink", "fakesink");
- queue = gst_element_factory_make ("queue", "queue");
- gst_bin_add (GST_BIN (thread), fakesink);
- gst_bin_add (GST_BIN (thread), queue);
- gst_element_link (queue, fakesink);
- gst_element_add_ghost_pad (thread, gst_element_get_pad (queue, "sink"),
- "sink");
-
- gst_element_link (fakesrc, thread);
-
- gst_bin_add (GST_BIN (pipeline), fakesrc);
- gst_bin_add (GST_BIN (pipeline), thread);
-
- g_object_set (G_OBJECT (fakesrc), "num_buffers", 5, NULL);
-
- return pipeline;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- GstElement *pipeline;
- gint i = 10000;
- gint step = 100;
-
- free (malloc (8)); /* -lefence */
-
- gst_init (&argc, &argv);
-
-
- g_mem_chunk_info ();
- while (i--) {
- if (i % step == 0)
- fprintf (stderr, "%10d\r", i);
- pipeline = create_pipeline ();
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- while (gst_bin_iterate (GST_BIN (pipeline)));
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- while (gst_bin_iterate (GST_BIN (pipeline)));
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
-
- gst_object_unref (GST_OBJECT (pipeline));
- }
- fprintf (stderr, "\n");
- g_mem_chunk_info ();
-
- return 0;
-}
diff --git a/tests/old/testsuite/clock/Makefile.am b/tests/old/testsuite/clock/Makefile.am
index d7ed02ba05..c455f2b7c6 100644
--- a/tests/old/testsuite/clock/Makefile.am
+++ b/tests/old/testsuite/clock/Makefile.am
@@ -1,5 +1,5 @@
include ../Rules
-tests_pass = signedness clock1 clock2
+tests_pass = signedness clock1
tests_fail =
tests_ignore =
diff --git a/tests/old/testsuite/clock/clock1.c b/tests/old/testsuite/clock/clock1.c
index 7aa9856457..d6cdea820e 100644
--- a/tests/old/testsuite/clock/clock1.c
+++ b/tests/old/testsuite/clock/clock1.c
@@ -26,6 +26,7 @@ main (int argc, char *argv[])
g_print ("Could not create a fakesrc element !\n");
return 1;
}
+ g_object_set (G_OBJECT (src), "num-buffers", 1, NULL);
if ((id = gst_element_factory_make ("identity", "filter")) == NULL) {
g_print ("Could not create a identity element !\n");
return 1;
diff --git a/tests/old/testsuite/clock/clock2.c b/tests/old/testsuite/clock/clock2.c
deleted file mode 100644
index 303b9c20f4..0000000000
--- a/tests/old/testsuite/clock/clock2.c
+++ /dev/null
@@ -1,55 +0,0 @@
-/*
- * testsuite program to test clock behaviour
- *
- * creates a fakesrc ! identity ! fakesink pipeline
- * registers a callback on fakesrc and one on fakesink
- * also register a normal GLib timeout which should not be reached
- */
-
-#include <gst/gst.h>
-void
-gst_clock_debug (GstClock * clock, GstElement * fakesink)
-{
- g_print ("Clock info: time %" G_GUINT64_FORMAT " - Element info: time %"
- G_GUINT64_FORMAT "\n", gst_clock_get_time (clock),
- gst_element_get_time (fakesink));
-}
-
-int
-main (int argc, char *argv[])
-{
- GstClock *clock = NULL;
- GstElement *pipeline, *fakesrc, *fakesink;
-
- gst_init (&argc, &argv);
-
- clock = gst_system_clock_obtain ();
- g_assert (clock != NULL);
-
- /* we check the time on an element */
- fakesrc = gst_element_factory_make ("fakesrc", NULL);
- g_assert (fakesrc);
- fakesink = gst_element_factory_make ("fakesink", NULL);
- g_assert (fakesink);
- pipeline = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline);
- gst_bin_add_many (GST_BIN (pipeline), fakesink, fakesrc, NULL);
- gst_element_link (fakesrc, fakesink);
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- gst_clock_debug (clock, fakesink);
- g_usleep (G_USEC_PER_SEC);
- gst_clock_debug (clock, fakesink);
-
- gst_element_wait (fakesink, 2 * GST_SECOND);
- gst_clock_debug (clock, fakesink);
-
- gst_element_wait (fakesink, 5 * GST_SECOND);
- gst_clock_debug (clock, fakesink);
-
- g_usleep (G_USEC_PER_SEC);
- gst_clock_debug (clock, fakesink);
-
- /* success */
- return 0;
-}
diff --git a/tests/old/testsuite/dlopen/loadgst.c b/tests/old/testsuite/dlopen/loadgst.c
index 9bfbd0a12c..f7d0c70541 100644
--- a/tests/old/testsuite/dlopen/loadgst.c
+++ b/tests/old/testsuite/dlopen/loadgst.c
@@ -6,23 +6,15 @@ void
do_test (void)
{
GstElement *pipeline;
- int i;
- gboolean ret;
gst_init (NULL, NULL);
- pipeline = gst_parse_launch ("fakesrc ! fakesink", NULL);
+ pipeline = gst_parse_launch ("fakesrc num-buffers=100 ! fakesink", NULL);
g_assert (pipeline != NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- for (i = 0; i < 100; i++) {
- ret = gst_bin_iterate (GST_BIN (pipeline));
- g_assert (ret);
- g_print ("%s", (i & 1) ? "+" : "-");
- }
- g_print ("\n");
+ gst_bin_iterate (GST_BIN (pipeline));
gst_object_unref (GST_OBJECT (pipeline));
}
diff --git a/tests/old/testsuite/elements/fake.c b/tests/old/testsuite/elements/fake.c
index 43e4c33e3a..ef65afc21f 100644
--- a/tests/old/testsuite/elements/fake.c
+++ b/tests/old/testsuite/elements/fake.c
@@ -46,9 +46,9 @@ main (int argc, char *argv[])
g_print ("Creating elements\n");
if (!(src = element_create ("src", "fakesrc")))
return 1;
- g_object_set (G_OBJECT (src), "sizetype", 2, NULL);
if (!(sink = element_create ("sink", "fakesink")))
return 1;
+ g_object_set (G_OBJECT (src), "sizetype", 2, "num-buffers", 100, NULL);
/* add */
g_print ("Adding elements to bin\n");
@@ -59,13 +59,6 @@ main (int argc, char *argv[])
g_print ("Linking elements\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
- /* we expect this to give an error */
- if (gst_bin_iterate (GST_BIN (pipeline)) != FALSE) {
- g_warning
- ("Iterating a bin with unlinked elements should return FALSE !\n");
- retval = 1;
- }
-
gst_pad_link (gst_element_get_pad (src, "src"),
gst_element_get_pad (sink, "sink"));
@@ -73,12 +66,7 @@ main (int argc, char *argv[])
g_print ("Doing 1 iteration\n");
gst_element_set_state (pipeline, GST_STATE_PLAYING);
- /* we expect this to work */
- if (gst_bin_iterate (GST_BIN (pipeline)) != TRUE) {
- g_error ("Iterating a bin with linked elements should return TRUE !\n");
- retval = 1;
- }
-
+ gst_bin_iterate (GST_BIN (pipeline));
g_print ("Done !\n");
return retval;
}
diff --git a/tests/old/testsuite/elements/struct_i386.h b/tests/old/testsuite/elements/struct_i386.h
index 92af51140f..4f817d3994 100644
--- a/tests/old/testsuite/elements/struct_i386.h
+++ b/tests/old/testsuite/elements/struct_i386.h
@@ -86,10 +86,6 @@ Struct list[] = {
,
{"GstTagSetterIFace", sizeof (GstTagSetterIFace), 8}
,
- {"GstThread", sizeof (GstThread), 196}
- ,
- {"GstThreadClass", sizeof (GstThreadClass), 332}
- ,
{"GstTrace", sizeof (GstTrace), 20}
,
{"GstTraceEntry", sizeof (GstTraceEntry), 128}
diff --git a/tests/old/testsuite/elements/tee.c b/tests/old/testsuite/elements/tee.c
index 9f4a528e6b..90dff4b73b 100644
--- a/tests/old/testsuite/elements/tee.c
+++ b/tests/old/testsuite/elements/tee.c
@@ -64,7 +64,7 @@ main (int argc, char *argv[])
return 1;
if (!(src = element_create ("src", "fakesrc")))
return 1;
- g_object_set (G_OBJECT (src), "sizetype", 2, NULL);
+ g_object_set (G_OBJECT (src), "sizetype", 2, "num-buffers", 100, NULL);
if (!(sink1 = element_create ("sink1", "fakesink")))
return 1;
if (!(sink2 = element_create ("sink2", "fakesink")))
@@ -103,54 +103,9 @@ main (int argc, char *argv[])
gst_element_set_state (pipeline, GST_STATE_PLAYING);
gst_bin_iterate (GST_BIN (pipeline));
- /* We don't allow apps to call gst_pad_try_set_caps(). */
-#if 0
- /* now we try setting caps on the src pad */
- /* FIXME: should we set to pause here ? */
- src_caps = gst_caps_from_string ("audio/raw, format=(s)\"int\", "
- "rate=(i)44100");
-
- g_assert (src_caps != NULL);
- g_print ("Setting caps on fakesrc's src pad\n");
- pad = gst_element_get_pad (src, "src");
- if ((gst_pad_try_set_caps (pad, src_caps)) <= 0) {
- g_print ("Could not set caps !\n");
- }
-
- /* now iterate and see if it proxies caps ok */
- gst_bin_iterate (GST_BIN (pipeline));
- sink_caps = gst_pad_get_caps (gst_element_get_pad (sink1, "sink"));
- if (sink_caps && gst_caps_is_fixed (sink_caps)) {
- structure = gst_caps_get_structure (sink_caps, 0);
- } else {
- structure = NULL;
- g_print ("sink_caps is not fixed\n");
- }
- if (structure == NULL || !(gst_structure_has_field (structure, "rate"))) {
- g_print ("Hm, rate has not been propagated to sink1.\n");
- return 1;
- } else {
- int rate;
-
- gst_structure_get_int (structure, "rate", &rate);
- g_print ("Rate of pad on sink1 : %d\n", rate);
- }
- sink_caps = gst_pad_get_caps (gst_element_get_pad (sink2, "sink"));
- structure = gst_caps_get_structure (sink_caps, 0);
- if (structure != NULL && !(gst_structure_has_field (structure, "rate"))) {
- g_print ("Hm, rate has not been propagated to sink2.\n");
- return 1;
- } else {
- int rate;
-
- gst_structure_get_int (structure, "rate", &rate);
- g_print ("Rate of pad on sink2 : %d\n", rate);
- }
-#endif
-
/* remove the first one, iterate */
g_print ("Removing first sink\n");
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ gst_element_set_state (pipeline, GST_STATE_READY);
gst_pad_unlink (tee_src1, gst_element_get_pad (sink1, "sink"));
gst_bin_remove (GST_BIN (pipeline), sink1);
@@ -161,7 +116,7 @@ main (int argc, char *argv[])
/* request another pad */
g_print ("Requesting third pad\n");
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
+ gst_element_set_state (pipeline, GST_STATE_READY);
/* in 0.3.2 the next statement gives an assert error */
tee_src1 = gst_element_get_request_pad (tee, "src%d");
diff --git a/tests/old/testsuite/ghostpads/ghostpads.c b/tests/old/testsuite/ghostpads/ghostpads.c
index 7d87782c61..3fc7569953 100644
--- a/tests/old/testsuite/ghostpads/ghostpads.c
+++ b/tests/old/testsuite/ghostpads/ghostpads.c
@@ -31,6 +31,7 @@ main (gint argc, gchar * argv[])
pipeline = gst_element_factory_make ("pipeline", NULL);
bin = gst_element_factory_make ("bin", NULL);
fakesrc = gst_element_factory_make ("fakesrc", NULL);
+ g_object_set (fakesrc, "num-buffers", 100, NULL);
fakesink = gst_element_factory_make ("fakesink", NULL);
identity = gst_element_factory_make ("identity", NULL);
@@ -45,9 +46,7 @@ main (gint argc, gchar * argv[])
gst_element_link_many (fakesrc, bin, fakesink, NULL);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
- if (!gst_bin_iterate (GST_BIN (pipeline)))
- g_assert_not_reached ();
-
+ gst_bin_iterate (GST_BIN (pipeline));
gst_element_set_state (pipeline, GST_STATE_NULL);
/* test the cleanup */
diff --git a/tests/old/testsuite/pad/Makefile.am b/tests/old/testsuite/pad/Makefile.am
index cb6e84155d..db510f3ede 100644
--- a/tests/old/testsuite/pad/Makefile.am
+++ b/tests/old/testsuite/pad/Makefile.am
@@ -1,5 +1,5 @@
include ../Rules
-tests_pass = link
-tests_fail = chainnopull getnopush
+tests_pass =
+tests_fail = getnopush
tests_ignore =
diff --git a/tests/old/testsuite/pad/chainnopull.c b/tests/old/testsuite/pad/chainnopull.c
deleted file mode 100644
index ed83dfc044..0000000000
--- a/tests/old/testsuite/pad/chainnopull.c
+++ /dev/null
@@ -1,66 +0,0 @@
-/*
- * this tests that chain-based pads don't pull.
- */
-
-#include <gst/gst.h>
-
-typedef struct _GstTestSink
-{
- GstElement parent;
- GstPad *sinkpad;
-} GstTestSink;
-
-typedef GstElementClass GstTestSinkClass;
-
-static void
-gst_test_sink_class_init (GstTestSinkClass * klass)
-{
-}
-
-static void
-gst_test_sink_base_init (gpointer klass)
-{
-}
-
-static void
-gst_test_sink_chain (GstPad * pad, GstData * data)
-{
- data = gst_pad_pull (pad);
-}
-
-static void
-gst_test_sink_init (GstTestSink * sink)
-{
- sink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
- gst_pad_set_chain_function (sink->sinkpad, gst_test_sink_chain);
- gst_element_add_pad (GST_ELEMENT (sink), sink->sinkpad);
-}
-
-GST_BOILERPLATE (GstTestSink, gst_test_sink, GstElement, GST_TYPE_ELEMENT);
-
-int
-main (int argc, char *argv[])
-{
- GstElement *pipeline, *fakesrc, *testsink;
- gint n;
-
- gst_init (&argc, &argv);
-
- pipeline = gst_pipeline_new ("p");
- fakesrc = gst_element_factory_make ("fakesrc", "src");
- testsink = g_object_new (gst_test_sink_get_type (), NULL);
- gst_object_set_name (GST_OBJECT (testsink), "sink");
- gst_bin_add_many (GST_BIN (pipeline), fakesrc, testsink, NULL);
- gst_element_link (fakesrc, testsink);
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- for (n = 0; n < 100; n++) {
- if (!gst_bin_iterate (GST_BIN (pipeline)))
- break;
- }
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
- gst_object_unref (GST_OBJECT (pipeline));
-
- return 0;
-}
diff --git a/tests/old/testsuite/pad/getnopush.c b/tests/old/testsuite/pad/getnopush.c
index 7041c90983..ed0eb21c90 100644
--- a/tests/old/testsuite/pad/getnopush.c
+++ b/tests/old/testsuite/pad/getnopush.c
@@ -22,13 +22,13 @@ gst_test_src_base_init (gpointer klass)
}
static GstData *
-gst_test_src_get (GstPad * pad)
+gst_test_src_get (GstAction * action, GstRealPad * pad)
{
GstEvent *event;
event = gst_event_new (GST_EVENT_INTERRUPT);
gst_event_ref (event);
- gst_pad_push (pad, GST_DATA (event));
+ gst_pad_push (GST_PAD (pad), GST_DATA (event));
return GST_DATA (event);
}
@@ -37,7 +37,8 @@ static void
gst_test_src_init (GstTestSrc * src)
{
src->srcpad = gst_pad_new ("src", GST_PAD_SRC);
- gst_pad_set_get_function (src->srcpad, gst_test_src_get);
+ gst_src_pad_set_action_handler (src->srcpad, gst_test_src_get);
+ gst_real_pad_set_initially_active (GST_REAL_PAD (src->srcpad), TRUE);
gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
}
@@ -47,22 +48,17 @@ int
main (int argc, char *argv[])
{
GstElement *pipeline, *testsrc, *fakesink;
- gint n;
gst_init (&argc, &argv);
pipeline = gst_pipeline_new ("p");
testsrc = g_object_new (gst_test_src_get_type (), NULL);
- gst_object_set_name (GST_OBJECT (testsrc), "src");
fakesink = gst_element_factory_make ("fakesink", "sink");
gst_bin_add_many (GST_BIN (pipeline), testsrc, fakesink, NULL);
gst_element_link (testsrc, fakesink);
gst_element_set_state (pipeline, GST_STATE_PLAYING);
- for (n = 0; n < 100; n++) {
- if (!gst_bin_iterate (GST_BIN (pipeline)))
- break;
- }
+ gst_bin_iterate (GST_BIN (pipeline));
gst_element_set_state (pipeline, GST_STATE_NULL);
gst_object_unref (GST_OBJECT (pipeline));
diff --git a/tests/old/testsuite/pad/link.c b/tests/old/testsuite/pad/link.c
deleted file mode 100644
index 5d22c381f6..0000000000
--- a/tests/old/testsuite/pad/link.c
+++ /dev/null
@@ -1,194 +0,0 @@
-/*
- * Test that:
- * - get-based sources can return data, loop-based sources can push.
- * - chain-based filters receive/push, loop-based filters can pull/push.
- * - chain-based sinks receive, loop-based sinks pull.
- */
-
-#include <gst/gst.h>
-
-/*
- * Scary type code.
- */
-
-typedef struct _GstTestElement
-{
- GstElement parent;
- GstPad *srcpad, *sinkpad;
-} GstTestSrc, GstTestFilter, GstTestSink, GstTestElement;
-
-typedef GstElementClass GstTestSrcClass, GstTestFilterClass, GstTestSinkClass,
- GstTestElementClass;
-
-#define gst_test_src_class_init gst_test_element_class_init
-#define gst_test_filter_class_init gst_test_element_class_init
-#define gst_test_sink_class_init gst_test_element_class_init
-
-#define gst_test_src_base_init gst_test_element_base_init
-#define gst_test_filter_base_init gst_test_element_base_init
-#define gst_test_sink_base_init gst_test_element_base_init
-
-static void
-gst_test_element_class_init (GstTestElementClass * klass)
-{
-}
-static void
-gst_test_element_base_init (gpointer klass)
-{
-}
-
-/*
- * Actual element code.
- */
-
-gboolean loop = FALSE;
-
-static GstData *
-gst_test_src_get (GstPad * pad)
-{
- return GST_DATA (gst_event_new (GST_EVENT_INTERRUPT));
-}
-
-static void
-gst_test_src_loop (GstElement * element)
-{
- GstTestSrc *src = (GstTestElement *) element;
-
- gst_pad_push (src->srcpad, gst_test_src_get (src->srcpad));
-}
-
-static void
-gst_test_src_init (GstTestElement * src)
-{
- src->srcpad = gst_pad_new ("src", GST_PAD_SRC);
- if (loop) {
- gst_element_set_loop_function (GST_ELEMENT (src), gst_test_src_loop);
- } else {
- gst_pad_set_get_function (src->srcpad, gst_test_src_get);
- }
- gst_element_add_pad (GST_ELEMENT (src), src->srcpad);
-
- GST_FLAG_SET (src, GST_ELEMENT_EVENT_AWARE);
-}
-
-static void
-gst_test_filter_chain (GstPad * pad, GstData * data)
-{
- GstTestFilter *filter = (GstTestElement *) gst_pad_get_parent (pad);
-
- gst_pad_push (filter->srcpad, data);
-}
-
-static void
-gst_test_filter_loop (GstElement * element)
-{
- GstTestFilter *filter = (GstTestElement *) element;
-
- gst_test_filter_chain (filter->sinkpad, gst_pad_pull (filter->sinkpad));
-}
-
-static void
-gst_test_filter_init (GstTestElement * filter)
-{
- filter->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
- if (loop) {
- gst_element_set_loop_function (GST_ELEMENT (filter), gst_test_filter_loop);
- } else {
- gst_pad_set_chain_function (filter->sinkpad, gst_test_filter_chain);
- }
- gst_element_add_pad (GST_ELEMENT (filter), filter->sinkpad);
-
- filter->srcpad = gst_pad_new ("src", GST_PAD_SRC);
- gst_element_add_pad (GST_ELEMENT (filter), filter->srcpad);
-
- GST_FLAG_SET (filter, GST_ELEMENT_EVENT_AWARE);
-}
-
-static void
-gst_test_sink_chain (GstPad * pad, GstData * data)
-{
- gst_data_unref (data);
-}
-
-static void
-gst_test_sink_loop (GstElement * element)
-{
- GstTestSink *sink = (GstTestElement *) element;
-
- gst_test_sink_chain (sink->sinkpad, gst_pad_pull (sink->sinkpad));
-}
-
-static void
-gst_test_sink_init (GstTestElement * sink)
-{
- sink->sinkpad = gst_pad_new ("sink", GST_PAD_SINK);
- if (loop) {
- gst_element_set_loop_function (GST_ELEMENT (sink), gst_test_sink_loop);
- } else {
- gst_pad_set_chain_function (sink->sinkpad, gst_test_sink_chain);
- }
- gst_element_add_pad (GST_ELEMENT (sink), sink->sinkpad);
-
- GST_FLAG_SET (sink, GST_ELEMENT_EVENT_AWARE);
-}
-
-#define parent_class src_parent_class
-GST_BOILERPLATE (GstTestSrc, gst_test_src, GstElement, GST_TYPE_ELEMENT);
-#undef parent_class
-#define parent_class filter_parent_class
-GST_BOILERPLATE (GstTestFilter, gst_test_filter, GstElement, GST_TYPE_ELEMENT);
-#undef parent_class
-#define parent_class sink_parent_class
-GST_BOILERPLATE (GstTestSink, gst_test_sink, GstElement, GST_TYPE_ELEMENT);
-#undef parent_class
-
-/*
- * Actual test.
- */
-
-static void
-cb_error (GstElement * element)
-{
- g_assert_not_reached ();
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *pipeline, *src, *filter, *sink;
- gint n, r;
- gboolean res;
-
- gst_init (&argc, &argv);
-
- for (r = 0; r < 2; r++) {
- pipeline = gst_pipeline_new ("p");
- g_signal_connect (pipeline, "error", G_CALLBACK (cb_error), NULL);
- src = g_object_new (gst_test_src_get_type (), NULL);
- gst_object_set_name (GST_OBJECT (src), "src");
- filter = g_object_new (gst_test_filter_get_type (), NULL);
- gst_object_set_name (GST_OBJECT (filter), "filter");
- sink = g_object_new (gst_test_sink_get_type (), NULL);
- gst_object_set_name (GST_OBJECT (sink), "sink");
- gst_bin_add_many (GST_BIN (pipeline), src, filter, sink, NULL);
- res = gst_element_link (src, filter);
- g_assert (res);
- res = gst_element_link (filter, sink);
- g_assert (res);
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
- for (n = 0; n < 100; n++) {
- if (!gst_bin_iterate (GST_BIN (pipeline)))
- g_assert_not_reached ();
- }
-
- gst_element_set_state (pipeline, GST_STATE_NULL);
- gst_object_unref (GST_OBJECT (pipeline));
-
- /* switch element types */
- g_print ("Loop=%s done\n", loop ? "true" : "false");
- loop = !loop;
- }
-
- return 0;
-}
diff --git a/tests/old/testsuite/parse/parse1.c b/tests/old/testsuite/parse/parse1.c
index be4764a944..2919f39e59 100644
--- a/tests/old/testsuite/parse/parse1.c
+++ b/tests/old/testsuite/parse/parse1.c
@@ -91,7 +91,7 @@ static gchar *s;
#define PIPELINE3 "fakesrc identity fakesink"
#define PIPELINE4 "fakesrc num-buffers=4 .src ! identity !.sink identity .src ! .sink fakesink"
#define PIPELINE5 "fakesrc num-buffers=4 name=src identity name=id1 identity name = id2 fakesink name =sink src. ! id1. id1.! id2.sink id2.src!sink.sink"
-#define PIPELINE6 "pipeline.(name=\"john\" fakesrc num-buffers=4 ( thread. ( ! queue ! identity !{ queue ! fakesink }) ))"
+#define PIPELINE6 "pipeline.(name=\"john\" fakesrc num-buffers=4 ( bin. ( ! queue ! identity !( queue ! fakesink )) ))"
#define PIPELINE7 "fakesrc num-buffers=4 ! tee name=tee .src%d! fakesink tee.src%d ! fakesink fakesink name =\"foo\" tee.src%d ! foo."
/* aggregator is borked
#define PIPELINE8 "fakesrc num-buffers=4 ! tee name=tee1 .src0,src1 ! .sink0, sink1 aggregator ! fakesink"
diff --git a/tests/old/testsuite/schedulers/142183-2.c b/tests/old/testsuite/schedulers/142183-2.c
index c472974654..802d79bab1 100644
--- a/tests/old/testsuite/schedulers/142183-2.c
+++ b/tests/old/testsuite/schedulers/142183-2.c
@@ -43,11 +43,11 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (src, "num-buffers", 10, NULL);
id = gst_element_factory_make ("identity", NULL);
g_assert (id);
g_signal_connect (G_OBJECT (id), "handoff", (GCallback) handoff_identity,
NULL);
- g_object_set (G_OBJECT (id), "loop-based", TRUE, NULL);
sink = gst_element_factory_make ("fakesink", NULL);
g_assert (sink);
@@ -60,7 +60,6 @@ main (gint argc, gchar ** argv)
g_assert_not_reached ();
gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
g_print ("got past iteration, scheduler refs elements correctly\n");
g_print ("cleaning up...\n");
diff --git a/tests/old/testsuite/schedulers/142183.c b/tests/old/testsuite/schedulers/142183.c
deleted file mode 100644
index 8f56faf9a0..0000000000
--- a/tests/old/testsuite/schedulers/142183.c
+++ /dev/null
@@ -1,94 +0,0 @@
-/* GStreamer
- * Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <unistd.h>
-
-#include <gst/gst.h>
-
-static void
-handoff_identity (GstElement * element)
-{
- GstBin *parent;
-
- parent = GST_BIN (gst_element_get_parent (element));
- g_print ("identity handoff\n");
- gst_bin_remove (parent, element);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GstElement *pipeline, *src, *sink, *id;
-
- gst_init (&argc, &argv);
-
- g_print ("setting up...\n");
- /* setup pipeline */
- pipeline = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline);
- src = gst_element_factory_make ("fakesrc", NULL);
- g_assert (src);
- id = gst_element_factory_make ("identity", NULL);
- g_assert (id);
- /* ref object here as it will be unparented and destroyed in the
- * handoff signal, normally the scheduler should keep a ref to the
- * currently scheduled elements but that's another bug displayed in
- * 142183-2.c */
- gst_object_ref (GST_OBJECT (id));
- g_signal_connect (G_OBJECT (id), "handoff", (GCallback) handoff_identity,
- NULL);
- g_object_set (G_OBJECT (id), "loop-based", TRUE, NULL);
-
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (sink);
-
- gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL);
- /* this is what triggers the bug */
- gst_element_enable_threadsafe_properties (GST_ELEMENT (src));
- gst_element_enable_threadsafe_properties (GST_ELEMENT (id));
- gst_element_enable_threadsafe_properties (GST_ELEMENT (sink));
-
- gst_element_link_pads (src, "src", id, "sink");
- gst_element_link_pads (id, "src", sink, "sink");
-
- if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
-
- /* 'cause we're going into deadlock mode */
- alarm (5);
-
- g_print ("adding identity back...\n");
- /* add identity back in */
- gst_bin_add_many (GST_BIN (pipeline), id, NULL);
-
- g_print ("going into possible deadlock... alarm at 5 seconds\n");
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
- g_print ("ok, no deadlock. bug 142183 fixed!\n");
-
- g_print ("cleaning up...\n");
- gst_object_unref (GST_OBJECT (pipeline));
- gst_object_unref (GST_OBJECT (id));
- src = id = sink = pipeline = NULL;
-
- g_print ("done.\n");
- return 0;
-}
diff --git a/tests/old/testsuite/schedulers/143777-2.c b/tests/old/testsuite/schedulers/143777-2.c
index 399bff2039..f45f37bbd1 100644
--- a/tests/old/testsuite/schedulers/143777-2.c
+++ b/tests/old/testsuite/schedulers/143777-2.c
@@ -6,14 +6,13 @@ 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);
+ g_object_set (src, "num-buffers", 10, NULL);
tee = gst_element_factory_make ("tee", "tee1");
g_assert (tee);
enc = gst_element_factory_make ("identity", "enc");
@@ -27,11 +26,7 @@ main (int argc, char **argv)
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);
- }
+ gst_bin_iterate (GST_BIN (pipeline));
if (gst_element_set_state (pipeline, GST_STATE_PAUSED) != GST_STATE_SUCCESS)
g_assert_not_reached ();
@@ -48,11 +43,7 @@ main (int argc, char **argv)
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);
- }
+ gst_bin_iterate (GST_BIN (pipeline));
g_print ("cleaning up...\n");
gst_object_unref (GST_OBJECT (pipeline));
diff --git a/tests/old/testsuite/schedulers/143777.c b/tests/old/testsuite/schedulers/143777.c
index 9c33d6ba7c..54a2c8c9b5 100644
--- a/tests/old/testsuite/schedulers/143777.c
+++ b/tests/old/testsuite/schedulers/143777.c
@@ -32,7 +32,7 @@ gint
main (gint argc, gchar ** argv)
{
GstElement *pipeline, *src, *sink, *id;
- guint i = 0, j;
+ guint i = 0;
gst_init (&argc, &argv);
@@ -42,20 +42,20 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (src, "num-buffers", 10, NULL);
id = gst_element_factory_make ("identity", NULL);
g_assert (id);
sink = gst_element_factory_make ("fakesink", NULL);
g_assert (sink);
gst_bin_add_many (GST_BIN (pipeline), src, id, sink, NULL);
- while (i < 100) {
+ while (i < 10) {
g_print ("running... (%d iterations)\n", i);
if (gst_element_set_state (pipeline,
GST_STATE_PLAYING) != GST_STATE_SUCCESS)
g_assert_not_reached ();
gst_element_link_many (src, id, sink, NULL);
- for (j = 0; j < i; j++)
- gst_bin_iterate (GST_BIN (pipeline));
+ gst_bin_iterate (GST_BIN (pipeline));
if (gst_element_set_state (pipeline, GST_STATE_PAUSED) != GST_STATE_SUCCESS)
g_assert_not_reached ();
gst_element_unlink_many (src, id, sink, NULL);
@@ -63,7 +63,7 @@ main (gint argc, gchar ** argv)
}
g_print ("cleaning up...\n");
- g_assert (i == 100);
+ g_assert (i == 10);
gst_object_unref (GST_OBJECT (pipeline));
src = id = sink = pipeline = NULL;
diff --git a/tests/old/testsuite/schedulers/147713.c b/tests/old/testsuite/schedulers/147713.c
deleted file mode 100644
index 0a2dc07dfa..0000000000
--- a/tests/old/testsuite/schedulers/147713.c
+++ /dev/null
@@ -1,89 +0,0 @@
-/* GStreamer
- * Copyright (C) 2004 Wim Taymanse <wim@fluendo.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <gst/gst.h>
-
-static gint src_handoff = 0;
-
-static void
-handoff_src (GstElement * element)
-{
- g_print ("src handoff\n");
- src_handoff++;
-}
-
-static void
-handoff_sink (GstElement * element)
-{
- g_print ("sink handoff\n");
- g_assert (src_handoff == 1);
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GstElement *pipeline, *src, *sink, *id1, *id2;
-
- gst_init (&argc, &argv);
-
- g_print ("setting up...\n");
- /* setup pipeline */
- pipeline = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline);
- src = gst_element_factory_make ("fakesrc", NULL);
- g_assert (src);
- g_object_set (G_OBJECT (src), "signal-handoffs", TRUE, NULL);
- g_signal_connect (G_OBJECT (src), "handoff", (GCallback) handoff_src, NULL);
- id1 = gst_element_factory_make ("identity", NULL);
- g_assert (id1);
-
- id2 = gst_element_factory_make ("identity", NULL);
- g_assert (id2);
- g_object_set (G_OBJECT (id2), "loop-based", TRUE, NULL);
-
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (sink);
- g_object_set (G_OBJECT (sink), "signal-handoffs", TRUE, NULL);
- g_signal_connect (G_OBJECT (sink), "handoff", (GCallback) handoff_sink, NULL);
-
- gst_bin_add_many (GST_BIN (pipeline), src, id1, NULL);
- gst_element_link_pads (src, "src", id1, "sink");
-
- if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- if (gst_element_set_state (id2, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
- if (gst_element_set_state (sink, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- gst_bin_add_many (GST_BIN (pipeline), sink, NULL);
- gst_element_link_pads (id2, "src", sink, "sink");
- gst_element_link_pads (id1, "src", id2, "sink");
- gst_bin_add_many (GST_BIN (pipeline), id2, NULL);
-
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
-
- g_print ("cleaning up...\n");
- gst_object_unref (GST_OBJECT (pipeline));
- src = id1 = id2 = sink = pipeline = NULL;
-
- g_print ("done.\n");
- return 0;
-}
diff --git a/tests/old/testsuite/schedulers/147819.c b/tests/old/testsuite/schedulers/147819.c
index d8b30b337b..eb08ae20ba 100644
--- a/tests/old/testsuite/schedulers/147819.c
+++ b/tests/old/testsuite/schedulers/147819.c
@@ -20,20 +20,16 @@
#include <gst/gst.h>
-static gboolean handoff;
-
static void
handoff_identity1 (GstElement * element)
{
g_print ("identity1 handoff\n");
- handoff = TRUE;
}
static void
handoff_identity2 (GstElement * element)
{
g_print ("identity2 handoff\n");
- handoff = TRUE;
}
gint
@@ -49,16 +45,15 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (G_OBJECT (src), "num-buffers", 10, NULL);
id1 = gst_element_factory_make ("identity", NULL);
g_assert (id1);
- g_object_set (G_OBJECT (id1), "loop-based", TRUE, NULL);
g_object_set (G_OBJECT (id1), "duplicate", 3, NULL);
g_signal_connect (G_OBJECT (id1), "handoff", (GCallback) handoff_identity1,
NULL);
id2 = gst_element_factory_make ("identity", NULL);
g_assert (id2);
- g_object_set (G_OBJECT (id2), "loop-based", TRUE, NULL);
g_signal_connect (G_OBJECT (id2), "handoff", (GCallback) handoff_identity2,
NULL);
@@ -76,20 +71,6 @@ main (gint argc, gchar ** argv)
g_print ("running...\n");
gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
-
- /* do ugly stuff here */
- gst_object_ref (GST_OBJECT (id1));
- gst_bin_remove (GST_BIN (pipeline), id1);
- gst_element_link_pads (src, "src", id1, "sink");
- gst_element_link_pads (id1, "src", id2, "sink");
-
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
- gst_bin_iterate (GST_BIN (pipeline));
g_print ("cleaning up...\n");
gst_object_unref (GST_OBJECT (pipeline));
diff --git a/tests/old/testsuite/schedulers/147894-2.c b/tests/old/testsuite/schedulers/147894-2.c
deleted file mode 100644
index 4eab00b057..0000000000
--- a/tests/old/testsuite/schedulers/147894-2.c
+++ /dev/null
@@ -1,136 +0,0 @@
-/* GStreamer
- * Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <unistd.h>
-
-#include <gst/gst.h>
-
-static gboolean empty;
-static gboolean bug;
-static gboolean handoff;
-static GstElement *pipeline2;
-
-static void
-queue_empty (GstElement * element)
-{
- g_print ("queue empty\n");
- if (!handoff)
- bug = TRUE;
-}
-
-static void
-queue_filled (GstElement * element)
-{
- g_print ("queue filled\n");
- empty = FALSE;
-
- /* read from the other end */
- handoff = FALSE;
- bug = FALSE;
-
- alarm (5);
-
- g_print ("emptying queue with 5 second timeout...\n");
- while (!bug && !handoff) {
- gst_bin_iterate (GST_BIN (pipeline2));
- }
-}
-
-static void
-handoff_identity (GstElement * element)
-{
- g_print ("identity handoff\n");
- handoff = TRUE;
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GstElement *pipeline, *src, *sink, *queue, *id;
-
- gst_init (&argc, &argv);
-
- g_print ("setting up...\n");
- /* setup pipeline */
- pipeline = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline);
- src = gst_element_factory_make ("fakesrc", NULL);
- g_assert (src);
- queue = gst_element_factory_make ("queue", NULL);
- g_assert (queue);
- g_signal_connect (G_OBJECT (queue), "overrun", (GCallback) queue_filled,
- NULL);
- g_signal_connect (G_OBJECT (queue), "underrun", (GCallback) queue_empty,
- NULL);
- gst_bin_add_many (GST_BIN (pipeline), src, queue, NULL);
-
- gst_element_link_pads (src, "src", queue, "sink");
-
- /* second pipeline for sinks */
- pipeline2 = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline2);
- id = gst_element_factory_make ("identity", NULL);
- g_assert (id);
- g_signal_connect (G_OBJECT (id), "handoff", (GCallback) handoff_identity,
- NULL);
-
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline2), id, sink, NULL);
-
- gst_element_link_pads (queue, "src", id, "sink");
- gst_element_link_pads (id, "src", sink, "sink");
-
- if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- if (gst_element_set_state (pipeline2, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- g_print ("running...\n");
- /* fill queue */
- empty = TRUE;
- while (empty) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
- g_assert (!bug);
-
- g_print ("relinking...\n");
- /* now unlink and link id and sink */
- gst_element_unlink_pads (id, "src", sink, "sink");
- gst_element_link_pads (id, "src", sink, "sink");
-
- g_print ("running again...\n");
- /* fill queue */
- empty = TRUE;
- while (empty) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
- g_assert (!bug);
-
- /* trigger the bug */
-
-
- g_print ("cleaning up...\n");
- gst_object_unref (GST_OBJECT (pipeline));
- gst_object_unref (GST_OBJECT (pipeline2));
- src = id = sink = pipeline = pipeline2 = NULL;
-
- g_print ("done.\n");
- return 0;
-}
diff --git a/tests/old/testsuite/schedulers/147894.c b/tests/old/testsuite/schedulers/147894.c
deleted file mode 100644
index e89bf2ac2f..0000000000
--- a/tests/old/testsuite/schedulers/147894.c
+++ /dev/null
@@ -1,142 +0,0 @@
-/* GStreamer
- * Copyright (C) 2004 Wim Taymans <wim@fluendo.com>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * General Public License for more details.
- *
- * You should have received a copy of the GNU General Public
- * License along with this library; if not, write to the Free
- * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- */
-
-#include <unistd.h>
-
-#include <gst/gst.h>
-
-static gboolean empty;
-static gboolean bug;
-static gboolean handoff;
-static GstElement *pipeline2;
-
-static void
-queue_empty (GstElement * element)
-{
- g_print ("queue empty\n");
- if (!handoff)
- bug = TRUE;
-}
-
-static void
-queue_filled (GstElement * element)
-{
- g_print ("queue filled\n");
- empty = FALSE;
-
- /* read from the other end */
- handoff = FALSE;
- bug = FALSE;
-
- alarm (5);
-
- g_print ("emptying queue with 5 second timeout...\n");
- while (!bug && !handoff) {
- gst_bin_iterate (GST_BIN (pipeline2));
- }
-}
-
-static void
-handoff_identity (GstElement * element)
-{
- g_print ("identity handoff\n");
- handoff = TRUE;
-}
-
-gint
-main (gint argc, gchar ** argv)
-{
- GstElement *pipeline, *src, *sink, *queue, *id;
-
- gst_init (&argc, &argv);
-
- g_print ("setting up...\n");
- /* setup pipeline */
- pipeline = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline);
- src = gst_element_factory_make ("fakesrc", NULL);
- g_assert (src);
- queue = gst_element_factory_make ("queue", NULL);
- g_assert (queue);
- g_signal_connect (G_OBJECT (queue), "overrun", (GCallback) queue_filled,
- NULL);
- g_signal_connect (G_OBJECT (queue), "underrun", (GCallback) queue_empty,
- NULL);
- gst_bin_add_many (GST_BIN (pipeline), src, queue, NULL);
-
- gst_element_link_pads (src, "src", queue, "sink");
-
- /* second pipeline for sinks */
- pipeline2 = gst_element_factory_make ("pipeline", NULL);
- g_assert (pipeline2);
- id = gst_element_factory_make ("identity", NULL);
- g_assert (id);
- g_signal_connect (G_OBJECT (id), "handoff", (GCallback) handoff_identity,
- NULL);
-
- sink = gst_element_factory_make ("fakesink", NULL);
- g_assert (sink);
- gst_bin_add_many (GST_BIN (pipeline2), id, sink, NULL);
-
- gst_element_link_pads (queue, "src", id, "sink");
- gst_element_link_pads (id, "src", sink, "sink");
-
- if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- if (gst_element_set_state (pipeline2, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- g_print ("running...\n");
- /* fill queue */
- empty = TRUE;
- while (empty) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
- g_assert (!bug);
-
- if (gst_element_set_state (pipeline2, GST_STATE_READY) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- g_print ("relinking...\n");
- /* now unlink and link id and sink */
- gst_element_unlink_pads (id, "src", sink, "sink");
- gst_element_link_pads (id, "src", sink, "sink");
-
- if (gst_element_set_state (pipeline2, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
- g_assert_not_reached ();
-
- g_print ("running again...\n");
- /* fill queue */
- empty = TRUE;
- while (empty) {
- gst_bin_iterate (GST_BIN (pipeline));
- }
- g_assert (!bug);
-
- /* trigger the bug */
-
-
- g_print ("cleaning up...\n");
- gst_object_unref (GST_OBJECT (pipeline));
- gst_object_unref (GST_OBJECT (pipeline2));
- src = id = sink = pipeline = pipeline2 = NULL;
-
- g_print ("done.\n");
- return 0;
-}
diff --git a/tests/old/testsuite/schedulers/Makefile.am b/tests/old/testsuite/schedulers/Makefile.am
index 391ac40476..8ccc80ded2 100644
--- a/tests/old/testsuite/schedulers/Makefile.am
+++ b/tests/old/testsuite/schedulers/Makefile.am
@@ -4,15 +4,13 @@ tests_pass = \
unlink_src unlink_sink \
relink_src relink_sink \
unref_src unref_sink \
- 142183 142183-2 \
+ 142183-2 \
143777 143777-2 \
- 147713 \
147819 \
- 147894 147894-2 group_link \
- queue_link
+ group_link \
+ queue_link \
+ useless_iteration
-# don't enable this one unless it actually works.
-# useless_iteration
tests_fail =
tests_ignore =
diff --git a/tests/old/testsuite/schedulers/group_link.c b/tests/old/testsuite/schedulers/group_link.c
index e40c84d1ba..82a9d9ee25 100644
--- a/tests/old/testsuite/schedulers/group_link.c
+++ b/tests/old/testsuite/schedulers/group_link.c
@@ -33,11 +33,11 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (G_OBJECT (src), "num-buffers", 10, NULL);
id1 = gst_element_factory_make ("identity", NULL);
g_assert (id1);
id2 = gst_element_factory_make ("identity", NULL);
g_assert (id2);
- g_object_set (G_OBJECT (id2), "loop-based", TRUE, NULL);
sink = gst_element_factory_make ("fakesink", NULL);
g_assert (sink);
diff --git a/tests/old/testsuite/schedulers/queue_link.c b/tests/old/testsuite/schedulers/queue_link.c
index f14d7b53e8..f4b62091fb 100644
--- a/tests/old/testsuite/schedulers/queue_link.c
+++ b/tests/old/testsuite/schedulers/queue_link.c
@@ -33,10 +33,11 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (src, "num-buffers", 10, NULL);
queue = gst_element_factory_make ("queue", NULL);
g_assert (queue);
- thread = gst_element_factory_make ("thread", NULL);
+ thread = gst_element_factory_make ("bin", NULL);
g_assert (thread);
bin = gst_element_factory_make ("bin", NULL);
g_assert (bin);
diff --git a/tests/old/testsuite/schedulers/relink.c b/tests/old/testsuite/schedulers/relink.c
index a76daf0df1..a0499b536b 100644
--- a/tests/old/testsuite/schedulers/relink.c
+++ b/tests/old/testsuite/schedulers/relink.c
@@ -30,6 +30,9 @@ cb_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad,
gst_bin_remove (GST_BIN (pipeline), OTHER_ELEMENT);
OTHER_ELEMENT =
gst_element_factory_make ("fake" G_STRINGIFY (OTHER_ELEMENT), NULL);
+ if (g_str_equal (G_OBJECT_CLASS_NAME (G_OBJECT_GET_CLASS (OTHER_ELEMENT)),
+ "GstFakeSrc"))
+ g_object_set (OTHER_ELEMENT, "num-buffers", 10, NULL);
g_assert (OTHER_ELEMENT);
gst_bin_add (GST_BIN (pipeline), OTHER_ELEMENT);
gst_element_sync_state_with_parent (OTHER_ELEMENT);
@@ -40,8 +43,6 @@ cb_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad,
gint
main (gint argc, gchar ** argv)
{
- guint i = 0;
-
gst_init (&argc, &argv);
g_print ("setting up...\n");
@@ -50,6 +51,7 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (src, "num-buffers", 10, NULL);
sink = gst_element_factory_make ("fakesink", NULL);
g_assert (sink);
gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
@@ -62,7 +64,7 @@ main (gint argc, gchar ** argv)
g_print ("running...\n");
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
g_assert_not_reached ();
- while (i++ < 10 && gst_bin_iterate (GST_BIN (pipeline)));
+ gst_bin_iterate (GST_BIN (pipeline));
g_print ("cleaning up...\n");
gst_object_unref (GST_OBJECT (pipeline));
diff --git a/tests/old/testsuite/schedulers/unlink.c b/tests/old/testsuite/schedulers/unlink.c
index 11ae3e5c12..784e9d56c0 100644
--- a/tests/old/testsuite/schedulers/unlink.c
+++ b/tests/old/testsuite/schedulers/unlink.c
@@ -41,6 +41,7 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (src, "num-buffers", 10, NULL);
sink = gst_element_factory_make ("fakesink", NULL);
g_assert (sink);
gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
@@ -53,7 +54,7 @@ main (gint argc, gchar ** argv)
g_print ("running...\n");
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
g_assert_not_reached ();
- while (gst_bin_iterate (GST_BIN (pipeline)));
+ gst_bin_iterate (GST_BIN (pipeline));
g_print ("cleaning up...\n");
gst_object_unref (GST_OBJECT (pipeline));
diff --git a/tests/old/testsuite/schedulers/unref.c b/tests/old/testsuite/schedulers/unref.c
index 543620a7ac..fe55332711 100644
--- a/tests/old/testsuite/schedulers/unref.c
+++ b/tests/old/testsuite/schedulers/unref.c
@@ -19,6 +19,7 @@
#include <gst/gst.h>
GstElement *pipeline, *src, *sink;
+GMainLoop *loop;
static void
cb_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad,
@@ -28,6 +29,7 @@ cb_handoff (GstElement * element, GstBuffer * buffer, GstPad * pad,
g_print ("unreffing...\n");
gst_object_unref (GST_OBJECT (pipeline));
pipeline = NULL;
+ g_main_loop_quit (loop);
}
}
@@ -42,6 +44,7 @@ main (gint argc, gchar ** argv)
g_assert (pipeline);
src = gst_element_factory_make ("fakesrc", NULL);
g_assert (src);
+ g_object_set (src, "num-buffers", 10, NULL);
sink = gst_element_factory_make ("fakesink", NULL);
g_assert (sink);
gst_bin_add_many (GST_BIN (pipeline), src, sink, NULL);
@@ -54,7 +57,9 @@ main (gint argc, gchar ** argv)
g_print ("running...\n");
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
g_assert_not_reached ();
- while (pipeline && gst_bin_iterate (GST_BIN (pipeline)));
+ loop = g_main_loop_new (NULL, TRUE);
+ g_main_loop_run (loop);
+ g_main_loop_unref (loop);
g_print ("done.\n");
return 0;
diff --git a/tests/old/testsuite/schedulers/useless_iteration.c b/tests/old/testsuite/schedulers/useless_iteration.c
index d064c648c6..1afef15647 100644
--- a/tests/old/testsuite/schedulers/useless_iteration.c
+++ b/tests/old/testsuite/schedulers/useless_iteration.c
@@ -23,13 +23,14 @@ main (gint argc, gchar ** argv)
{
GstElement *pipeline;
GError *error = NULL;
- guint i = 0;
gst_init (&argc, &argv);
g_print ("setting up...\n");
/* setup pipeline */
- pipeline = gst_parse_launch ("pipeline.( { fakesrc ! fakesink } )", &error);
+ pipeline =
+ gst_parse_launch
+ ("pipeline.( pipeline.( fakesrc num-buffers=1000 ! fakesink ) )", &error);
g_assert (error == NULL);
g_assert (pipeline);
@@ -37,11 +38,9 @@ main (gint argc, gchar ** argv)
g_print ("running...\n");
if (gst_element_set_state (pipeline, GST_STATE_PLAYING) != GST_STATE_SUCCESS)
g_assert_not_reached ();
- while (i < 100 && gst_bin_iterate (GST_BIN (pipeline)))
- i++;
+ gst_bin_iterate (GST_BIN (pipeline));
- g_print ("cleaning up... (%d iterations)\n", i);
- g_assert (i == 100);
+ g_print ("cleaning up...\n");
gst_object_unref (GST_OBJECT (pipeline));
pipeline = NULL;
diff --git a/tests/sched/.gitignore b/tests/sched/.gitignore
deleted file mode 100644
index f563157238..0000000000
--- a/tests/sched/.gitignore
+++ /dev/null
@@ -1,18 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-runxml
-log.txt
-dynamic-pipeline
-interrupt1
-interrupt2
-interrupt3
-sched-stress
-*.bb
-*.bbg
-*.da
diff --git a/tests/sched/Makefile.am b/tests/sched/Makefile.am
deleted file mode 100644
index e929e062b3..0000000000
--- a/tests/sched/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-if GST_DISABLE_LOADSAVE
-noinst_PROGRAMS =
-else
-noinst_PROGRAMS = runxml dynamic-pipeline sched-stress interrupt1 interrupt2 interrupt3
-endif
-
-dynamic_pipeline_SOURCES = dynamic-pipeline.c
-sched_stress_SOURCES = sched-stress.c
-sched_stress_LDADD = $(GST_OBJ_LIBS) #-lefence
-
-LDADD = $(GST_OBJ_LIBS)
-AM_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/sched/dynamic-pipeline.c b/tests/sched/dynamic-pipeline.c
deleted file mode 100644
index 46b25c7928..0000000000
--- a/tests/sched/dynamic-pipeline.c
+++ /dev/null
@@ -1,63 +0,0 @@
-#include <gst/gst.h>
-
-/* This test will fail because it tries to allocate two cothread_context's in
- * one thread. This will cause a segfault. This is a problem with gstreamer's
- * cothreading that is fixed in the newer cothreads package.
- */
-
-int
-main (int argc, char *argv[])
-{
- GstElement *fakesrc, *fakesink1, *fakesink2, *pipe1, *pipe2;
-
- gst_init (&argc, &argv);
-
- if (argc != 1) {
- g_print ("usage: %s\n", argv[0]);
- exit (-1);
- }
-
- fakesrc = gst_element_factory_make ("fakesrc", "fakesrc");
- fakesink1 = gst_element_factory_make ("fakesink", "fakesink1");
- fakesink2 = gst_element_factory_make ("fakesink", "fakesink2");
-
- /* a crucial part of this test (and one that the old cothreads fails on) is
- having two active pipelines in the same thread. */
- pipe1 = gst_pipeline_new ("pipe1");
- pipe2 = gst_pipeline_new ("pipe2");
-
- /* make the first pipeline */
- gst_bin_add (GST_BIN (pipe1), fakesrc);
- gst_bin_add (GST_BIN (pipe1), fakesink1);
- gst_element_link_pads (fakesrc, "src", fakesink1, "sink");
-
- /* initialize cothreads */
- gst_element_set_state (pipe1, GST_STATE_PLAYING);
- gst_bin_iterate (GST_BIN (pipe1));
- gst_element_set_state (pipe1, GST_STATE_READY);
-
- /* destroy the fakesink, but keep fakesrc (its state is GST_STATE_READY) */
- gst_element_unlink_pads (fakesrc, "src", fakesink1, "sink");
- gst_object_ref (GST_OBJECT (fakesrc));
- gst_bin_remove (GST_BIN (pipe1), fakesrc);
- gst_bin_remove (GST_BIN (pipe1), fakesink1);
-
- gst_object_unref (GST_OBJECT (pipe1));
-
- /* make a new pipeline */
- gst_bin_add (GST_BIN (pipe2), fakesink2);
-
- /* don't change the new pipeline's state, it should change on the bin_add */
- gst_bin_add (GST_BIN (pipe2), fakesrc);
- gst_element_link_pads (fakesrc, "src", fakesink2, "sink");
-
- /* show the pipeline state */
- gst_xml_write_file (GST_ELEMENT (pipe2), stdout);
-
- /* try to iterate the pipeline */
- gst_element_set_state (pipe2, GST_STATE_PLAYING);
- gst_bin_iterate (GST_BIN (pipe2));
- gst_element_set_state (pipe2, GST_STATE_NULL);
-
- return 0;
-}
diff --git a/tests/sched/interrupt1.c b/tests/sched/interrupt1.c
deleted file mode 100644
index 66d6d6844b..0000000000
--- a/tests/sched/interrupt1.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstElement *pipeline, *thread, *queue, *src, *sink;
-
- gst_init (&argc, &argv);
-
- free (malloc (8)); /* -lefence */
-
- pipeline = gst_pipeline_new ("pipeline");
-
- src = gst_element_factory_make ("fakesrc", "src");
-
- thread = gst_thread_new ("thread");
-
- queue = gst_element_factory_make ("queue", "queue");
- sink = gst_element_factory_make ("fakesink", "sink");
-
- gst_bin_add (GST_BIN (thread), queue);
- gst_bin_add (GST_BIN (thread), sink);
- gst_bin_add (GST_BIN (pipeline), thread);
- gst_bin_add (GST_BIN (pipeline), src);
-
- gst_element_link_pads (src, "src", queue, "sink");
- gst_element_link_pads (queue, "src", sink, "sink");
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- return 0;
-}
diff --git a/tests/sched/interrupt2.c b/tests/sched/interrupt2.c
deleted file mode 100644
index 3907e2942d..0000000000
--- a/tests/sched/interrupt2.c
+++ /dev/null
@@ -1,42 +0,0 @@
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstElement *pipeline, *thread, *queue, *src, *identity, *sink;
-
- gst_init (&argc, &argv);
-
- free (malloc (8)); /* -lefence */
-
- pipeline = gst_pipeline_new ("pipeline");
-
- src = gst_element_factory_make ("fakesrc", "src");
-
- thread = gst_thread_new ("thread");
-
- queue = gst_element_factory_make ("queue", "queue");
- identity = gst_element_factory_make ("identity", "identity");
- g_object_set (G_OBJECT (identity), "loop_based", TRUE, NULL);
- sink = gst_element_factory_make ("fakesink", "sink");
-
- gst_bin_add (GST_BIN (thread), queue);
- gst_bin_add (GST_BIN (thread), identity);
- gst_bin_add (GST_BIN (thread), sink);
- gst_bin_add (GST_BIN (pipeline), thread);
- gst_bin_add (GST_BIN (pipeline), src);
-
- gst_element_link_pads (src, "src", queue, "sink");
- gst_element_link_pads (queue, "src", identity, "sink");
- gst_element_link_pads (identity, "src", sink, "sink");
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- return 0;
-}
diff --git a/tests/sched/interrupt3.c b/tests/sched/interrupt3.c
deleted file mode 100644
index 6b05434eaa..0000000000
--- a/tests/sched/interrupt3.c
+++ /dev/null
@@ -1,45 +0,0 @@
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
- GstElement *pipeline, *thread, *queue, *src, *adder, *sink;
- GstPad *sinkpad;
-
- gst_init (&argc, &argv);
-
- free (malloc (8)); /* -lefence */
-
- pipeline = gst_pipeline_new ("pipeline");
-
- src = gst_element_factory_make ("fakesrc", "src");
- g_object_set (G_OBJECT (src), "sizetype", 2, NULL);
-
- thread = gst_thread_new ("thread");
-
- queue = gst_element_factory_make ("queue", "queue");
- adder = gst_element_factory_make ("adder", "adder");
- sink = gst_element_factory_make ("fakesink", "sink");
-
- gst_bin_add (GST_BIN (thread), queue);
- gst_bin_add (GST_BIN (thread), adder);
- gst_bin_add (GST_BIN (thread), sink);
- gst_bin_add (GST_BIN (pipeline), thread);
- gst_bin_add (GST_BIN (pipeline), src);
-
- sinkpad = gst_element_get_request_pad (adder, "sink%d");
-
- gst_element_link_pads (src, "src", queue, "sink");
- gst_pad_link (gst_element_get_pad (queue, "src"), sinkpad);
- gst_element_link_pads (adder, "src", sink, "sink");
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- gst_element_set_state (pipeline, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
- gst_element_set_state (pipeline, GST_STATE_PAUSED);
-
- return 0;
-}
diff --git a/tests/sched/runtestcases b/tests/sched/runtestcases
deleted file mode 100755
index c79ee3e92b..0000000000
--- a/tests/sched/runtestcases
+++ /dev/null
@@ -1,15 +0,0 @@
-#/bin/bash
-
-echo "log" > log.txt
-
-for i in cases/*.xml
-do
- ./runxml $i
- error=$?
- if test $error -ne 0;
- then
- echo $i " error," $error >>log.txt
- else
- echo $i " ok" >>log.txt
- fi
-done
diff --git a/tests/sched/runxml.c b/tests/sched/runxml.c
deleted file mode 100644
index 20fca1c148..0000000000
--- a/tests/sched/runxml.c
+++ /dev/null
@@ -1,96 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-#include <gst/gst.h>
-
-static guint outcount, incount;
-
-static void
-buffer_handoff_sink (GstElement * src, GstBuffer * buf, GstElement * bin)
-{
- g_print ("\n\n *** buffer arrived in sink ***\n\n");
- gst_element_set_state (bin, GST_STATE_NULL);
-
- outcount++;
-}
-
-static void
-buffer_handoff_src (GstElement * src, GstBuffer * buf, GstElement * bin)
-{
- g_print ("\n\n *** buffer started in src ***\n\n");
- incount++;
-}
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element, gpointer data)
-{
- g_print ("have eos, quitting\n");
-}
-
-int
-main (int argc, char *argv[])
-{
- GstXML *xml;
- GList *toplevelelements;
- gint i = 1;
-
- gst_init (&argc, &argv);
-
- if (argc < 2) {
- g_print ("usage: %s <xml file>\n", argv[0]);
- exit (-1);
- }
-
- g_print ("\n *** using testfile %s\n", argv[1]);
-
- xml = gst_xml_new ();
- gst_xml_parse_file (xml, (guchar *) argv[1], NULL);
-
- toplevelelements = gst_xml_get_topelements (xml);
-
- while (toplevelelements) {
- GstElement *bin = (GstElement *) toplevelelements->data;
- GstElement *src, *sink;
-
- g_print ("\n ***** testcase %d\n", i++);
-
- src = gst_bin_get_by_name (GST_BIN (bin), "fakesrc");
- if (src) {
- g_signal_connect (G_OBJECT (src), "handoff",
- G_CALLBACK (buffer_handoff_src), bin);
- } else {
- g_print ("could not find src element\n");
- exit (-1);
- }
-
- sink = gst_bin_get_by_name (GST_BIN (bin), "fakesink");
- if (sink) {
- g_signal_connect (G_OBJECT (sink), "handoff",
- G_CALLBACK (buffer_handoff_sink), bin);
- } else {
- g_print ("could not find sink element\n");
- exit (-1);
- }
-
- incount = 0;
- outcount = 0;
-
-/* gst_element_set_state(bin, GST_STATE_READY); */
- gst_element_set_state (bin, GST_STATE_PLAYING);
-
- if (GST_IS_THREAD (bin)) {
- g_usleep (G_USEC_PER_SEC);
- } else {
- gst_bin_iterate (GST_BIN (bin));
- }
-
- if (outcount != 1 && incount != 1) {
- g_print ("test failed\n");
- exit (-1);
- }
-
- toplevelelements = g_list_next (toplevelelements);
- }
-
- exit (0);
-}
diff --git a/tests/sched/sched-stress.c b/tests/sched/sched-stress.c
deleted file mode 100644
index b058a41a69..0000000000
--- a/tests/sched/sched-stress.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#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_link_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;
-}
diff --git a/tests/sched/testcases b/tests/sched/testcases
deleted file mode 100644
index c91ae3f062..0000000000
--- a/tests/sched/testcases
+++ /dev/null
@@ -1,1060 +0,0 @@
-* = loopbased
-
-/**************************************************************************************/
- * 1 bin
- **************************************************************************************/
-
-1)
-
-
- [-bin-------------------------------]
- ! [--------] [--------] !
- ! !faksesrc! !fakesink! !
- ! ! src -------- sink ! !
- ! [--------] [--------] !
- [-----------------------------------]
-
-fakesrc ! fakesink
-
-2)
-
-
- [-bin-----------------------------------------------]
- ! [--------] [--------] [--------] !
- ! !faksesrc! !identity! !fakesink! !
- ! ! src --- sink src ----- sink ! !
- ! [--------] [--------] [--------] !
- [---------------------------------------------------]
-
-fakesrc ! identity ! fakesink
-
-3)
-
-
- [-bin-----------------------------------------------]
- ! [--------] [--------] [--------] !
- ! !faksesrc! !identity! !fakesink! !
- ! ! src --- sink * src ----- sink ! !
- ! [--------] [--------] [--------] !
- [---------------------------------------------------]
-
-fakesrc ! @identity ! fakesink
-
-4)
-
- [-bin--------------------------------------------------------------]
- ! [--------] [--------] [--------] [--------] !
- ! !faksesrc! !identity! !identity! !fakesink! !
- ! ! src --- sink src -- sink src -- sink ! !
- ! [--------] [--------] [--------] [--------] !
- [------------------------------------------------------------------]
-
-fakesrc ! identity ! identity ! fakesink
-
-4b)
-
- [-bin--------------------------------------------------------------]
- ! [--------] [--------] [--------] [--------] !
- ! !faksesrc! !identity! !identity! !fakesink! !
- ! ! src --- sink * src -- sink src -- sink ! !
- ! [--------] [--------] [--------] [--------] !
- [------------------------------------------------------------------]
-
-fakesrc ! @identity ! identity ! fakesink
-
-5)
-
- [------------------------------------------------------------------]
- ! [--------] [--------] [--------] [--------] !
- ! !faksesrc! !identity! !identity! !fakesink! !
- ! ! src --- sink src -- sink * src -- sink ! !
- ! [--------] [--------] [--------] [--------] !
- [------------------------------------------------------------------]
-
-fakesrc ! identity ! @identity ! fakesink
-
-5b)
-
- [------------------------------------------------------------------]
- ! [--------] [--------] [--------] [--------] !
- ! !faksesrc! !identity! !identity! !fakesink! !
- ! ! src --- sink * src -- sink * src -- sink ! !
- ! [--------] [--------] [--------] [--------] !
- [------------------------------------------------------------------]
-
-fakesrc ! @identity ! @identity ! fakesink
-
-
-/**************************************************************************************/
- * bin-in-bin based
- **************************************************************************************/
-
-6)
-
- [-bin-----------------------------------]
- [ [-bin-------------------------------] ]
- [ ! [--------] [--------] ! ]
- [ ! !faksesrc! !fakesink! ! ]
- [ ! ! src -------- sink ! ! ]
- [ ! [--------] [--------] ! ]
- [ [-----------------------------------] ]
- [---------------------------------------]
-
-(fakesrc ! fakesink)
-
-7)
-
- [-bin-----------------------------------]
- [ [-bin----------] ]
- [ ! [--------] ] [--------] ]
- [ ! !faksesrc! ] !fakesink! ]
- [ ! ! src -------- sink ! ]
- [ ! [--------] ] [--------] ]
- [ [--------------] ]
- [---------------------------------------]
-
-(fakesrc) ! fakesink
-
-8)
-
- [-bin-----------------------------------]
- [ [-bin-------------] ]
- [ [--------] [ [--------] ! ]
- [ !faksesrc! [ !fakesink! ! ]
- [ ! src -------- sink ! ! ]
- [ [--------] [ [--------] ! ]
- [ [-----------------] ]
- [---------------------------------------]
-
-fakesrc ! (fakesink)
-
-9)
-
- [-bin---------------------------------------------------]
- [ [-bin-------------] !
- [ [--------] [--------] ! [--------] ! !
- [ !faksesrc! !identity! ! !fakesink! ! !
- [ ! src --- sink src ----- sink ! ! !
- [ [--------] [--------] ! [--------] ! !
- [ [-----------------] !
- [-------------------------------------------------------]
-
-fakesrc ! identity ! (fakesink)
-
-10)
-
- [-bin---------------------------------------------------]
- [ [-bin-------------] !
- [ [--------] [--------] ! [--------] ! !
- [ !faksesrc! !identity! ! !fakesink! ! !
- [ ! src --- sink * src ----- sink ! ! !
- [ [--------] [--------] ! [--------] ! !
- [ [-----------------] !
- [-------------------------------------------------------]
-
-fakesrc ! @identity ! (fakesink)
-
-11)
-
- [-bin---------------------------------------------------]
- [ [-bin--------------------------------] !
- [ [--------] ! [--------] [--------] ! !
- [ !faksesrc! ! !identity! !fakesink! ! !
- [ ! src --- sink src ----- sink ! ! !
- [ [--------] ! [--------] [--------] ! !
- [ [------------------------------------] !
- [-------------------------------------------------------]
-
-fakesrc ! (identity ! fakesink)
-
-12)
-
- [-bin---------------------------------------------------]
- [ [-bin--------------------------------] !
- [ [--------] ! [--------] [--------] ! !
- [ !faksesrc! ! !identity! !fakesink! ! !
- [ ! src --- sink * src ----- sink ! ! !
- [ [--------] ! [--------] [--------] ! !
- [ [------------------------------------] !
- [-------------------------------------------------------]
-
-fakesrc ! (@identity ! fakesink)
-
-13)
-
- [-bin---------------------------------------------------]
- [ [-bin-----------------------------] !
- [ [ [--------] [--------] ! [--------] !
- [ [ !faksesrc! !identity! ! !fakesink! !
- [ [ ! src --- sink src ----- sink ! !
- [ [ [--------] [--------] ! [--------] !
- [ [---------------------------------] !
- [-------------------------------------------------------]
-
-(fakesrc ! identity) ! fakesink
-
-14)
-
- [-bin---------------------------------------------------]
- ! [-bin-----------------------------] !
- ! ! [--------] [--------] ! [--------] !
- ! ! !faksesrc! !identity! ! !fakesink! !
- ! ! ! src --- sink * src ----- sink ! !
- ! ! [--------] [--------] ! [--------] !
- ! [---------------------------------] !
- [-------------------------------------------------------]
-
-(fakesrc ! @identity) ! fakesink
-
-15)
-
- [-bin----------------------------------------------------------------]
- ! [-bin-----------------------------] !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! ! !faksesrc! !identity! ! !identity! !fakesink! !
- ! ! ! src --- sink src -- sink src -- sink ! !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! [---------------------------------] !
- [--------------------------------------------------------------------]
-
-(fakesrc ! identity) ! identity ! fakesink
-
-16)
-
- [-bin----------------------------------------------------------------]
- ! [-bin----------------------------] !
- ! [--------] [--------] ! [--------] [--------] ! !
- ! !faksesrc! !identity! ! !identity! !fakesink! ! !
- ! ! src --- sink src -- sink src -- sink ! ! !
- ! [--------] [--------] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [--------------------------------------------------------------------]
-
-fakesrc ! identity ! (identity ! fakesink)
-
-17)
-
- [-bin----------------------------------------------------------------]
- ! [-bin----------------------------] !
- ! [--------] [--------] ! [--------] [--------] ! !
- ! !faksesrc! !identity! ! !identity! !fakesink! ! !
- ! ! src --- sink src -- sink * src -- sink ! ! !
- ! [--------] [--------] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [--------------------------------------------------------------------]
-
-fakesrc ! identity ! (@identity ! fakesink)
-
-18)
-
- [-bin----------------------------------------------------------------]
- ! [-bin----------------------------] !
- ! [--------] [--------] ! [--------] [--------] ! !
- ! !faksesrc! !identity! ! !identity! !fakesink! ! !
- ! ! src --- sink * src -- sink * src -- sink ! ! !
- ! [--------] [--------] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [--------------------------------------------------------------------]
-
-fakesrc ! @identity ! @identity ! fakesink
-
-19)
-
- [-bin----------------------------------------------------------------]
- ! [-bin-----------------------------] !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! ! !faksesrc! !identity! ! !identity! !fakesink! !
- ! ! ! src --- sink * src -- sink src -- sink ! !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! [---------------------------------] !
- [--------------------------------------------------------------------]
-
-(fakesrc ! @identity) ! identity ! fakesink
-
-20)
-
- [-bin----------------------------------------------------------------]
- ! [-bin-----------------------------] !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! ! !faksesrc! !identity! ! !identity! !fakesink! !
- ! ! ! src --- sink src -- sink * src -- sink ! !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! [---------------------------------] !
- [--------------------------------------------------------------------]
-
-(fakesrc ! identity) ! @identity ! fakesink
-
-21)
-
- [-bin----------------------------------------------------------------]
- ! [-bin-----------------------------] !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! ! !faksesrc! !identity! ! !identity! !fakesink! !
- ! ! ! src --- sink * src -- sink * src -- sink ! !
- ! ! [--------] [--------] ! [--------] [--------] !
- ! [---------------------------------] !
- [--------------------------------------------------------------------]
-
-(fakesrc ! @identity) ! @identity ! fakesink
-
-22)
-
- [-bin--------------------------------------------------------------------]
- ! [-bin----------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [------------------------------------------------------------------------]
-
-(fakesrc ! identity) ! (identity ! fakesink)
-
-23)
-
- [-bin--------------------------------------------------------------------]
- ! [-bin----------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [------------------------------------------------------------------------]
-
-(fakesrc ! identity) ! (@identity ! fakesink)
-
-24)
-
- [-bin--------------------------------------------------------------------]
- ! [-bin----------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [------------------------------------------------------------------------]
-
-(fakesrc ! @identity) ! (identity ! fakesink)
-
-25)
-
- [-bin--------------------------------------------------------------------]
- ! [-bin----------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [------------------------------------------------------------------------]
-
-(fakesrc ! @identity) ! (@identity ! fakesink)
-
-/**************************************************************************************/
- * threads
- **************************************************************************************/
-
-26)
-
- [-bin-----------------------------------]
- [ [-thread----------------------------] ]
- [ ! [--------] [--------] ! ]
- [ ! !faksesrc! !fakesink! ! ]
- [ ! ! src -------- sink ! ! ]
- [ ! [--------] [--------] ! ]
- [ [-----------------------------------] ]
- [---------------------------------------]
-
-[fakesrc ! fakesink]
-
-27)
-
- [-thread--------------------------------]
- [ [-bin-------------------------------] ]
- [ ! [--------] [--------] ! ]
- [ ! !faksesrc! !fakesink! ! ]
- [ ! ! src -------- sink ! ! ]
- [ ! [--------] [--------] ! ]
- [ [-----------------------------------] ]
- [---------------------------------------]
-
-28)
-
- [-bin--------------------------------------------]
- [ [-thread-------] ]
- [ ! [--------] ] [-----] [--------] ]
- [ ! !faksesrc! ] !queue! !fakesink! ]
- [ ! ! src --- sink src -- sink ! ]
- [ ! [--------] ] [-----] [--------] ]
- [ [--------------] ]
- [------------------------------------------------]
-
-
-29)
-
- [-bin--------------------------------------------]
- [ [-thread--------] ]
- [ [--------] [-----] [ [--------] ! ]
- [ !faksesrc! !queue! [ !fakesink! ! ]
- [ ! src -- sink src --- sink ! ! ]
- [ [--------] [-----] [ [--------] ! ]
- [ [---------------] ]
- [------------------------------------------------]
-
-
-30)
-
- [-bin---------------------------------------------------------------]
- [ [-thread--------] !
- [ [--------] [--------] [-----] ! [--------] ! !
- [ !faksesrc! !identity! !queue! ! !fakesink! ! !
- [ ! src --- sink src -- sink src --- sink ! ! !
- [ [--------] [--------] [-----] ! [--------] ! !
- [ [---------------] !
- [-------------------------------------------------------------------]
-
-
-31)
-
- [-bin---------------------------------------------------------------]
- [ [-thread--------] !
- [ [--------] [--------] [-----] ! [--------] ! !
- [ !faksesrc! !identity! !queue! ! !fakesink! ! !
- [ ! src --- sink * src -- sink src --- sink ! ! !
- [ [--------] [--------] [-----] ! [--------] ! !
- [ [---------------] !
- [-------------------------------------------------------------------]
-
-
-
-32)
-
- [-bin------------------------------------------------------------------]
- [ [-thread-----------------------------] !
- [ [--------] [-----] ! [--------] [--------] ! !
- [ !faksesrc! !queue! ! !identity! !fakesink! ! !
- [ ! src --- sink src --- sink src ----- sink ! ! !
- [ [--------] [-----] ! [--------] [--------] ! !
- [ [------------------------------------] !
- [----------------------------------------------------------------------]
-
-
-33)
-
- [-bin------------------------------------------------------------------]
- [ [-thread-----------------------------] !
- [ [--------] [-----] ! [--------] [--------] ! !
- [ !faksesrc! !queue! ! !identity! !fakesink! ! !
- [ ! src --- sink src --- sink * src ----- sink ! ! !
- [ [--------] [-----] ! [--------] [--------] ! !
- [ [------------------------------------] !
- [----------------------------------------------------------------------]
-
-
-34)
-
- [-bin---------------------------------------------------------------]
- [ [-thread--------------------------] !
- [ [ [--------] [--------] ! [-----] [--------] !
- [ [ !faksesrc! !identity! ! !queue! !fakesink! !
- [ [ ! src --- sink src --- sink src -- sink ! !
- [ [ [--------] [--------] ! [-----] [--------] !
- [ [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-35)
-
- [-bin---------------------------------------------------------------]
- [ [-thread--------------------------] !
- [ [ [--------] [--------] ! [-----] [--------] !
- [ [ !faksesrc! !identity! ! !queue! !fakesink! !
- [ [ ! src --- sink * src --- sink src -- sink ! !
- [ [ [--------] [--------] ! [-----] [--------] !
- [ [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-36)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! ! !faksesrc! !identity! ! !queue! !identity! !fakesink! !
- ! ! ! src --- sink src -- sink src -- sink src -- sink ! !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! [---------------------------------] !
- [----------------------------------------------------------------------------------]
-
-
-37)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! ! !faksesrc! !identity! ! !queue! !identity! !fakesink! !
- ! ! ! src --- sink * src -- sink src -- sink src -- sink ! !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! [---------------------------------] !
- [----------------------------------------------------------------------------------]
-
-
-38)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! ! !faksesrc! !identity! ! !queue! !identity! !fakesink! !
- ! ! ! src --- sink src -- sink src -- sink * src -- sink ! !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! [---------------------------------] !
- [----------------------------------------------------------------------------------]
-
-
-39)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! ! !faksesrc! !identity! ! !queue! !identity! !fakesink! !
- ! ! ! src --- sink * src -- sink src -- sink * src -- sink ! !
- ! ! [--------] [--------] ! [-----] [--------] [--------] !
- ! [---------------------------------] !
- [----------------------------------------------------------------------------------]
-
-
-40)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread-------------------------] !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! !faksesrc! !identity! !queue! ! !identity! !fakesink! ! !
- ! ! src --- sink src -- sink src -- sink src -- sink ! ! !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [----------------------------------------------------------------------------------]
-
-41)
-
- [-bin-------------------------------------------------------------------------------]
- ! [-thread--------------------------] !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! !faksesrc! !identity! !queue! ! !identity! !fakesink! ! !
- ! ! src --- sink src -- sink src -- sink * src -- sink ! ! !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [-----------------------------------------------------------------------------------]
-
-42)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread-------------------------] !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! !faksesrc! !identity! !queue! ! !identity! !fakesink! ! !
- ! ! src --- sink * src -- sink src -- sink src -- sink ! ! !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [----------------------------------------------------------------------------------]
-
-
-43)
-
- [-bin------------------------------------------------------------------------------]
- ! [-thread-------------------------] !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! !faksesrc! !identity! !queue! ! !identity! !fakesink! ! !
- ! ! src --- sink * src -- sink src -- sink * src -- sink ! ! !
- ! [--------] [--------] [-----] ! [--------] [--------] ! !
- ! [--------------------------------] !
- [----------------------------------------------------------------------------------]
-
-
-
-/**********************************************************************************
- * two threads in bin
- **********************************************************************************/
-
-44)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-45)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-46)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-47)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-48)
-
- [-bin---------------------------------------------------------------]
- ! [-thread-------] [-thread--------------------------] !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------] [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-49)
-
- [-bin---------------------------------------------------------------]
- ! [-thread-------] [-thread--------------------------] !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------] [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-50)
-
- [-bin----------------------------------------------------------------]
- ! [-thread-------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------]
-
-
-51)
-
- [-bin----------------------------------------------------------------]
- ! [-thread-------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------]
-
-
-52)
-
- [-bin----------------------------------------------]
- ! [-thread-------] [-thread---------] !
- ! ! [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] ! !
- ! [--------------] [----------------] !
- [--------------------------------------------------]
-
-52b)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-52c)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-52d)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-52e)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-
-
-/**********************************************************************************
- * thread-bin in bin
- **********************************************************************************/
-
-/** thread first ******/
-
-53)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-54)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-55)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-56)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin-----------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-57)
-
- [-bin----------------------------------------------]
- ! [-thread-------] [-bin------------] !
- ! ! [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] ! !
- ! [--------------] [----------------] !
- [--------------------------------------------------]
-
-
-58)
-
- [-bin---------------------------------------------------------------]
- ! [-thread-------] [-bin-----------------------------] !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------] [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-59)
-
- [-bin---------------------------------------------------------------]
- ! [-thread-------] [-bin-----------------------------] !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------] [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-60)
-
- [-bin----------------------------------------------------------------]
- ! [-thread-------------------------] [-bin------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------]
-
-
-61)
-
- [-bin----------------------------------------------------------------]
- ! [-thread-------------------------] [-bin------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------]
-
-/* non blocking queue ? */
-
-61a)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin------------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-61b)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin------------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-61c)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin------------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-61d)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-thread-------------------------] [-bin------------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-/** bin first ******/
-
-62)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-63)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-64)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-65)
-
- [-bin---------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread--------------------------] !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------------------------] [---------------------------------] !
- [-------------------------------------------------------------------------------------]
-
-
-66)
-
- [-bin----------------------------------------------]
- ! [-bin----------] [-thread---------] !
- ! ! [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] ! !
- ! [--------------] [----------------] !
- [--------------------------------------------------]
-
-
-67)
-
- [-bin---------------------------------------------------------------]
- ! [-bin----------] [-thread--------------------------] !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src -- sink src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------] [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-68)
-
- [-bin---------------------------------------------------------------]
- ! [-bin----------] [-thread--------------------------] !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! ! !faksesrc! ! !queue! ! !identity! !fakesink! ! !
- ! ! ! src --- sink src -- sink * src -- sink ! ! !
- ! ! [--------] ! [-----] ! [--------] [--------] ! !
- ! [--------------] [---------------------------------] !
- [-------------------------------------------------------------------]
-
-
-69)
-
- [-bin----------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------]
-
-
-70)
-
- [-bin----------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------]
-
-
-71)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-72)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-73)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-74)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
-
-
-75)
-
- [-bin----------------------------------------------------------------------------------------------]
- ! [-bin----------------------------] [-thread---------] !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! ! !faksesrc! !identity! ! !queue! !identity! !queue! ! !fakesink! ! !
- ! ! ! src --- sink * src --- sink src -- sink * src -- sink src -- sink ! ! !
- ! ! [--------] [--------] ! [-----] [--------] [-----] ! [--------] ! !
- ! [--------------------------------] [----------------] !
- [--------------------------------------------------------------------------------------------------]
diff --git a/tests/sched/testcases1.tc b/tests/sched/testcases1.tc
deleted file mode 100644
index 28ee331091..0000000000
--- a/tests/sched/testcases1.tc
+++ /dev/null
@@ -1,18 +0,0 @@
-tcN: fakesrc-fakesink
-tcP: fakesrc ! fakesink
-tcS: A, fakesrc0, handoff
-tcS: B, fakesink0, handoff
-tcI: 2
-tcT: 2000
-tcR: A,1,B,1,A,1,B,1
-
-
-tcN: fakesrc-identity-fakesink
-tcP: fakesrc ! identity ! fakesink
-tcS: A, fakesrc0, handoff
-tcS: B, identity, handoff
-tcS: C, fakesink0, handoff
-tcI: 2
-tcT: 2000
-tcR: A,1,B,1,C,1,A,1,B,1,C,1
-
diff --git a/tests/threadstate/.gitignore b/tests/threadstate/.gitignore
deleted file mode 100644
index 1520ff60c8..0000000000
--- a/tests/threadstate/.gitignore
+++ /dev/null
@@ -1,18 +0,0 @@
-Makefile
-Makefile.in
-*.o
-*.lo
-*.la
-.deps
-.libs
-
-test1
-test2
-threadstate1
-threadstate2
-threadstate3
-threadstate4
-threadstate5
-*.bb
-*.bbg
-*.da
diff --git a/tests/threadstate/Makefile.am b/tests/threadstate/Makefile.am
deleted file mode 100644
index 05e755c982..0000000000
--- a/tests/threadstate/Makefile.am
+++ /dev/null
@@ -1,4 +0,0 @@
-noinst_PROGRAMS = threadstate1 threadstate2 threadstate3 threadstate4 threadstate5 test1 test2
-
-LDADD = $(GST_OBJ_LIBS)
-AM_CFLAGS = $(GST_OBJ_CFLAGS)
diff --git a/tests/threadstate/test1.c b/tests/threadstate/test1.c
deleted file mode 100644
index e4478be599..0000000000
--- a/tests/threadstate/test1.c
+++ /dev/null
@@ -1,104 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <glib.h>
-
-typedef struct
-{
- GMutex *mutex;
- GCond *cond;
- gint var;
-} ThreadInfo;
-
-static void *
-thread_loop (void *arg)
-{
- ThreadInfo *info = (ThreadInfo *) arg;
-
- g_print ("thread: entering %p\n", info);
-
- g_print ("thread: lock\n");
- g_mutex_lock (info->mutex);
- g_print ("thread: signal spinup\n");
- g_cond_signal (info->cond);
-
- g_print ("thread: wait ACK\n");
- g_cond_wait (info->cond, info->mutex);
- info->var = 1;
- g_print ("thread: signal var change\n");
- g_cond_signal (info->cond);
- g_print ("thread: unlock\n");
- g_mutex_unlock (info->mutex);
-
- g_print ("thread: exit\n");
- return NULL;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- ThreadInfo *info;
- GThread *thread;
- GError *error = NULL;
- gint res = 0;
-
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- info = g_new (ThreadInfo, 1);
- info->mutex = g_mutex_new ();
- info->cond = g_cond_new ();
- info->var = 0;
-
- g_print ("main: lock\n");
- g_mutex_lock (info->mutex);
-
- thread = g_thread_create (thread_loop, info, TRUE, &error);
-
- if (error != NULL) {
- g_print ("Unable to start thread: %s\n", error->message);
- g_error_free (error);
- res = -1;
- goto done;
- }
-
- g_print ("main: wait spinup\n");
- g_cond_wait (info->cond, info->mutex);
-
- g_print ("main: signal ACK\n");
- g_cond_signal (info->cond);
-
- g_print ("main: waiting for thread to change var\n");
- g_cond_wait (info->cond, info->mutex);
-
- g_print ("main: var == %d\n", info->var);
- if (info->var != 1)
- g_print ("main: !!error!! expected var == 1, got %d\n", info->var);
- g_mutex_unlock (info->mutex);
-
- g_print ("main: join\n");
- g_thread_join (thread);
-
-done:
- g_mutex_free (info->mutex);
- g_cond_free (info->cond);
- g_free (info);
-
- return res;
-}
diff --git a/tests/threadstate/test2.c b/tests/threadstate/test2.c
deleted file mode 100644
index 4841cddc25..0000000000
--- a/tests/threadstate/test2.c
+++ /dev/null
@@ -1,108 +0,0 @@
-/* GStreamer
- * Copyright (C) <1999> Erik Walthinsen <omega@cse.ogi.edu>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Library General Public
- * License as published by the Free Software Foundation; either
- * version 2 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Library General Public License for more details.
- *
- * You should have received a copy of the GNU Library General Public
- * License along with this library; if not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
- */
-
-#include <glib.h>
-
-typedef struct
-{
- GMutex *mutex;
- GCond *cond_t;
- GCond *cond_p;
- gint var;
-} ThreadInfo;
-
-static void *
-thread_loop (void *arg)
-{
- ThreadInfo *info = (ThreadInfo *) arg;
-
- g_print ("thread: entering %p\n", info);
-
- g_print ("thread: lock\n");
- g_mutex_lock (info->mutex);
- g_print ("thread: signal spinup\n");
- g_cond_signal (info->cond_t);
-
- g_print ("thread: wait ACK\n");
- g_cond_wait (info->cond_p, info->mutex);
- info->var = 1;
- g_print ("thread: signal var change\n");
- g_cond_signal (info->cond_t);
- g_print ("thread: unlock\n");
- g_mutex_unlock (info->mutex);
-
- g_print ("thread: exit\n");
- return NULL;
-}
-
-gint
-main (gint argc, gchar * argv[])
-{
- ThreadInfo *info;
- GThread *thread;
- GError *error = NULL;
- gint res = 0;
-
- if (!g_thread_supported ())
- g_thread_init (NULL);
-
- info = g_new (ThreadInfo, 1);
- info->mutex = g_mutex_new ();
- info->cond_t = g_cond_new ();
- info->cond_p = g_cond_new ();
- info->var = 0;
-
- g_print ("main: lock\n");
- g_mutex_lock (info->mutex);
-
- thread = g_thread_create (thread_loop, info, TRUE, &error);
-
- if (error != NULL) {
- g_print ("Unable to start thread: %s\n", error->message);
- g_error_free (error);
- res = -1;
- goto done;
- }
-
- g_print ("main: wait spinup\n");
- g_cond_wait (info->cond_t, info->mutex);
-
- g_print ("main: signal ACK\n");
- g_cond_signal (info->cond_p);
-
- g_print ("main: waiting for thread to change var\n");
- g_cond_wait (info->cond_t, info->mutex);
-
- g_print ("main: var == %d\n", info->var);
- if (info->var != 1) {
- g_print ("main: !!error!! expected var == 1, got %d\n", info->var);
- }
- g_mutex_unlock (info->mutex);
-
- g_print ("main: join\n");
- g_thread_join (thread);
-
-done:
- g_mutex_free (info->mutex);
- g_cond_free (info->cond_t);
- g_cond_free (info->cond_p);
- g_free (info);
-
- return res;
-}
diff --git a/tests/threadstate/threadstate1.c b/tests/threadstate/threadstate1.c
deleted file mode 100644
index 2b1e5faabc..0000000000
--- a/tests/threadstate/threadstate1.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-/* this pipeline is:
- * { fakesrc ! fakesink }
- */
-
-
-int
-main (int argc, char *argv[])
-{
- GstElement *fakesrc, *fakesink;
- GstElement *thread;
- gint x;
-
- gst_init (&argc, &argv);
-
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- fakesrc = gst_element_factory_make ("fakesrc", "fake_source");
- g_assert (fakesrc != NULL);
-
- fakesink = gst_element_factory_make ("fakesink", "fake_sink");
- g_assert (fakesink != NULL);
-
- gst_bin_add_many (GST_BIN (thread), fakesrc, fakesink, NULL);
- gst_element_link (fakesrc, fakesink);
-
- for (x = 0; x < 10; x++) {
- g_print ("playing %d\n", x);
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
-
- g_print ("pausing %d\n", x);
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PAUSED);
- g_usleep (G_USEC_PER_SEC);
- }
-
- exit (0);
-}
diff --git a/tests/threadstate/threadstate2.c b/tests/threadstate/threadstate2.c
deleted file mode 100644
index 15827dbdb1..0000000000
--- a/tests/threadstate/threadstate2.c
+++ /dev/null
@@ -1,69 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-/* this pipeline is:
- * { filesrc ! mad ! osssink }
- */
-
-/* eos will be called when the src element has an end of stream */
-void
-eos (GstElement * element, gpointer data)
-{
- GstThread *thread = GST_THREAD (data);
-
- g_print ("have eos, quitting\n");
-
- /* stop the bin */
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_NULL);
-
- gst_main_quit ();
-}
-
-int
-main (int argc, char *argv[])
-{
- GstElement *filesrc, *osssink;
- GstElement *thread;
- GstElement *mad;
- gint x;
-
- gst_init (&argc, &argv);
-
- if (argc != 2) {
- g_print ("usage: %s <filename>\n", argv[0]);
- exit (-1);
- }
-
- /* create a new thread to hold the elements */
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- /* create a disk reader */
- filesrc = gst_element_factory_make ("filesrc", "disk_source");
- g_assert (filesrc != NULL);
- g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
- g_signal_connect (G_OBJECT (filesrc), "eos", G_CALLBACK (eos), thread);
-
- /* and an audio sink */
- osssink = gst_element_factory_make ("osssink", "play_audio");
- g_assert (osssink != NULL);
-
- /* did i mention that this is an mp3 player? */
- mad = gst_element_factory_make ("mad", "mp3_decoder");
- g_assert (mad != NULL);
-
- gst_bin_add_many (GST_BIN (thread), filesrc, mad, osssink, NULL);
- gst_element_link_many (filesrc, mad, osssink, NULL);
-
- for (x = 0; x < 10; x++) {
- g_print ("playing %d\n", x);
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC * 2);
-
- g_print ("pausing %d\n", x);
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PAUSED);
- g_usleep (G_USEC_PER_SEC * 2);
- }
-
- exit (0);
-}
diff --git a/tests/threadstate/threadstate3.c b/tests/threadstate/threadstate3.c
deleted file mode 100644
index cfabbb3769..0000000000
--- a/tests/threadstate/threadstate3.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-/* this pipeline is:
- * { { fakesrc ! fakesink } }
- */
-
-int
-main (int argc, char *argv[])
-{
- GstElement *fakesrc, *fakesink;
- GstElement *thread, *thread2;
- gint x;
-
- gst_init (&argc, &argv);
-
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- thread2 = gst_thread_new ("thread2");
- g_assert (thread2 != NULL);
-
- gst_bin_add (GST_BIN (thread), GST_ELEMENT (thread2));
-
- fakesrc = gst_element_factory_make ("fakesrc", "fake_source");
- g_assert (fakesrc != NULL);
-
- fakesink = gst_element_factory_make ("fakesink", "fake_sink");
- g_assert (fakesink != NULL);
-
- gst_bin_add_many (GST_BIN (thread2), fakesrc, fakesink, NULL);
- gst_element_link (fakesrc, fakesink);
-
- for (x = 0; x < 10; x++) {
- g_print ("playing %d\n", x);
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
-
- g_print ("nulling %d\n", x);
- gst_element_set_state (GST_ELEMENT (thread), GST_STATE_NULL);
- g_usleep (G_USEC_PER_SEC);
- }
- exit (0);
-}
diff --git a/tests/threadstate/threadstate4.c b/tests/threadstate/threadstate4.c
deleted file mode 100644
index f96f90ba15..0000000000
--- a/tests/threadstate/threadstate4.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-/* this pipeline is:
- * { { fakesrc } ! queue ! fakesink }
- */
-
-int
-main (int argc, char *argv[])
-{
- GstElement *fakesrc, *fakesink;
- GstElement *thread, *thread2;
- GstElement *queue;
- gint x;
-
- gst_init (&argc, &argv);
-
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- thread2 = gst_thread_new ("thread");
- g_assert (thread2 != NULL);
-
- queue = gst_element_factory_make ("queue", "the_queue");
- g_assert (queue != NULL);
-
-
- fakesrc = gst_element_factory_make ("fakesrc", "fake_source");
- g_assert (fakesrc != NULL);
-
- fakesink = gst_element_factory_make ("fakesink", "fake_sink");
- g_assert (fakesink != NULL);
-
- gst_bin_add_many (GST_BIN (thread), thread2, queue, fakesink, NULL);
-
- gst_bin_add (GST_BIN (thread2), fakesrc);
- gst_element_add_ghost_pad (thread2, gst_element_get_pad (fakesrc, "src"),
- "src");
- gst_element_link_many (thread2, queue, fakesink, NULL);
-
- for (x = 0; x < 10; x++) {
- g_print ("playing %d\n", x);
- gst_element_set_state (thread, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
-
- g_print ("nulling %d\n", x);
- gst_element_set_state (thread, GST_STATE_NULL);
- g_usleep (G_USEC_PER_SEC);
- }
-
- exit (0);
-}
diff --git a/tests/threadstate/threadstate5.c b/tests/threadstate/threadstate5.c
deleted file mode 100644
index e544d073d8..0000000000
--- a/tests/threadstate/threadstate5.c
+++ /dev/null
@@ -1,52 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-/* this pipeline is:
- * { fakesrc ! { queue ! fakesink } }
- */
-
-int
-main (int argc, char *argv[])
-{
- GstElement *fakesrc, *fakesink;
- GstElement *thread, *thread2;
- GstElement *queue;
- gint x;
-
- gst_init (&argc, &argv);
-
- thread = gst_thread_new ("thread");
- g_assert (thread != NULL);
-
- thread2 = gst_thread_new ("thread");
- g_assert (thread2 != NULL);
-
- queue = gst_element_factory_make ("queue", "the_queue");
- g_assert (queue != NULL);
-
- fakesrc = gst_element_factory_make ("fakesrc", "fake_source");
- g_assert (fakesrc != NULL);
-
- fakesink = gst_element_factory_make ("fakesink", "fake_sink");
- g_assert (fakesink != NULL);
-
- gst_bin_add_many (GST_BIN (thread), fakesrc, thread2, NULL);
- gst_bin_add_many (GST_BIN (thread2), queue, fakesink, NULL);
-
- gst_element_add_ghost_pad (thread2, gst_element_get_pad (queue, "sink"),
- "sink");
- gst_element_link_many (queue, fakesink, NULL);
- gst_element_link_many (fakesrc, thread2, NULL);
-
- for (x = 0; x < 10; x++) {
- g_print ("playing %d\n", x);
- gst_element_set_state (thread, GST_STATE_PLAYING);
- g_usleep (G_USEC_PER_SEC);
-
- g_print ("nulling %d\n", x);
- gst_element_set_state (thread, GST_STATE_NULL);
- g_usleep (G_USEC_PER_SEC);
- }
-
- exit (0);
-}