mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-26 19:51:11 +00:00
4e7f031df7
Original commit message from CVS: Loading and saving of XML pipeline descriptions. GladeXML like operation implemented (you can retrieve parts of a pipeline)
38 lines
645 B
C
38 lines
645 B
C
#include <gst/gst.h>
|
|
|
|
gboolean playing;
|
|
|
|
/* eos will be called when the src element has an end of stream */
|
|
void eos(GstSrc *src, gpointer data)
|
|
{
|
|
g_print("have eos, quitting\n");
|
|
|
|
playing = FALSE;
|
|
}
|
|
|
|
int main(int argc,char *argv[])
|
|
{
|
|
GstXML *xml;
|
|
GstElement *bin;
|
|
GstElement *disk;
|
|
|
|
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);
|
|
}
|
|
|