summaryrefslogtreecommitdiff
path: root/tests/sched
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2005-07-22 11:47:10 +0000
committerWim Taymans <wim.taymans@gmail.com>2005-07-22 11:47:10 +0000
commit9f06376babb57b7dba0adb66d3c6e6ae4e5e2a68 (patch)
treef90946107520f6e7ab2bd061da15d9800a3cebdf /tests/sched
parent030ff93e82c2e8709d211cb9acdc90691366d234 (diff)
docs/design/part-events.txt: Small update.
Original commit message from CVS: * docs/design/part-events.txt: Small update. * gst/base/gstbasesink.c: (gst_base_sink_handle_object), (gst_base_sink_do_sync), (gst_base_sink_activate_push), (gst_base_sink_activate_pull): Some more comments. * gst/elements/gstfakesrc.c: (gst_fake_src_class_init), (gst_fake_src_create): Fix handoff marshall. * gst/elements/gstidentity.c: (gst_identity_class_init), (gst_identity_transform_ip): We're a real inplace element. * gst/gstbus.c: (gst_bus_post): Added some comments. * tests/lat.c: (fakesrc), (fakesink), (simple), (queue), (main): * tests/muxing/case1.c: (main): * tests/sched/dynamic-pipeline.c: (main): * tests/sched/interrupt1.c: (main): * tests/sched/interrupt2.c: (main): * tests/sched/interrupt3.c: (main): * tests/sched/runxml.c: (main): * tests/sched/sched-stress.c: (main): * tests/seeking/seeking1.c: (event_received), (main): * tests/threadstate/threadstate2.c: (bus_handler), (timeout_func), (main): * tests/threadstate/threadstate3.c: (main): * tests/threadstate/threadstate4.c: (main): * tests/threadstate/threadstate5.c: (main): Fix the tests.
Diffstat (limited to 'tests/sched')
-rw-r--r--tests/sched/dynamic-pipeline.c5
-rw-r--r--tests/sched/interrupt1.c9
-rw-r--r--tests/sched/interrupt2.c12
-rw-r--r--tests/sched/interrupt3.c11
-rw-r--r--tests/sched/runxml.c6
-rw-r--r--tests/sched/sched-stress.c4
6 files changed, 15 insertions, 32 deletions
diff --git a/tests/sched/dynamic-pipeline.c b/tests/sched/dynamic-pipeline.c
index 70c793dee..a20a3f957 100644
--- a/tests/sched/dynamic-pipeline.c
+++ b/tests/sched/dynamic-pipeline.c
@@ -33,13 +33,14 @@ main (int argc, char *argv[])
/* 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 (fakesrc);
gst_bin_remove (GST_BIN (pipe1), fakesrc);
+ g_usleep (2 * G_USEC_PER_SEC);
gst_bin_remove (GST_BIN (pipe1), fakesink1);
gst_object_unref (pipe1);
@@ -56,7 +57,7 @@ main (int argc, char *argv[])
/* try to iterate the pipeline */
gst_element_set_state (pipe2, GST_STATE_PLAYING);
- gst_bin_iterate (GST_BIN (pipe2));
+ g_usleep (2 * G_USEC_PER_SEC);
gst_element_set_state (pipe2, GST_STATE_NULL);
return 0;
diff --git a/tests/sched/interrupt1.c b/tests/sched/interrupt1.c
index 66d6d6844..b75aa16e8 100644
--- a/tests/sched/interrupt1.c
+++ b/tests/sched/interrupt1.c
@@ -3,7 +3,7 @@
int
main (int argc, char *argv[])
{
- GstElement *pipeline, *thread, *queue, *src, *sink;
+ GstElement *pipeline, *queue, *src, *sink;
gst_init (&argc, &argv);
@@ -13,15 +13,12 @@ main (int argc, char *argv[])
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_bin_add (GST_BIN (pipeline), queue);
+ gst_bin_add (GST_BIN (pipeline), sink);
gst_element_link_pads (src, "src", queue, "sink");
gst_element_link_pads (queue, "src", sink, "sink");
diff --git a/tests/sched/interrupt2.c b/tests/sched/interrupt2.c
index 3907e2942..8d9667d36 100644
--- a/tests/sched/interrupt2.c
+++ b/tests/sched/interrupt2.c
@@ -3,7 +3,7 @@
int
main (int argc, char *argv[])
{
- GstElement *pipeline, *thread, *queue, *src, *identity, *sink;
+ GstElement *pipeline, *queue, *src, *identity, *sink;
gst_init (&argc, &argv);
@@ -13,18 +13,14 @@ main (int argc, char *argv[])
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_bin_add (GST_BIN (pipeline), queue);
+ gst_bin_add (GST_BIN (pipeline), identity);
+ gst_bin_add (GST_BIN (pipeline), sink);
gst_element_link_pads (src, "src", queue, "sink");
gst_element_link_pads (queue, "src", identity, "sink");
diff --git a/tests/sched/interrupt3.c b/tests/sched/interrupt3.c
index 6b05434ea..c4f95252f 100644
--- a/tests/sched/interrupt3.c
+++ b/tests/sched/interrupt3.c
@@ -3,7 +3,7 @@
int
main (int argc, char *argv[])
{
- GstElement *pipeline, *thread, *queue, *src, *adder, *sink;
+ GstElement *pipeline, *queue, *src, *adder, *sink;
GstPad *sinkpad;
gst_init (&argc, &argv);
@@ -15,17 +15,14 @@ main (int argc, char *argv[])
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);
+ gst_bin_add (GST_BIN (pipeline), queue);
+ gst_bin_add (GST_BIN (pipeline), adder);
+ gst_bin_add (GST_BIN (pipeline), sink);
sinkpad = gst_element_get_request_pad (adder, "sink%d");
diff --git a/tests/sched/runxml.c b/tests/sched/runxml.c
index ef3db5a24..db2094ec0 100644
--- a/tests/sched/runxml.c
+++ b/tests/sched/runxml.c
@@ -78,12 +78,6 @@ main (int argc, char *argv[])
/* 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);
diff --git a/tests/sched/sched-stress.c b/tests/sched/sched-stress.c
index b058a41a6..cd8ca537c 100644
--- a/tests/sched/sched-stress.c
+++ b/tests/sched/sched-stress.c
@@ -6,7 +6,7 @@ int
main (int argc, char *argv[])
{
GstElement *bin, *src, *dec, *sink;
- int i, j;
+ int i;
gst_init (&argc, &argv);
@@ -20,8 +20,6 @@ main (int argc, char *argv[])
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);
}