7 G_GNUC_UNUSED static void
8 xml_loaded (GstXML * xml, GstObject * object, xmlNodePtr self, gpointer data)
10 xmlNodePtr children = self->xmlChildrenNode;
13 if (!strcmp (children->name, "comment")) {
14 xmlNodePtr nodes = children->xmlChildrenNode;
17 if (!strcmp (nodes->name, "text")) {
18 gchar *name = g_strdup (xmlNodeGetContent (nodes));
20 g_print ("object %s loaded with comment '%s'\n",
21 gst_object_get_name (object), name);
26 children = children->next;
31 main (int argc, char *argv[])
37 gst_init (&argc, &argv);
41 /* g_signal_connect (G_OBJECT (xml), "object_loaded", */
42 /* G_CALLBACK (xml_loaded), xml); */
45 ret = gst_xml_parse_file (xml, argv[1], NULL);
47 ret = gst_xml_parse_file (xml, "xmlTest.gst", NULL);
49 g_assert (ret == TRUE);
51 pipeline = gst_xml_get_element (xml, "pipeline");
52 g_assert (pipeline != NULL);
54 gst_element_set_state (pipeline, GST_STATE_PLAYING);
56 while (gst_bin_iterate (GST_BIN (pipeline)));
58 gst_element_set_state (pipeline, GST_STATE_NULL);