2001-01-19 00:07:40 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
2001-01-19 22:15:21 +00:00
|
|
|
int
|
|
|
|
main(int argc, char *argv[])
|
2001-01-19 00:07:40 +00:00
|
|
|
{
|
|
|
|
GstElement *element, *mp3parse;
|
|
|
|
GstPadTemplate *templ;
|
|
|
|
GstPad *pad;
|
|
|
|
xmlDocPtr doc;
|
|
|
|
xmlNodePtr parent;
|
|
|
|
|
|
|
|
doc = xmlNewDoc ("1.0");
|
|
|
|
doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
|
|
|
|
|
|
|
|
gst_init(&argc,&argv);
|
|
|
|
|
|
|
|
element = gst_elementfactory_make("tee","element");
|
|
|
|
mp3parse = gst_elementfactory_make("mp3parse","mp3parse");
|
|
|
|
|
|
|
|
pad = gst_element_request_pad_by_name (element, "src%d");
|
|
|
|
g_print ("new pad %s\n", gst_pad_get_name (pad));
|
|
|
|
|
|
|
|
templ = gst_element_get_padtemplate_by_name (mp3parse, "sink");
|
|
|
|
|
2001-01-23 18:42:23 +00:00
|
|
|
pad = gst_element_request_compatible_pad (element, templ);
|
2001-01-19 00:07:40 +00:00
|
|
|
g_print ("new pad %s\n", gst_pad_get_name (pad));
|
|
|
|
|
2001-01-23 18:42:23 +00:00
|
|
|
if (pad != NULL) {
|
|
|
|
parent = xmlNewChild (doc->xmlRootNode, NULL, "Padtemplate", NULL);
|
2001-01-19 00:07:40 +00:00
|
|
|
|
2001-01-23 18:42:23 +00:00
|
|
|
gst_padtemplate_save_thyself (pad->padtemplate, parent);
|
2001-01-19 00:07:40 +00:00
|
|
|
|
2001-01-23 18:42:23 +00:00
|
|
|
xmlDocDump(stdout, doc);
|
|
|
|
}
|
2001-01-19 22:15:21 +00:00
|
|
|
|
2001-01-19 00:07:40 +00:00
|
|
|
return 0;
|
|
|
|
}
|