android_kernel_xiaomi_sm8350/drivers/media
Trent Piepho a8ab68bffe V4L/DVB (6392): bttv: Update initial image size when set via V4L1 VIDIOCMCAPTURE
The V4L1 spec says that the image size should be with with VIDIOCSWIN before
requesting buffers with VIDIOCGMBUF and capturing into them with
VIDIOCMCAPTURE.

But it seems that many apps don't do this.  They set the size using the fields
in the VIDIOCMCAPTURE ioctl.  The driver doesn't know what size to capture
until it actually starts to capture.  In particular, it doesn't know what size
to capture until it has already mmap the captured buffers.  Which is quite
stupid.  Why V4L1 has size and format fields for VIDIOCMCAPTURE I have no idea.

Many drivers don't support this, including those using v4l1-compat.

The bttv does, which is probably the only reason such broken software is so
prevalent.

But, the driver doesn't adjust its idea of what size is being captured when it
is set this way.  If you try to query the driver's current setting with
v4l2-ctl, it won't be correct.

Signed-off-by: Trent Piepho <xyzzy@speakeasy.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
2007-11-04 21:41:16 -02:00
..
common SG: Change sg_set_page() to take length and offset argument 2007-10-24 11:20:47 +02:00
dvb V4L/DVB (6378): DiB0700-device: Using 1.10 firmware 2007-10-22 12:01:51 -02:00
radio V4L/DVB (6320): v4l core: remove the unused .hardware V4L1 field 2007-10-22 12:01:24 -02:00
video V4L/DVB (6392): bttv: Update initial image size when set via V4L1 VIDIOCMCAPTURE 2007-11-04 21:41:16 -02:00
Kconfig V4L/DVB (6299): dvb: Add dependencies for VIDEOBUF_DVB 2007-10-10 00:03:19 -03:00
Makefile V4L/DVB (5599): Use menuconfig objects II - DVB 2007-05-09 10:12:48 -03:00