Gerd Knorr wrote: > > > > VIDIOCSPICT and VIDIOCSWIN are only used for setting up an overlay > > > window, not for memory capture. > > Or for capture using the read() system call. With bttv 0.8.x capture > with read() does actually work (unlike older versions)... > > > > For doing memory capture the size/format > > > are passed to each VIDIOMCAPTURE call. > > > > This is a point I am not sure of. The v4l API specification explicitly > > requires that GMBUF is isued AFTER setting the size and format, while > > MCAPTURE is only allowed after GMBUF and mmap. As you can see, this > > prevents using MCAPTURE to set the size/format, and the only other ioctl > > that sets size is SWIN, so this must be the one. > > Sure? For v4l1? I can't remember having this seen in Alan's specs > (havn't checked it for some time throuth...). v4l2 _is_ specified > that way (i.e. first set format, then ask buffer size + map stuff), > but IIRC v4l1 is not. As size+format are specified on frame by > frame bases in struct video_mmap I can't see the point of setting > the video format first... I just checked with Alan Cox (the author of the v4l API), and he confirms that the application is required to set the image size with SWIN BEFORE calling GMBUF (subsequent formats passed with MCAPTURE must be the same or smaller). The point of the first SWIN is to allow the driver to allocate memory for the capture at GMBUF time - Rather than allocating a massive chunck of memory, simply allocate memory large enough for the required frames. -justin