XvListImageFormats
Section: libXv Functions (3)
Updated: libXv 1.0.11
Page Index
NAME
XvListImageFormats - return list of image formats supported by a video port
SYNTAX
#include <X11/extensions/Xvlib.h>
XvImageFormatValues * XvListImageFormats (Display *dpy,
XvPortID port, int *p_num_formats);
ARGUMENTS
- dpy
-
Specifies the connection to the X server.
- port
-
Specifies the port whose adaptor is to be queried for its list of attributes.
- p_num_formats
-
A pointer to where the number of formats returned in the array is written.
DESCRIPTION
XvListImageFormats(3)
returns the XvImageFormatValues supported by the specified port. This list
should be freed with
XFree(3).
RETURN VALUES
XvImageFormatValues has the following structure:
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;
- id
-
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.
- type
-
XvRGB or XvYUV.
- byte_order
-
The byte order of the image. It is either LSBFirst or MSBFirst.
- guid
-
The Globally Unique IDentifier (also known as Universally Unique
IDentifier). When not applicable, all characters are NULL.
- bits_per_pixel
-
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_.
- format
-
XvPacked or XvPlanar.
- num_planes
-
The number of planes in planar formats.
- depth
-
Significant bits per pixel.
- red_mask, green_mask, blue_mask
-
The red, green and blue bitmasks (RGB formats only).
- ?_sample_bits
-
The size of each sample in bits (YUV formats only).
- horz_?_period, vert_?_period
-
The period (in pixels) on which samples occur in the horizontal and vertical
directions (YUV formats only).
- component_order
-
Upper case ascii characters representing the order that samples are stored
within packed formats.
For planar formats this represents the ordering of the planes.
- scanline_order
-
XvTopToBottom or XvBottomToTop.
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.
DIAGNOSTICS
- [XvBadPort]
-
Generated if the requested port does not exist.
SEE ALSO
XvCreateImage(3),
XvCreateShmImage(3)