3 /* these caps all have a non empty intersection */
4 GstStaticCaps sinkcaps = GST_STATIC_CAPS (
12 GstStaticCaps mp1parsecaps = GST_STATIC_CAPS (
22 GstStaticCaps rawcaps = GST_STATIC_CAPS (
24 "width=(int)[16,4096], "
25 "height=(int)[16,4096]"
28 GstStaticCaps rawcaps2 = GST_STATIC_CAPS (
30 "height=(int)[16,256], "
34 GstStaticCaps rawcaps3 = GST_STATIC_CAPS (
36 "fourcc=(fourcc){\"YUY2\", \"YV12\" }, "
37 "height=(int)[16,4096]"
40 GstStaticCaps rawcaps4 = GST_STATIC_CAPS (
42 "fourcc=(fourcc){\"YUY2\",\"YV12\",\"YUYV\" }, "
43 "height=(int)[16,4096]"
46 GstStaticCaps rawcaps5 = GST_STATIC_CAPS (
48 "fourcc=(fourcc){\"YUYV\",\"YUY2\"}, "
49 "height=(int)[16,4096]"
52 GstStaticCaps rawcaps6 = GST_STATIC_CAPS (
54 "fourcc=(fourcc)\"YUYV\", "
57 "framerate=(double)30.0; "
59 "fourcc=(fourcc)\"I420\", "
62 "framerate=(double)30.0"
66 main (int argc, char *argv[])
72 gst_init (&argc, &argv);
74 doc = xmlNewDoc ("1.0");
75 doc->xmlRootNode = xmlNewDocNode (doc, NULL, "Capabilities", NULL);
79 for (i = 0; i<100000; i++) {
80 caps = gst_caps_intersect (gst_static_caps_get (rawcaps3), GST_CAPS_GET (rawcaps4));
81 gst_caps_unref (caps);
86 caps = gst_caps_intersect (gst_static_caps_get (&sinkcaps),
87 gst_static_caps_get (&mp1parsecaps));
88 parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities1", NULL);
89 gst_caps_save_thyself (caps, parent);
91 caps = gst_caps_intersect (gst_static_caps_get (&rawcaps),
92 gst_static_caps_get (&rawcaps2));
93 parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities2", NULL);
94 gst_caps_save_thyself (caps, parent);
96 caps = gst_caps_intersect (gst_static_caps_get (&rawcaps3),
97 gst_static_caps_get (&rawcaps4));
98 parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities3", NULL);
99 gst_caps_save_thyself (caps, parent);
101 caps = gst_caps_intersect (gst_static_caps_get (&rawcaps3),
102 gst_static_caps_get (&rawcaps5));
103 parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities4", NULL);
104 gst_caps_save_thyself (caps, parent);
106 caps = gst_caps_intersect (gst_static_caps_get (&rawcaps6),
107 gst_caps_copy_1(gst_static_caps_get (&rawcaps6)));
108 parent = xmlNewChild (doc->xmlRootNode, NULL, "Capabilities5", NULL);
109 gst_caps_save_thyself (caps, parent);
111 xmlDocDump(stdout, doc);