2003-06-13 19:12:33 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
|
|
|
/* these caps all have a non empty intersection */
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps sinkcaps = GST_STATIC_CAPS ("video/mpeg, "
|
2003-12-22 01:39:35 +00:00
|
|
|
"mpegtype:int=1, "
|
2004-03-13 15:27:01 +00:00
|
|
|
"foo1:int=[20,40], " "foo2:int=[20,40], " "foo3:int=[10,20]");
|
2003-06-13 19:12:33 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, "
|
|
|
|
"mpegtype:int=1, " "foo1:int=30, " "foo2:int=[20,30], " "foo3:int=[20,30]");
|
2003-06-13 19:12:33 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2003-06-13 19:12:33 +00:00
|
|
|
{
|
|
|
|
xmlDocPtr doc;
|
|
|
|
xmlNodePtr parent;
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
|
|
|
|
doc = xmlNewDoc ("1.0");
|
|
|
|
doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
|
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
caps = gst_caps_union (gst_static_caps_get (&sinkcaps),
|
|
|
|
gst_static_caps_get (&mp1parsecaps));
|
2003-06-13 19:12:33 +00:00
|
|
|
parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL);
|
|
|
|
gst_caps_save_thyself (caps, parent);
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
xmlDocDump (stdout, doc);
|
2003-06-13 19:12:33 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|