Gerd Knorr <kraxel bytesex org> writes: > VIDIOCGCAPTURE/VIDIOCSCAPTURE are used to _crop_ the image, > i.e. capture not the whole image but a part only (i.e. the left side > or some something like that). > > VIDIOCGWIN/VIDIOCSWIN is used to _scale_ the image, i.e. set the final > size (of the image part to be captured). refering to http://bytesex.org/v4l/spec/crop.html VIDIOCGCAPTURE/VIDIOCSCAPTURE is setting the cropping rectangle and VIDIOCGWIN/VIDIOCSWIN (where only height and width fields are used) defines size of image read/mmaped. Consider capture device which can do (mostly) any cropping, but only 1/1 to 1/8 scaling (downsizing in decimal steps 1/2, 1/3...). so video_capture fits perfectly for that purposes. I'll try to explain my understanding of ioctls usage and I'll appreciate any feedback and comments regarding this issue. decimation in video_capture set by VIDIOCSCAPTURE will affect image size get by VIDIOCGWIN and vice versa (image size set by VIDIOCSWIN will affect decimation get by VIDIOCGCAPTURE, but not cropping rectangle) VIDIOCGWIN with x!=0 or y!=0 or with any clips will return -EINVAL. chromakey and flags will be ignored silently. I'm also assuming that decimation less than one is illegal, 2 means one half sized image and so on. comments and suggestions are always welcome. (v4l2 looks indeed much more suitable, but I'd like to give people something which could enter 2.4 kernel first. I'll write v4l2 version of driver later). thanks, ladis