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));
19 g_print ("object %s loaded with comment '%s'\n",
20 gst_object_get_name (object), name);
25 children = children->next;
29 int main(int argc,char *argv[])
35 gst_init(&argc,&argv);
39 // g_signal_connect (G_OBJECT (xml), "object_loaded",
40 // G_CALLBACK (xml_loaded), xml);
43 ret = gst_xml_parse_file(xml, argv[1], NULL);
45 ret = gst_xml_parse_file(xml, "xmlTest.gst", NULL);
47 g_assert (ret == TRUE);
49 pipeline = gst_xml_get_element(xml, "pipeline");
50 g_assert (pipeline != NULL);
52 gst_element_set_state(pipeline, GST_STATE_PLAYING);
54 while (gst_bin_iterate(GST_BIN(pipeline)));
56 gst_element_set_state(pipeline, GST_STATE_NULL);