1 .TH XvListImageFormats __libmansuffix__ __vendorversion__ "libXv Functions"
3 XvListImageFormats \- return list of image formats supported by a video port
6 .B #include <X11/extensions/Xvlib.h>
9 .BI "XvImageFormatValues * XvListImageFormats (Display *" dpy ","
10 .BI " XvPortID " port ", int *" p_num_formats ");"
15 Specifies the connection to the X server.
17 Specifies the port whose adaptor is to be queried for its list of attributes.
18 .IP \fIp_num_formats\fR 8
19 A pointer to where the number of formats returned in the array is written.
22 .BR XvListImageFormats (__libmansuffix__)
23 returns the XvImageFormatValues supported by the specified port. This list
25 .BR XFree (__libmansuffix__).
27 XvImageFormatValues has the following structure:
31 int id; /* Unique descriptor for the format */
32 int type; /* XvRGB, XvYUV */
33 int byte_order; /* LSBFirst, MSBFirst */
34 char guid[16]; /* Globally Unique IDentifier */
36 int format; /* XvPacked, XvPlanar */
41 unsigned int red_mask;
42 unsigned int green_mask;
43 unsigned int blue_mask;
46 unsigned int y_sample_bits;
47 unsigned int u_sample_bits;
48 unsigned int v_sample_bits;
49 unsigned int horz_y_period;
50 unsigned int horz_u_period;
51 unsigned int horz_v_period;
52 unsigned int vert_y_period;
53 unsigned int vert_u_period;
54 unsigned int vert_v_period;
55 char component_order[32]; /* eg. UYVY */
56 int scanline_order; /* XvTopToBottom, XvBottomToTop */
57 } XvImageFormatValues;
61 A unique descriptor for the format. This is often the FOURCC
62 for the format, when applicable. This id is used to describe
63 the format during XvImage creation.
66 .IP \fIbyte_order\fR 8
67 The byte order of the image. It is either LSBFirst or MSBFirst.
69 The Globally Unique IDentifier (also known as Universally Unique
70 IDentifier). When not applicable, all characters are NULL.
71 .IP \fIbits_per_pixel\fR 8
72 The bits taken up (but not necessarily used) by each
73 pixel. Note that for some planar formats which have
74 fractional bits per pixel (such as IF09) this number
75 may be rounded _down_.
78 .IP \fInum_planes\fR 8
79 The number of planes in planar formats.
81 Significant bits per pixel.
82 .IP "\fIred_mask, green_mask, blue_mask\fR" 8
83 The red, green and blue bitmasks (RGB formats only).
84 .IP \fI?_sample_bits\fR 8
85 The size of each sample in bits (YUV formats only).
86 .IP "\fIhorz_?_period, vert_?_period\fR" 8
87 The period (in pixels) on which samples occur in the horizontal and vertical
88 directions (YUV formats only).
89 .IP \fIcomponent_order\fR 8
90 Upper case ascii characters representing the order that samples are stored
91 within packed formats.
92 For planar formats this represents the ordering of the planes.
93 .IP \fIscanline_order\fR 8
94 XvTopToBottom or XvBottomToTop.
97 Since some formats (particularly some planar YUV formats) may not be
98 completely defined by the parameters above, the guid, when available,
99 should provide the most accurate description of the format.
103 Generated if the requested port does not exist.
106 .BR XvCreateImage (__libmansuffix__),
107 .BR XvCreateShmImage (__libmansuffix__)