2001-01-01 00:42:10 +00:00
|
|
|
#include <stdlib.h>
|
2000-09-24 22:45:48 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
gboolean playing;
|
|
|
|
|
|
|
|
/* eos will be called when the src element has an end of stream */
|
2001-01-01 00:42:10 +00:00
|
|
|
void eos(GstElement *element, gpointer data)
|
2000-09-24 22:45:48 +00:00
|
|
|
{
|
|
|
|
g_print("have eos, quitting\n");
|
|
|
|
|
|
|
|
playing = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
int main(int argc,char *argv[])
|
|
|
|
{
|
|
|
|
GstXML *xml;
|
|
|
|
GstElement *bin;
|
2000-09-27 19:33:10 +00:00
|
|
|
GstElement *disk;
|
2000-09-24 22:45:48 +00:00
|
|
|
|
|
|
|
gst_init(&argc,&argv);
|
|
|
|
|
|
|
|
xml = gst_xml_new("xmlTest.gst", NULL);
|
|
|
|
|
|
|
|
bin = gst_xml_get_element(xml, "bin");
|
|
|
|
|
|
|
|
gst_element_set_state(bin, GST_STATE_READY);
|
|
|
|
gst_element_set_state(bin, GST_STATE_PLAYING);
|
|
|
|
|
|
|
|
playing = TRUE;
|
|
|
|
|
|
|
|
while (playing) {
|
|
|
|
gst_bin_iterate(GST_BIN(bin));
|
|
|
|
}
|
|
|
|
|
|
|
|
gst_element_set_state(bin, GST_STATE_NULL);
|
|
|
|
|
|
|
|
exit(0);
|
|
|
|
}
|
|
|
|
|