1XvListImageFormats(3) libXv Functions XvListImageFormats(3)
2
3
4
6 XvListImageFormats - return list of image formats supported by a video
7 port
8
10 #include <X11/extensions/Xvlib.h>
11
12 XvImageFormatValues * XvListImageFormats (Display *dpy,
13 XvPortID port, int *p_num_formats);
14
16 dpy Specifies the connection to the X server.
17
18 port Specifies the port whose adaptor is to be queried for its list
19 of attributes.
20
21 p_num_formats
22 A pointer to where the number of formats returned in the array
23 is written.
24
26 XvListImageFormats(3) returns the XvImageFormatValues supported by the
27 specified port. This list should be freed with XFree(3).
28
30 XvImageFormatValues has the following structure:
31
32 typedef struct {
33 int id; /* Unique descriptor for the format */
34 int type; /* XvRGB, XvYUV */
35 int byte_order; /* LSBFirst, MSBFirst */
36 char guid[16]; /* Globally Unique IDentifier */
37 int bits_per_pixel;
38 int format; /* XvPacked, XvPlanar */
39 int num_planes;
40
41 /* for RGB formats */
42 int depth;
43 unsigned int red_mask;
44 unsigned int green_mask;
45 unsigned int blue_mask;
46
47 /* for YUV formats */
48 unsigned int y_sample_bits;
49 unsigned int u_sample_bits;
50 unsigned int v_sample_bits;
51 unsigned int horz_y_period;
52 unsigned int horz_u_period;
53 unsigned int horz_v_period;
54 unsigned int vert_y_period;
55 unsigned int vert_u_period;
56 unsigned int vert_v_period;
57 char component_order[32]; /* eg. UYVY */
58 int scanline_order; /* XvTopToBottom, XvBottomToTop */
59 } XvImageFormatValues;
60
61
62 id A unique descriptor for the format. This is often the FOURCC
63 for the format, when applicable. This id is used to describe
64 the format during XvImage creation.
65
66 type XvRGB or XvYUV.
67
68 byte_order
69 The byte order of the image. It is either LSBFirst or MSB‐
70 First.
71
72 guid The Globally Unique IDentifier (also known as Universally
73 Unique IDentifier). When not applicable, all characters are
74 NULL.
75
76 bits_per_pixel
77 The bits taken up (but not necessarily used) by each pixel.
78 Note that for some planar formats which have fractional bits
79 per pixel (such as IF09) this number may be rounded _down_.
80
81 format XvPacked or XvPlanar.
82
83 num_planes
84 The number of planes in planar formats.
85
86 depth Significant bits per pixel.
87
88 red_mask, green_mask, blue_mask
89 The red, green and blue bitmasks (RGB formats only).
90
91 ?_sample_bits
92 The size of each sample in bits (YUV formats only).
93
94 horz_?_period, vert_?_period
95 The period (in pixels) on which samples occur in the horizontal
96 and vertical directions (YUV formats only).
97
98 component_order
99 Upper case ascii characters representing the order that samples
100 are stored within packed formats. For planar formats this rep‐
101 resents the ordering of the planes.
102
103 scanline_order
104 XvTopToBottom or XvBottomToTop.
105
107 Since some formats (particularly some planar YUV formats) may not be
108 completely defined by the parameters above, the guid, when available,
109 should provide the most accurate description of the format.
110
112 [XvBadPort]
113 Generated if the requested port does not exist.
114
116 XvCreateImage(3), XvCreateShmImage(3)
117
118
119
120X Version 11 libXv 1.0.11 XvListImageFormats(3)