summaryrefslogtreecommitdiff
path: root/tests/sched
diff options
context:
space:
mode:
authorWim Taymans <wim.taymans@gmail.com>2000-12-22 23:23:10 +0000
committerWim Taymans <wim.taymans@gmail.com>2000-12-22 23:23:10 +0000
commit0062e168ca4f193d2f1f0ba4425e94d8eeabae8c (patch)
treeefa9453d98ce166bdd1739d91879f36c44f1e8c4 /tests/sched
parent9987a75b1ba2e14a80d4ca3c99402f4b3ecbcc2a (diff)
Fixed a bug in gstbin.c the manager was not detected.
Original commit message from CVS: Fixed a bug in gstbin.c the manager was not detected. Some other testcases bin, thread, pipeline use the elementfactory on gst_*_new
Diffstat (limited to 'tests/sched')
-rw-r--r--tests/sched/cases/(fs-i-i-fs).xml54
-rw-r--r--tests/sched/runxml.c25
2 files changed, 50 insertions, 29 deletions
diff --git a/tests/sched/cases/(fs-i-i-fs).xml b/tests/sched/cases/(fs-i-i-fs).xml
index a4ebc74b0..2f49604c7 100644
--- a/tests/sched/cases/(fs-i-i-fs).xml
+++ b/tests/sched/cases/(fs-i-i-fs).xml
@@ -14,7 +14,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -30,14 +30,14 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity2.src</peer>
</pad>
<arg>
<name>GtkObject::user_data</name>
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -46,7 +46,7 @@
</pad>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity2.sink</peer>
</pad>
<arg>
<name>GstIdentity::loop_based</name>
@@ -57,12 +57,12 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity2</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -92,7 +92,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -115,7 +115,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -140,7 +140,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -170,7 +170,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -193,7 +193,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -218,7 +218,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -248,7 +248,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -271,7 +271,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -296,7 +296,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -326,7 +326,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -349,7 +349,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -374,7 +374,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -404,7 +404,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -427,7 +427,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -452,7 +452,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -482,7 +482,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -505,7 +505,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -530,7 +530,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
@@ -560,7 +560,7 @@
<version>0.9.2</version>
<pad>
<name>src</name>
- <peer>identity.sink</peer>
+ <peer>identity1.sink</peer>
</pad>
<arg>
<name>GstFakeSrc::num_sources</name>
@@ -583,7 +583,7 @@
</arg>
</element>
<element>
- <name>identity</name>
+ <name>identity1</name>
<type>identity</type>
<version>0.9.2</version>
<pad>
@@ -608,7 +608,7 @@
<version>0.9.2</version>
<pad>
<name>sink</name>
- <peer>identity.src</peer>
+ <peer>identity1.src</peer>
</pad>
<pad>
<name>src</name>
diff --git a/tests/sched/runxml.c b/tests/sched/runxml.c
index af3883355..e1e2e658a 100644
--- a/tests/sched/runxml.c
+++ b/tests/sched/runxml.c
@@ -1,10 +1,21 @@
#include <gst/gst.h>
+static guint outcount, incount;
+
static void
-buffer_handoff (GstElement *src, GstElement *bin)
+buffer_handoff_sink (GstElement *src, 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, 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 */
@@ -40,6 +51,8 @@ int main(int argc,char *argv[])
src = gst_bin_get_by_name (GST_BIN (bin), "fakesrc");
if (src) {
+ gtk_signal_connect (GTK_OBJECT(src), "handoff",
+ GTK_SIGNAL_FUNC(buffer_handoff_src), bin);
}
else {
g_print ("could not find src element\n");
@@ -49,13 +62,16 @@ int main(int argc,char *argv[])
sink = gst_bin_get_by_name (GST_BIN (bin), "fakesink");
if (sink) {
gtk_signal_connect (GTK_OBJECT(sink), "handoff",
- GTK_SIGNAL_FUNC(buffer_handoff), bin);
+ GTK_SIGNAL_FUNC(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);
@@ -66,6 +82,11 @@ int main(int argc,char *argv[])
gst_bin_iterate(GST_BIN(bin));
}
+ if (outcount != 1 && incount != 1) {
+ g_print ("test failed\n");
+ exit (-1);
+ }
+
toplevelelements = g_list_next (toplevelelements);
}