Cleanups.
[platform/upstream/gstreamer.git] / examples / xml / runxml.c
1 #include <gst/gst.h>
2
3 gboolean playing;
4
5 /* eos will be called when the src element has an end of stream */
6 void eos(GstSrc *src, gpointer data)
7 {
8   g_print("have eos, quitting\n");
9
10   playing = FALSE;
11 }
12
13 int main(int argc,char *argv[]) 
14 {
15   GstXML *xml;
16   GstElement *bin;
17
18   gst_init(&argc,&argv);
19
20   xml = gst_xml_new("xmlTest.gst", NULL);
21
22   bin = gst_xml_get_element(xml, "bin");
23   
24   gst_element_set_state(bin, GST_STATE_READY);
25   gst_element_set_state(bin, GST_STATE_PLAYING);
26
27   playing = TRUE;
28
29   while (playing) {
30     gst_bin_iterate(GST_BIN(bin));
31   }
32
33   gst_element_set_state(bin, GST_STATE_NULL);
34
35   exit(0);
36 }
37