XvListImageFormats(3) | libXv Functions | XvListImageFormats(3) |
XvListImageFormats - return list of image formats supported by a video port
#include <X11/extensions/Xvlib.h>
XvImageFormatValues * XvListImageFormats (Display *dpy, XvPortID port, int *p_num_formats);
XvListImageFormats(3) returns the XvImageFormatValues supported by the specified port. This list should be freed with XFree(3).
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;
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.
libXv 1.0.11 | X Version 11 |