2002-01-13 22:46:34 +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
|
|
|
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
|
2004-03-13 15:27:01 +00:00
|
|
|
"foo1=(int)[20,40], " "foo2=(int)[20,40], " "foo3=(int)[10,20]");
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, "
|
|
|
|
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "foo4=(fourcc){\"YV12\",\"YUY2\"}");
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps rawcaps = GST_STATIC_CAPS ("video/raw, "
|
2003-12-22 01:39:35 +00:00
|
|
|
"width=(int)[16,4096], "
|
2004-03-13 15:27:01 +00:00
|
|
|
"height=(int)[16,4096], " "fourcc=(fourcc){\"YV12\",\"YUY2\"}");
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/raw, "
|
2003-12-22 01:39:35 +00:00
|
|
|
"width=(int)[16,256], "
|
2004-03-13 15:27:01 +00:00
|
|
|
"height=(int)16; " "video/raw, " "width=(int)[16,256], " "height=(int)16");
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps rawcaps3 = GST_STATIC_CAPS ("video/raw, "
|
2003-12-22 01:39:35 +00:00
|
|
|
"width=(int)[16,256], "
|
|
|
|
"height=(int)16; "
|
2004-03-13 15:27:01 +00:00
|
|
|
"video/raw, "
|
2003-12-22 01:39:35 +00:00
|
|
|
"width=(int)[16,256], "
|
|
|
|
"height=(int)16; "
|
2004-03-13 15:27:01 +00:00
|
|
|
"video/raw, "
|
|
|
|
"fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "height=(int)[16,4096]");
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
GstStaticCaps rawcaps4 = GST_STATIC_CAPS ("x, "
|
|
|
|
"y=(int){1,2}, " "z=(int){3,4}; " "a, " "b=(int){5,6}, " "c=(int){7,8}");
|
2004-01-01 02:17:44 +00:00
|
|
|
|
2002-04-11 10:36:41 +00:00
|
|
|
/* defined, not used
|
2002-01-13 22:46:34 +00:00
|
|
|
GST_CAPS_FACTORY (rawcaps4,
|
|
|
|
GST_CAPS_NEW (
|
|
|
|
"raw2_sink_caps",
|
|
|
|
"video/raw",
|
|
|
|
"fourcc", GST_PROPS_LIST (
|
|
|
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2")),
|
|
|
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YV12")),
|
2005-10-15 15:53:14 +00:00
|
|
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUYV"))
|
2005-12-06 19:29:15 +00:00
|
|
|
),
|
|
|
|
"height", GST_PROPS_INT_RANGE (16, 4096)
|
2002-01-13 22:46:34 +00:00
|
|
|
)
|
|
|
|
);
|
|
|
|
|
|
|
|
GST_CAPS_FACTORY (rawcaps5,
|
|
|
|
GST_CAPS_NEW (
|
|
|
|
"raw2_sink_caps",
|
|
|
|
"video/raw",
|
|
|
|
"fourcc", GST_PROPS_LIST (
|
|
|
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUYV")),
|
|
|
|
GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2"))
|
2005-12-06 19:29:15 +00:00
|
|
|
),
|
2002-01-13 22:46:34 +00:00
|
|
|
"height", GST_PROPS_INT_RANGE (16, 4096)
|
|
|
|
)
|
|
|
|
);
|
2002-04-11 10:36:41 +00:00
|
|
|
*/
|
|
|
|
|
2004-03-13 15:27:01 +00:00
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
2002-01-13 22:46:34 +00:00
|
|
|
{
|
|
|
|
GstCaps *caps;
|
|
|
|
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
caps = gst_caps_normalize (gst_static_caps_get (&sinkcaps));
|
2004-01-01 02:17:44 +00:00
|
|
|
g_print ("\n%s\n", gst_caps_to_string (caps));
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
caps = gst_caps_normalize (gst_static_caps_get (&mp1parsecaps));
|
2004-01-01 02:17:44 +00:00
|
|
|
g_print ("\n%s\n", gst_caps_to_string (caps));
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
caps = gst_caps_normalize (gst_static_caps_get (&rawcaps));
|
2004-01-01 02:17:44 +00:00
|
|
|
g_print ("\n%s\n", gst_caps_to_string (caps));
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
caps = gst_caps_normalize (gst_static_caps_get (&rawcaps2));
|
2004-01-01 02:17:44 +00:00
|
|
|
g_print ("\n%s\n", gst_caps_to_string (caps));
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2003-12-22 01:39:35 +00:00
|
|
|
caps = gst_caps_normalize (gst_static_caps_get (&rawcaps3));
|
2004-01-01 02:17:44 +00:00
|
|
|
g_print ("\n%s\n", gst_caps_to_string (caps));
|
2002-01-13 22:46:34 +00:00
|
|
|
|
2004-01-01 02:17:44 +00:00
|
|
|
caps = gst_caps_normalize (gst_static_caps_get (&rawcaps4));
|
|
|
|
g_assert (gst_caps_get_size (caps) == 8);
|
|
|
|
g_print ("\n%s\n", gst_caps_to_string (caps));
|
2002-01-13 22:46:34 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|