c5159e5a8d45efb05b76b76f5267b5d5e062f269
[framework/uifw/xorg/lib/libxv.git] / man / XvListImageFormats.man
1 .TH XvListImageFormats __libmansuffix__ __vendorversion__ "libXv Functions"
2 .SH Name
3 XvListImageFormats \- return list of image formats supported by a video port
4 .\"
5 .SH Syntax
6 .B #include <X11/extensions/Xvlib.h>
7 .sp
8 .nf
9 .BI "XvImageFormatValues * XvListImageFormats (Display *" dpy ","
10 .BI "                 XvPortID " port ",  int *" p_num_formats ");"
11 .fi
12 .SH Arguments
13 .\"
14 .IP \fIdpy\fR 8
15 Specifies the connection to the X server.
16 .IP \fIport\fR 8
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.
20 .\"
21 .SH Description
22 .BR XvListImageFormats (__libmansuffix__)
23 returns the XvImageFormatValues supported by the specified port. This list
24 should be freed with
25 .BR XFree (__libmansuffix__).
26 .SH Returned Values
27 XvImageFormatValues has the following structure:
28 .EX
29
30     typedef struct {
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 */
35       int bits_per_pixel;
36       int format;                  /* XvPacked, XvPlanar */
37       int num_planes;
38
39       /* for RGB formats */
40       int depth;
41       unsigned int red_mask;
42       unsigned int green_mask;
43       unsigned int blue_mask;
44
45       /* for YUV formats */
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;
58
59 .EE
60 .IP \fIid\fR 8
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.
64 .IP \fItype\fR 8
65 XvRGB or XvYUV.
66 .IP \fIbyte_order\fR 8
67 The byte order of the image.  It is either LSBFirst or MSBFirst.
68 .IP \fIguid\fR 8
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_.
76 .IP \fIformat\fR 8
77 XvPacked or XvPlanar.
78 .IP \fInum_planes\fR 8
79 The number of planes in planar formats.
80 .IP \fIdepth\fR 8
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.
95 .\"
96 .SH Notes
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.
100 .\"
101 .SH Diagnostics
102 .IP [XvBadPort] 8
103 Generated if the requested port does not exist.
104 .\"
105 .SH See Also
106 .BR XvCreateImage (__libmansuffix__),
107 .BR XvCreateShmImage (__libmansuffix__)