applied some simple fixing to some examples re-enabled the working examples
authorStefan Kost <ensonic@users.sourceforge.net>
Mon, 12 Dec 2005 14:02:18 +0000 (14:02 +0000)
committerStefan Kost <ensonic@users.sourceforge.net>
Mon, 12 Dec 2005 14:02:18 +0000 (14:02 +0000)
Original commit message from CVS:
* configure.ac:
* docs/random/ensonic/media-device-daemon.txt:
* tests/examples/controller/.cvsignore:
* tests/examples/controller/Makefile.am:
* tests/examples/controller/audio-example.c: (main):
* tests/examples/helloworld/.cvsignore:
* tests/examples/helloworld/Makefile.am:
* tests/examples/helloworld/helloworld.c: (event_loop), (main):
* tests/examples/launch/.cvsignore:
* tests/examples/launch/Makefile.am:
* tests/examples/launch/mp3parselaunch.c: (event_loop), (main):
* tests/examples/metadata/.cvsignore:
* tests/examples/metadata/Makefile.am:
* tests/examples/metadata/read-metadata.c: (message_loop),
(make_pipeline), (print_tag), (main):
* tests/examples/queue/.cvsignore:
* tests/examples/queue/Makefile.am:
* tests/examples/queue/queue.c: (event_loop), (main):
* tests/examples/typefind/.cvsignore:
* tests/examples/typefind/Makefile.am:
* tests/examples/typefind/typefind.c: (type_found), (event_loop),
(main):
* tests/examples/xml/.cvsignore:
* tests/examples/xml/Makefile.am:
* tests/examples/xml/createxml.c: (object_saved), (main):
* tests/examples/xml/runxml.c: (xml_loaded), (event_loop), (main):
* tests/old/examples/Makefile.am:
* tests/old/examples/TODO:
* tests/old/examples/controller/.cvsignore:
* tests/old/examples/controller/Makefile.am:
* tests/old/examples/controller/audio-example.c:
* tests/old/examples/helloworld/.cvsignore:
* tests/old/examples/helloworld/Makefile.am:
* tests/old/examples/helloworld/helloworld.c:
* tests/old/examples/launch/.cvsignore:
* tests/old/examples/launch/Makefile.am:
* tests/old/examples/launch/mp3parselaunch.c:
* tests/old/examples/launch/mp3play:
* tests/old/examples/manual/Makefile.am:
* tests/old/examples/metadata/Makefile.am:
* tests/old/examples/metadata/read-metadata.c:
* tests/old/examples/queue/.cvsignore:
* tests/old/examples/queue/Makefile.am:
* tests/old/examples/queue/queue.c:
* tests/old/examples/typefind/.cvsignore:
* tests/old/examples/typefind/Makefile.am:
* tests/old/examples/typefind/typefind.c:
* tests/old/examples/xml/.cvsignore:
* tests/old/examples/xml/Makefile.am:
* tests/old/examples/xml/createxml.c:
* tests/old/examples/xml/runxml.c:
applied some simple fixing to some examples
re-enabled the working examples

31 files changed:
ChangeLog
configure.ac
docs/random/ensonic/media-device-daemon.txt
tests/examples/controller/.gitignore [moved from tests/old/examples/controller/.gitignore with 100% similarity]
tests/examples/controller/Makefile.am [moved from tests/old/examples/controller/Makefile.am with 100% similarity]
tests/examples/controller/audio-example.c [moved from tests/old/examples/controller/audio-example.c with 100% similarity]
tests/examples/helloworld/.gitignore [moved from tests/old/examples/helloworld/.gitignore with 100% similarity]
tests/examples/helloworld/Makefile.am [moved from tests/old/examples/helloworld/Makefile.am with 100% similarity]
tests/examples/helloworld/helloworld.c [moved from tests/old/examples/helloworld/helloworld.c with 100% similarity]
tests/examples/launch/.gitignore [moved from tests/old/examples/launch/.gitignore with 79% similarity]
tests/examples/launch/Makefile.am [moved from tests/old/examples/launch/Makefile.am with 100% similarity]
tests/examples/launch/mp3parselaunch.c [new file with mode: 0644]
tests/examples/metadata/.gitignore [new file with mode: 0644]
tests/examples/metadata/Makefile.am [moved from tests/old/examples/metadata/Makefile.am with 100% similarity]
tests/examples/metadata/read-metadata.c [moved from tests/old/examples/metadata/read-metadata.c with 100% similarity]
tests/examples/queue/.gitignore [moved from tests/old/examples/queue/.gitignore with 100% similarity]
tests/examples/queue/Makefile.am [moved from tests/old/examples/queue/Makefile.am with 100% similarity]
tests/examples/queue/queue.c [moved from tests/old/examples/queue/queue.c with 100% similarity]
tests/examples/typefind/.gitignore [moved from tests/old/examples/typefind/.gitignore with 100% similarity]
tests/examples/typefind/Makefile.am [moved from tests/old/examples/typefind/Makefile.am with 100% similarity]
tests/examples/typefind/typefind.c [moved from tests/old/examples/typefind/typefind.c with 55% similarity]
tests/examples/xml/.gitignore [moved from tests/old/examples/xml/.gitignore with 100% similarity]
tests/examples/xml/Makefile.am [moved from tests/old/examples/xml/Makefile.am with 100% similarity]
tests/examples/xml/createxml.c [moved from tests/old/examples/xml/createxml.c with 100% similarity]
tests/examples/xml/runxml.c [new file with mode: 0644]
tests/old/examples/Makefile.am
tests/old/examples/TODO [new file with mode: 0644]
tests/old/examples/launch/mp3parselaunch.c [deleted file]
tests/old/examples/launch/mp3play [deleted file]
tests/old/examples/manual/Makefile.am
tests/old/examples/xml/runxml.c [deleted file]

index 4be1e58..5e1ccbb 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,59 @@
+2005-12-12  Stefan Kost  <ensonic@users.sf.net>
+
+       * configure.ac:
+       * docs/random/ensonic/media-device-daemon.txt:
+       * tests/examples/controller/.cvsignore:
+       * tests/examples/controller/Makefile.am:
+       * tests/examples/controller/audio-example.c: (main):
+       * tests/examples/helloworld/.cvsignore:
+       * tests/examples/helloworld/Makefile.am:
+       * tests/examples/helloworld/helloworld.c: (event_loop), (main):
+       * tests/examples/launch/.cvsignore:
+       * tests/examples/launch/Makefile.am:
+       * tests/examples/launch/mp3parselaunch.c: (event_loop), (main):
+       * tests/examples/metadata/.cvsignore:
+       * tests/examples/metadata/Makefile.am:
+       * tests/examples/metadata/read-metadata.c: (message_loop),
+       (make_pipeline), (print_tag), (main):
+       * tests/examples/queue/.cvsignore:
+       * tests/examples/queue/Makefile.am:
+       * tests/examples/queue/queue.c: (event_loop), (main):
+       * tests/examples/typefind/.cvsignore:
+       * tests/examples/typefind/Makefile.am:
+       * tests/examples/typefind/typefind.c: (type_found), (event_loop),
+       (main):
+       * tests/examples/xml/.cvsignore:
+       * tests/examples/xml/Makefile.am:
+       * tests/examples/xml/createxml.c: (object_saved), (main):
+       * tests/examples/xml/runxml.c: (xml_loaded), (event_loop), (main):
+       * tests/old/examples/Makefile.am:
+       * tests/old/examples/TODO:
+       * tests/old/examples/controller/.cvsignore:
+       * tests/old/examples/controller/Makefile.am:
+       * tests/old/examples/controller/audio-example.c:
+       * tests/old/examples/helloworld/.cvsignore:
+       * tests/old/examples/helloworld/Makefile.am:
+       * tests/old/examples/helloworld/helloworld.c:
+       * tests/old/examples/launch/.cvsignore:
+       * tests/old/examples/launch/Makefile.am:
+       * tests/old/examples/launch/mp3parselaunch.c:
+       * tests/old/examples/launch/mp3play:
+       * tests/old/examples/manual/Makefile.am:
+       * tests/old/examples/metadata/Makefile.am:
+       * tests/old/examples/metadata/read-metadata.c:
+       * tests/old/examples/queue/.cvsignore:
+       * tests/old/examples/queue/Makefile.am:
+       * tests/old/examples/queue/queue.c:
+       * tests/old/examples/typefind/.cvsignore:
+       * tests/old/examples/typefind/Makefile.am:
+       * tests/old/examples/typefind/typefind.c:
+       * tests/old/examples/xml/.cvsignore:
+       * tests/old/examples/xml/Makefile.am:
+       * tests/old/examples/xml/createxml.c:
+       * tests/old/examples/xml/runxml.c:
+         applied some simple fixing to some examples
+         re-enabled the working examples
+
 2005-12-12  Wim Taymans  <wim@fluendo.com>
 
        * gst/gstsegment.c: (gst_segment_init),
index aa7d242..db886a6 100644 (file)
@@ -498,6 +498,29 @@ tests/Makefile
 tests/benchmarks/Makefile
 tests/check/Makefile
 tests/misc/Makefile
+tests/examples/Makefile
+tests/examples/controller/Makefile
+tests/examples/helloworld/Makefile
+tests/examples/launch/Makefile
+tests/examples/metadata/Makefile
+tests/examples/queue/Makefile
+tests/examples/typefind/Makefile
+tests/examples/xml/Makefile
+tests/old/examples/Makefile
+tests/old/examples/appreader/Makefile
+tests/old/examples/cutter/Makefile
+tests/old/examples/events/Makefile
+tests/old/examples/helloworld2/Makefile
+tests/old/examples/manual/Makefile
+tests/old/examples/mixer/Makefile
+tests/old/examples/pingpong/Makefile
+tests/old/examples/plugins/Makefile
+tests/old/examples/pwg/Makefile
+tests/old/examples/queue2/Makefile
+tests/old/examples/queue3/Makefile
+tests/old/examples/queue4/Makefile
+tests/old/examples/retag/Makefile
+tests/old/examples/thread/Makefile
 tools/Makefile
 common/Makefile
 common/m4/Makefile
index 46e3d61..b634dd1 100644 (file)
@@ -1,21 +1,33 @@
 $Id$
 
+components
+================================================================================
+
+- daemon process
+  - is a gstreamer appliation
+  - open physical sink, src elements
+  - prepends an adder to sinks
+  - appends an tee to sources
+
 - 4 new elements
-  virtual-audiosink, virtual-videosink
-  virtual-audiosrc, virtual-videosrc
+  - virtual-audiosink, virtual-videosink
+    virtual-audiosrc, virtual-videosrc
+  - virtual sinks establish a connection to the daemon
+  - they link to request_pads of the adder/tee elements
+
+- gui app
+  - lists instances as mixing-desk like channelstrips
+  - channelstrips would contain
+    - audio
+      - volume, panorama, 3-band eq
+    - video
+      - brightness, contrast, alpha-level
+  - user can
+    - add insert-fx
+    - route channel to targets, where targets can be real sinks or more
+      virtual-sinks (sub-groups)
+  - virtual sinks need queues to decouple application processes
 
-- daemon that holds list of instances
-- gui app that lists instances as mixing-desk like channelstrips
-- channelstrips would contain
-  - audio
-    - volume, panorama, 3-band eq
-  - video
-    - brightness, contrast, alpha-level
-- user can
-  - add insert-fx
-  - route channel to targets, where targets can be real sinks or more
-    virtual-sinks (sub-groups)
-- virtual sinks need queues to decouple application processes
 - interfaces
   - expose child-elements via child-proxy
     - then e.g. the applications volume-control could directly access the
diff --git a/tests/examples/launch/mp3parselaunch.c b/tests/examples/launch/mp3parselaunch.c
new file mode 100644 (file)
index 0000000..1e7ea7c
--- /dev/null
@@ -0,0 +1,74 @@
+#include <stdlib.h>
+#include <gst/gst.h>
+
+static void
+event_loop (GstElement * pipe)
+{
+  GstBus *bus;
+  GstMessage *message = NULL;
+
+  bus = gst_element_get_bus (GST_ELEMENT (pipe));
+
+  while (TRUE) {
+    message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
+
+    g_assert (message != NULL);
+
+    switch (message->type) {
+      case GST_MESSAGE_EOS:
+        gst_message_unref (message);
+        return;
+      case GST_MESSAGE_WARNING:
+      case GST_MESSAGE_ERROR:{
+        GError *gerror;
+        gchar *debug;
+
+        gst_message_parse_error (message, &gerror, &debug);
+        gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+        gst_message_unref (message);
+        g_error_free (gerror);
+        g_free (debug);
+        return;
+      }
+      default:
+        gst_message_unref (message);
+        break;
+    }
+  }
+}
+
+int
+main (int argc, char *argv[])
+{
+  GstElement *bin;
+  GstElement *filesrc;
+  GError *error = NULL;
+
+  gst_init (&argc, &argv);
+
+  if (argc != 2) {
+    g_print ("usage: %s <mp3 file>\n", argv[0]);
+    exit (-1);
+  }
+
+  bin = (GstElement *)
+      gst_parse_launch ("filesrc name=my_filesrc ! mad ! osssink", &error);
+  if (!bin) {
+    fprintf (stderr, "Parse error: %s", error->message);
+    exit (-1);
+  }
+
+  filesrc = gst_bin_get_by_name (GST_BIN (bin), "my_filesrc");
+  g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
+
+  /* start playing */
+  gst_element_set_state (bin, GST_STATE_PLAYING);
+
+  /* Run event loop listening for bus messages until EOS or ERROR */
+  event_loop (bin);
+
+  /* stop the bin */
+  gst_element_set_state (bin, GST_STATE_NULL);
+
+  exit (0);
+}
diff --git a/tests/examples/metadata/.gitignore b/tests/examples/metadata/.gitignore
new file mode 100644 (file)
index 0000000..c875051
--- /dev/null
@@ -0,0 +1,5 @@
+read-metadata
+*.bb
+*.bbg
+*.da
+
similarity index 55%
rename from tests/old/examples/typefind/typefind.c
rename to tests/examples/typefind/typefind.c
index 1640ce2..a145fb0 100644 (file)
@@ -1,6 +1,6 @@
 #include <gst/gst.h>
 
-void
+static void
 type_found (GstElement * typefind, const GstCaps * caps)
 {
   xmlDocPtr doc;
@@ -16,6 +16,42 @@ type_found (GstElement * typefind, const GstCaps * caps)
   xmlDocDump (stdout, doc);
 }
 
+static void
+event_loop (GstElement * pipe)
+{
+  GstBus *bus;
+  GstMessage *message = NULL;
+
+  bus = gst_element_get_bus (GST_ELEMENT (pipe));
+
+  while (TRUE) {
+    message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
+
+    g_assert (message != NULL);
+
+    switch (message->type) {
+      case GST_MESSAGE_EOS:
+        gst_message_unref (message);
+        return;
+      case GST_MESSAGE_WARNING:
+      case GST_MESSAGE_ERROR:{
+        GError *gerror;
+        gchar *debug;
+
+        gst_message_parse_error (message, &gerror, &debug);
+        gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+        gst_message_unref (message);
+        g_error_free (gerror);
+        g_free (debug);
+        return;
+      }
+      default:
+        gst_message_unref (message);
+        break;
+    }
+  }
+}
+
 int
 main (int argc, char *argv[])
 {
@@ -50,11 +86,13 @@ main (int argc, char *argv[])
   gst_element_link (filesrc, typefind);
 
   /* start playing */
-  gst_element_set_state (GST_ELEMENT (bin), GST_STATE_PLAYING);
+  gst_element_set_state (bin, GST_STATE_PLAYING);
 
-  gst_bin_iterate (GST_BIN (bin));
+  /* Run event loop listening for bus messages until EOS or ERROR */
+  event_loop (bin);
 
-  gst_element_set_state (GST_ELEMENT (bin), GST_STATE_NULL);
+  /* stop the bin */
+  gst_element_set_state (bin, GST_STATE_NULL);
 
   exit (0);
 }
diff --git a/tests/examples/xml/runxml.c b/tests/examples/xml/runxml.c
new file mode 100644 (file)
index 0000000..3f63d1a
--- /dev/null
@@ -0,0 +1,101 @@
+#include <string.h>
+#include <stdlib.h>
+#include <gst/gst.h>
+
+gboolean playing;
+
+G_GNUC_UNUSED static void
+xml_loaded (GstXML * xml, GstObject * object, xmlNodePtr self, gpointer data)
+{
+  xmlNodePtr children = self->xmlChildrenNode;
+
+  while (children) {
+    if (!strcmp (children->name, "comment")) {
+      xmlNodePtr nodes = children->xmlChildrenNode;
+
+      while (nodes) {
+        if (!strcmp (nodes->name, "text")) {
+          gchar *name = g_strdup (xmlNodeGetContent (nodes));
+
+          g_print ("object %s loaded with comment '%s'\n",
+              gst_object_get_name (object), name);
+        }
+        nodes = nodes->next;
+      }
+    }
+    children = children->next;
+  }
+}
+
+static void
+event_loop (GstElement * pipe)
+{
+  GstBus *bus;
+  GstMessage *message = NULL;
+
+  bus = gst_element_get_bus (GST_ELEMENT (pipe));
+
+  while (TRUE) {
+    message = gst_bus_poll (bus, GST_MESSAGE_ANY, -1);
+
+    g_assert (message != NULL);
+
+    switch (message->type) {
+      case GST_MESSAGE_EOS:
+        gst_message_unref (message);
+        return;
+      case GST_MESSAGE_WARNING:
+      case GST_MESSAGE_ERROR:{
+        GError *gerror;
+        gchar *debug;
+
+        gst_message_parse_error (message, &gerror, &debug);
+        gst_object_default_error (GST_MESSAGE_SRC (message), gerror, debug);
+        gst_message_unref (message);
+        g_error_free (gerror);
+        g_free (debug);
+        return;
+      }
+      default:
+        gst_message_unref (message);
+        break;
+    }
+  }
+}
+
+int
+main (int argc, char *argv[])
+{
+  GstXML *xml;
+  GstElement *bin;
+  gboolean ret;
+
+  gst_init (&argc, &argv);
+
+  if (argc != 2) {
+    g_print ("usage: %s <xml pipeline description>\n", argv[0]);
+    exit (-1);
+  }
+
+  xml = gst_xml_new ();
+
+/*  g_signal_connect (G_OBJECT (xml), "object_loaded", */
+/*                  G_CALLBACK (xml_loaded), xml); */
+
+  ret = gst_xml_parse_file (xml, argv[1], NULL);
+  g_assert (ret == TRUE);
+
+  bin = gst_xml_get_element (xml, "pipeline");
+  g_assert (bin != NULL);
+
+  /* start playing */
+  gst_element_set_state (bin, GST_STATE_PLAYING);
+
+  /* Run event loop listening for bus messages until EOS or ERROR */
+  event_loop (bin);
+
+  /* stop the bin */
+  gst_element_set_state (bin, GST_STATE_NULL);
+
+  exit (0);
+}
index e73eaab..1a10763 100644 (file)
@@ -1,29 +1,23 @@
-if GST_DISABLE_LOADSAVE
-GST_LOADSAVE_DIRS = 
-else
-GST_LOADSAVE_DIRS = xml typefind
-endif
+# these example currently don't build (see TODO)
 
-dirs = \
-       helloworld                      \
-       queue                           \
-       launch                          \
-       thread                          \
-       plugins                         \
-       mixer                           \
-       metadata                        \
-       controller                      \
-       cutter                          \
-       pingpong                        \
-       manual                          \
-       pwg                             \
-       retag
+dirs =
 
-#queue2                                \
-#queue3                                \
-#queue4                                
+#appreader
+#cutter
+#events
+#helloworld2
+#launch
+#manual
+#mixer
+#pingpong
+#plugins
+#pwg
+#queue2
+#queue3
+#queue4
+#retag
+#thread
 
-SUBDIRS = $(dirs)                      \
-       $(GST_LOADSAVE_DIRS)
+SUBDIRS = $(dirs)
 
-DIST_SUBDIRS = $(dirs) xml typefind
+DIST_SUBDIRS = $(dirs)
diff --git a/tests/old/examples/TODO b/tests/old/examples/TODO
new file mode 100644 (file)
index 0000000..5666107
--- /dev/null
@@ -0,0 +1,66 @@
+state of the examples:
+
+appreader
+controller
+  okay
+cutter
+events
+helloworld
+helloworld2
+manual
+metadata
+mixer
+pingpong
+plugins
+pwg
+queue
+queue2
+queue3
+queue4
+retag
+typefind
+xml
+
+----
+
+appreader
+  gst_bin_iterate
+
+cutter
+  gst_bin_iterate
+
+events
+  gst_bin_iterate
+  gst_event_new_seek
+  gst_event_new_flush
+
+helloworld
+  GstAutoplug
+
+manual
+  dynamic
+    gst_registry_pool_feature_filter
+
+mixer
+  gst_bin_iterate
+  gst_scheduler_show
+  gst_element_add_ghost_pad
+
+pingpong
+  gst_bin_iterate
+  gst_element_add_ghost_pad
+  gst_element_default_deep_notify
+
+plugins
+  lots of errors
+
+pwg
+  lots of errors
+
+retag
+  gst_tag_setter_
+  gst_bin_iterate
+
+thread
+  obsolete, uses gst_thread_new
+
diff --git a/tests/old/examples/launch/mp3parselaunch.c b/tests/old/examples/launch/mp3parselaunch.c
deleted file mode 100644 (file)
index 5fe06de..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-#include <stdlib.h>
-#include <gst/gst.h>
-
-int
-main (int argc, char *argv[])
-{
-  GstElement *pipeline;
-  GstElement *filesrc;
-  GError *error = NULL;
-
-  gst_init (&argc, &argv);
-
-  if (argc != 2) {
-    g_print ("usage: %s <filename>\n", argv[0]);
-    return -1;
-  }
-
-  pipeline = (GstElement *)
-      gst_parse_launch ("filesrc name=my_filesrc ! mad ! osssink", &error);
-  if (!pipeline) {
-    fprintf (stderr, "Parse error: %s", error->message);
-    exit (1);
-  }
-
-  filesrc = gst_bin_get_by_name (GST_BIN (pipeline), "my_filesrc");
-  g_object_set (G_OBJECT (filesrc), "location", argv[1], NULL);
-
-  gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
-  while (gst_bin_iterate (GST_BIN (pipeline)));
-
-  gst_element_set_state (pipeline, GST_STATE_NULL);
-
-  return 0;
-}
diff --git a/tests/old/examples/launch/mp3play b/tests/old/examples/launch/mp3play
deleted file mode 100755 (executable)
index 5577c3b..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#! /bin/sh
-for loc in "$@"; do
-../../tools/gst-launch filesrc location="$loc" ! mp3parse ! mad ! osssink
-done
index 0230def..2f2c1fb 100644 (file)
@@ -94,7 +94,7 @@ xml-mp3.c: $(top_srcdir)/docs/manual/highlevel-xml.xml
 
 # we use some of the examples as testsuite apps, to verify that
 # they actually run
-include $(top_srcdir)/testsuite/Rules
+include $(top_srcdir)/tests/old/testsuite/Rules
                                                                                 
 tests_pass = elementmake elementget init goption
 tests_fail =
diff --git a/tests/old/examples/xml/runxml.c b/tests/old/examples/xml/runxml.c
deleted file mode 100644 (file)
index 853634f..0000000
+++ /dev/null
@@ -1,61 +0,0 @@
-#include <string.h>
-#include <stdlib.h>
-#include <gst/gst.h>
-
-gboolean playing;
-
-G_GNUC_UNUSED static void
-xml_loaded (GstXML * xml, GstObject * object, xmlNodePtr self, gpointer data)
-{
-  xmlNodePtr children = self->xmlChildrenNode;
-
-  while (children) {
-    if (!strcmp (children->name, "comment")) {
-      xmlNodePtr nodes = children->xmlChildrenNode;
-
-      while (nodes) {
-        if (!strcmp (nodes->name, "text")) {
-          gchar *name = g_strdup (xmlNodeGetContent (nodes));
-
-          g_print ("object %s loaded with comment '%s'\n",
-              gst_object_get_name (object), name);
-        }
-        nodes = nodes->next;
-      }
-    }
-    children = children->next;
-  }
-}
-
-int
-main (int argc, char *argv[])
-{
-  GstXML *xml;
-  GstElement *pipeline;
-  gboolean ret;
-
-  gst_init (&argc, &argv);
-
-  xml = gst_xml_new ();
-
-/*  g_signal_connect (G_OBJECT (xml), "object_loaded", */
-/*                  G_CALLBACK (xml_loaded), xml); */
-
-  if (argc == 2)
-    ret = gst_xml_parse_file (xml, argv[1], NULL);
-  else
-    ret = gst_xml_parse_file (xml, "xmlTest.gst", NULL);
-
-  g_assert (ret == TRUE);
-
-  pipeline = gst_xml_get_element (xml, "pipeline");
-  g_assert (pipeline != NULL);
-
-  gst_element_set_state (pipeline, GST_STATE_PLAYING);
-
-  while (gst_bin_iterate (GST_BIN (pipeline)));
-
-  gst_element_set_state (pipeline, GST_STATE_NULL);
-
-  exit (0);
-}