Hi,

this is another patch to video(1). It removes the logic that forces the
video grab frame size to be <= the size of the Xv adaptor. This allows
me to grab and view frames that are 1280x1024 on my 1440x900 screen. Xv
properly scales and stretches the window content, so there's nothing
that gets cut off from the video feed.

The camera I have here has the following resolutions:

        160x120: 30
        176x144: 30
        320x240: 30
        352x288: 30
        640x480: 30
        1280x1024: 9

Without this patch, the maximum resolution I can grab and view at the
same time is 640x480, which is a bit too tiny. I haven't noticed any
downsides of the patch, but I've only tested it with my laptop and not
other graphics cards, so I'm not sure how Xv handles frames larger than
the display size there.

-- 
        Gregor

Index: video.c
===================================================================
RCS file: /mnt/media/cvs/xenocara/app/video/video.c,v
retrieving revision 1.19
diff -u -p -r1.19 video.c
--- video.c     6 Jun 2016 19:31:22 -0000       1.19
+++ video.c     18 Sep 2016 14:00:06 -0000
@@ -1162,13 +1162,6 @@ choose_size(struct video *vid)
        else if (vid->width && !vid->height)
                vid->height = vid->width * 3 / 4;
 
-       if (vid->mode & M_OUT_XV) {
-               if (vid->width > x->max_width)
-                       vid->width = x->max_width;
-               if (vid->height > x->max_height)
-                       vid->height = x->max_height;
-       }
-
        if (vid->mode & M_IN_DEV) {
                i = 0;
                while (i < d->nsizes &&

Reply via email to