summaryrefslogtreecommitdiff
path: root/man/XvListImageFormats.man
blob: c5159e5a8d45efb05b76b76f5267b5d5e062f269 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
.TH XvListImageFormats __libmansuffix__ __vendorversion__ "libXv Functions"
.SH Name
XvListImageFormats \- return list of image formats supported by a video port
.\"
.SH Syntax
.B #include <X11/extensions/Xvlib.h>
.sp
.nf
.BI "XvImageFormatValues * XvListImageFormats (Display *" dpy ","
.BI "                 XvPortID " port ",  int *" p_num_formats ");"
.fi
.SH Arguments
.\"
.IP \fIdpy\fR 8
Specifies the connection to the X server.
.IP \fIport\fR 8
Specifies the port whose adaptor is to be queried for its list of attributes.
.IP \fIp_num_formats\fR 8
A pointer to where the number of formats returned in the array is written.
.\"
.SH Description
.BR XvListImageFormats (__libmansuffix__)
returns the XvImageFormatValues supported by the specified port. This list
should be freed with
.BR XFree (__libmansuffix__).
.SH Returned Values
XvImageFormatValues has the following structure:
.EX

    typedef struct {
      int id;                      /* Unique descriptor for the format */
      int type;                    /* XvRGB, XvYUV */
      int byte_order;              /* LSBFirst, MSBFirst */
      char guid[16];               /* Globally Unique IDentifier */
      int bits_per_pixel;
      int format;                  /* XvPacked, XvPlanar */
      int num_planes;

      /* for RGB formats */
      int depth;
      unsigned int red_mask;
      unsigned int green_mask;
      unsigned int blue_mask;

      /* for YUV formats */
      unsigned int y_sample_bits;
      unsigned int u_sample_bits;
      unsigned int v_sample_bits;
      unsigned int horz_y_period;
      unsigned int horz_u_period;
      unsigned int horz_v_period;
      unsigned int vert_y_period;
      unsigned int vert_u_period;
      unsigned int vert_v_period;
      char component_order[32];    /* eg. UYVY */
      int scanline_order;          /* XvTopToBottom, XvBottomToTop */
    } XvImageFormatValues;

.EE
.IP \fIid\fR 8
A unique descriptor for the format.  This is often the FOURCC
for the format, when applicable.  This id is used to describe
the format during XvImage creation.
.IP \fItype\fR 8
XvRGB or XvYUV.
.IP \fIbyte_order\fR 8
The byte order of the image.  It is either LSBFirst or MSBFirst.
.IP \fIguid\fR 8
The Globally Unique IDentifier (also known as Universally Unique
IDentifier).  When not applicable, all characters are NULL.
.IP \fIbits_per_pixel\fR 8
The bits taken up (but not necessarily used) by each
pixel.  Note that for some planar formats which have
fractional bits per pixel (such as IF09) this number
may be rounded _down_.
.IP \fIformat\fR 8
XvPacked or XvPlanar.
.IP \fInum_planes\fR 8
The number of planes in planar formats.
.IP \fIdepth\fR 8
Significant bits per pixel.
.IP "\fIred_mask, green_mask, blue_mask\fR" 8
The red, green and blue bitmasks (RGB formats only).
.IP \fI?_sample_bits\fR 8
The size of each sample in bits (YUV formats only).
.IP "\fIhorz_?_period, vert_?_period\fR" 8
The period (in pixels) on which samples occur in the horizontal and vertical
directions (YUV formats only).
.IP \fIcomponent_order\fR 8
Upper case ascii characters representing the order that samples are stored
within packed formats.
For planar formats this represents the ordering of the planes.
.IP \fIscanline_order\fR 8
XvTopToBottom or XvBottomToTop.
.\"
.SH Notes
Since some formats (particularly some planar YUV formats) may not be
completely defined by the parameters above, the guid, when available,
should provide the most accurate description of the format.
.\"
.SH Diagnostics
.IP [XvBadPort] 8
Generated if the requested port does not exist.
.\"
.SH See Also
.BR XvCreateImage (__libmansuffix__),
.BR XvCreateShmImage (__libmansuffix__)