31 #include <X11/extensions/Xv.h>
32 #include <X11/extensions/XShm.h>
33 #include <X11/extensions/Xvlib.h>
78 for (i = 0; m->
tag; m = &tag_codec_map[++i]) {
103 unsigned int num_adaptors;
105 XvImageFormatValues *fv;
106 int num_formats = 0, j,
tag,
ret;
118 "Unsupported pixel format '%s', only yuv420p, uyvy422, yuyv422 are currently supported\n",
156 if (XvQueryAdaptors(xv->
display, DefaultRootWindow(xv->
display), &num_adaptors, &ai) != Success) {
165 XvFreeAdaptorInfo(ai);
172 for (j = 0; j < num_formats; j++) {
173 if (fv[j].
id == tag) {
179 if (j >= num_formats) {
181 "Device does not support pixel format %s, aborting\n",
212 XWindowAttributes window_attrs;
214 img->data + img->offsets[0],
215 img->data + img->offsets[1],
216 img->data + img->offsets[2]
221 XGetWindowAttributes(xv->
display, xv->
window, &window_attrs);
224 window_attrs.width, window_attrs.height, True) != Success) {
249 #define OFFSET(x) offsetof(XVContext, x)
278 .priv_class = &xv_class,