3 GstStaticCaps rawcaps1 = GST_STATIC_CAPS ("video/x-raw-yuv, "
4 "fourcc:fourcc=\"YUYV\", "
7 "framerate:float=30.0; "
9 "fourcc:fourcc=\"I420\", "
10 "height:int=640, " "width:int=480, " "framerate:float=30.0");
12 GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/x-raw-yuv");
14 GstStaticCaps rawcaps3 =
15 GST_STATIC_CAPS ("video/x-raw-yuv, height=(int) [ 0, MAX ]");
17 GstStaticCaps rawcaps4 =
19 ("video/x-raw-yuv, format=(fourcc)YUY2; video/x-raw-yuv, format=(fourcc)UYVY");
21 GstStaticCaps rawcaps5 =
23 ("video/x-raw-yuv, format=(fourcc)YUY2, framerate=(double)[0,1.79769e+308], width=(int)[0,2147483647], height=(int)[0,2147483647]; video/x-raw-yuv, format=(fourcc)UYVY, framerate=(double)[0,1.79769e+308], width=(int)[0,2147483647], height=(int)[0,2147483647]");
25 GstStaticCaps rawcaps6 =
27 ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240");
29 GstStaticCaps rawcaps7 =
31 ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)[0,2147483647], height=(int)[0,2147483647], framerate=(double)[0,1.79769e+308]");
33 GstStaticCaps rawcaps8 =
35 ("video/x-raw-yuv, format=(fourcc)YUY2, width=(int)320, height=(int)240");
39 main (int argc, char *argv[])
47 gst_init (&argc, &argv);
49 caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps1));
51 gst_caps_new_full (gst_structure_copy (gst_caps_get_structure
52 (gst_static_caps_get (&rawcaps1), 0)), NULL);
55 gst_caps_set (caps1, "height", GST_PROPS_INT (640));
56 gst_caps_set (caps1, "width", GST_PROPS_INT (480));
57 gst_caps_set (caps1, "framerate", GST_PROPS_FLOAT (30.0));
60 caps = gst_caps_intersect (caps1, caps2);
61 g_print ("caps %s\n", gst_caps_to_string (caps));
62 if (gst_caps_is_empty (caps))
64 gst_caps_free (caps1);
65 gst_caps_free (caps2);
67 caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps2));
68 caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps3));
69 caps = gst_caps_intersect (caps1, caps2);
70 g_print ("caps %s\n", gst_caps_to_string (caps));
71 if (gst_caps_is_empty (caps))
73 gst_caps_free (caps1);
74 gst_caps_free (caps2);
76 caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps4));
77 caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps5));
78 caps3 = gst_caps_copy (gst_static_caps_get (&rawcaps6));
79 caps4 = gst_caps_intersect (caps1, caps2);
80 caps = gst_caps_intersect (caps3, caps4);
81 g_print ("caps4 %s\n", gst_caps_to_string (caps4));
82 g_print ("caps %s\n", gst_caps_to_string (caps));
83 gst_caps_free (caps1);
84 gst_caps_free (caps2);
85 gst_caps_free (caps3);
86 gst_caps_free (caps4);
88 caps1 = gst_caps_copy (gst_static_caps_get (&rawcaps7));
89 caps2 = gst_caps_copy (gst_static_caps_get (&rawcaps8));
90 caps = gst_caps_intersect (caps1, caps2);
91 g_print ("caps %s\n", gst_caps_to_string (caps));
92 if (gst_caps_is_empty (caps))
94 gst_caps_free (caps1);
95 gst_caps_free (caps2);