source: trunk/third/gstreamer/testsuite/caps/normalisation.c @ 21005

Revision 21005, 2.6 KB checked in by ghudson, 20 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r21004, which included commits to RCS files with non-trunk default branches.
Line 
1#include <gst/gst.h>
2
3/* these caps all have a non empty intersection */
4GstStaticCaps sinkcaps = GST_STATIC_CAPS ("video/mpeg, "
5    "fourcc=(fourcc){\"YV12\",\"YUY2\"}, "
6    "foo1=(int)[20,40], " "foo2=(int)[20,40], " "foo3=(int)[10,20]");
7
8GstStaticCaps mp1parsecaps = GST_STATIC_CAPS ("video/mpeg, "
9    "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "foo4=(fourcc){\"YV12\",\"YUY2\"}");
10
11GstStaticCaps rawcaps = GST_STATIC_CAPS ("video/raw, "
12    "width=(int)[16,4096], "
13    "height=(int)[16,4096], " "fourcc=(fourcc){\"YV12\",\"YUY2\"}");
14
15GstStaticCaps rawcaps2 = GST_STATIC_CAPS ("video/raw, "
16    "width=(int)[16,256], "
17    "height=(int)16; " "video/raw, " "width=(int)[16,256], " "height=(int)16");
18
19GstStaticCaps rawcaps3 = GST_STATIC_CAPS ("video/raw, "
20    "width=(int)[16,256], "
21    "height=(int)16; "
22    "video/raw, "
23    "width=(int)[16,256], "
24    "height=(int)16; "
25    "video/raw, "
26    "fourcc=(fourcc){\"YV12\",\"YUY2\"}, " "height=(int)[16,4096]");
27
28GstStaticCaps rawcaps4 = GST_STATIC_CAPS ("x, "
29    "y=(int){1,2}, " "z=(int){3,4}; " "a, " "b=(int){5,6}, " "c=(int){7,8}");
30
31/* defined, not used
32GST_CAPS_FACTORY (rawcaps4,
33  GST_CAPS_NEW (
34    "raw2_sink_caps",
35    "video/raw",
36      "fourcc",   GST_PROPS_LIST (
37                    GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2")),
38                    GST_PROPS_FOURCC (GST_STR_FOURCC ("YV12")),
39                    GST_PROPS_FOURCC (GST_STR_FOURCC ("YUYV"))
40                  ),
41      "height",   GST_PROPS_INT_RANGE (16, 4096)
42  )
43);
44
45GST_CAPS_FACTORY (rawcaps5,
46  GST_CAPS_NEW (
47    "raw2_sink_caps",
48    "video/raw",
49      "fourcc",   GST_PROPS_LIST (
50                    GST_PROPS_FOURCC (GST_STR_FOURCC ("YUYV")),
51                    GST_PROPS_FOURCC (GST_STR_FOURCC ("YUY2"))
52                  ),
53      "height",   GST_PROPS_INT_RANGE (16, 4096)
54  )
55);
56*/
57
58int
59main (int argc, char *argv[])
60{
61  GstCaps *caps;
62
63  gst_init (&argc, &argv);
64
65  caps = gst_caps_normalize (gst_static_caps_get (&sinkcaps));
66  g_print ("\n%s\n", gst_caps_to_string (caps));
67
68  caps = gst_caps_normalize (gst_static_caps_get (&mp1parsecaps));
69  g_print ("\n%s\n", gst_caps_to_string (caps));
70
71  caps = gst_caps_normalize (gst_static_caps_get (&rawcaps));
72  g_print ("\n%s\n", gst_caps_to_string (caps));
73
74  caps = gst_caps_normalize (gst_static_caps_get (&rawcaps2));
75  g_print ("\n%s\n", gst_caps_to_string (caps));
76
77  caps = gst_caps_normalize (gst_static_caps_get (&rawcaps3));
78  g_print ("\n%s\n", gst_caps_to_string (caps));
79
80  caps = gst_caps_normalize (gst_static_caps_get (&rawcaps4));
81  g_assert (gst_caps_get_size (caps) == 8);
82  g_print ("\n%s\n", gst_caps_to_string (caps));
83
84  return 0;
85}
Note: See TracBrowser for help on using the repository browser.