2003-10-08 07:49:11 +00:00
|
|
|
#include <gst/gst.h>
|
|
|
|
|
2003-11-25 08:59:43 +00:00
|
|
|
GstStaticCaps2 rawcaps1 = GST_STATIC_CAPS(
|
|
|
|
"video/x-raw-yuv, "
|
|
|
|
"fourcc:fourcc=\"YUYV\", "
|
|
|
|
"height:int=640, "
|
|
|
|
"width:int=480, "
|
|
|
|
"framerate:float=30.0; "
|
|
|
|
"video/x-raw-yuv, "
|
|
|
|
"fourcc:fourcc=\"I420\", "
|
|
|
|
"height:int=640, "
|
|
|
|
"width:int=480, "
|
|
|
|
"framerate:float=30.0"
|
2003-10-08 07:49:11 +00:00
|
|
|
);
|
|
|
|
|
|
|
|
int
|
|
|
|
main (int argc, char *argv[])
|
|
|
|
{
|
2003-11-25 08:59:43 +00:00
|
|
|
GstCaps2 *caps1;
|
|
|
|
GstCaps2 *caps2;
|
|
|
|
GstCaps2 *caps;
|
2003-10-08 07:49:11 +00:00
|
|
|
|
|
|
|
gst_init (&argc, &argv);
|
|
|
|
|
2003-11-25 08:59:43 +00:00
|
|
|
caps1 = gst_caps2_copy( gst_static_caps2_get (&rawcaps1));
|
|
|
|
caps2 = gst_caps2_copy_1 (gst_static_caps2_get (&rawcaps1));
|
2003-10-08 07:49:11 +00:00
|
|
|
|
2003-11-25 08:59:43 +00:00
|
|
|
#if 0
|
|
|
|
gst_caps2_set(caps1, "height", GST_PROPS_INT(640));
|
|
|
|
gst_caps2_set(caps1, "width", GST_PROPS_INT(480));
|
|
|
|
gst_caps2_set(caps1, "framerate", GST_PROPS_FLOAT(30.0));
|
|
|
|
#endif
|
2003-10-08 07:49:11 +00:00
|
|
|
|
2003-11-25 08:59:43 +00:00
|
|
|
caps = gst_caps2_intersect(caps1, caps2);
|
2003-10-08 07:49:11 +00:00
|
|
|
|
2003-11-25 08:59:43 +00:00
|
|
|
g_print("caps %s\n", gst_caps2_to_string(caps));
|
2003-10-08 07:49:11 +00:00
|
|
|
|
2003-11-25 08:59:43 +00:00
|
|
|
if (gst_caps2_is_empty (caps)) return 1;
|
2003-10-08 07:49:11 +00:00
|
|
|
return 0;
|
|
|
|
}
|