linux/Documentation/media
Laurent Pinchart 99bb078eee [media] v4l: Clearly document interactions between formats, controls and buffers
V4L2 exposes parameters that influence buffers sizes through the format
ioctls (VIDIOC_G_FMT, VIDIOC_TRY_FMT, VIDIOC_S_FMT, and possibly
VIDIOC_G_SELECTION and VIDIOC_S_SELECTION). Other parameters not part of
the format structure may also influence buffer sizes or buffer layout in
general. One existing such parameter is rotation, which is implemented
by the V4L2_CID_ROTATE control and thus exposed through the V4L2 control
ioctls.

The interaction between those parameters and buffers is currently only
partially specified by the V4L2 API. In particular interactions between
controls and buffers isn't specified at all. The behaviour of the
VIDIOC_S_FMT and VIDIOC_S_SELECTION ioctls when buffers are allocated is
also not fully specified.

This patch clearly defines and documents the interactions between
formats, selections, controls and buffers.

The preparatory discussions for the documentation change considered
completely disallowing controls that change the buffer size or layout,
in favour of extending the format API with a new ioctl that would bundle
those controls with format information. The idea has been rejected, as
this would essentially be a restricted version of the upcoming request
API that wouldn't bring any additional value.

Another option we have considered was to mandate the use of the request
API to modify controls that influence buffer size or layout. This has
also been rejected on the grounds that requiring the request API to
change rotation even when streaming is stopped would significantly
complicate implementation of drivers and usage of the V4L2 API for
applications.

Applications will however be required to use the upcoming request API to
change at runtime formats or controls that influence the buffer size or
layout, because of the need to synchronize buffers with the formats and
controls. Otherwise there would be no way to interpret the content of a
buffer correctly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Acked-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-04-14 22:34:26 -03:00
..
dvb-drivers scripts/spelling.txt: add "an user" pattern and fix typo instances 2017-02-27 18:43:46 -08:00
kapi [media] cec-core.rst: document the new cec_get_drvdata() helper 2017-04-05 15:21:23 -03:00
uapi [media] v4l: Clearly document interactions between formats, controls and buffers 2017-04-14 22:34:26 -03:00
v4l-drivers Linux 4.11-rc1 2017-03-06 06:49:34 -03:00
.gitignore docs-rst: media: build SVG from graphviz files 2016-11-30 17:07:54 -07:00
audio.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
ca.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
cec.h.rst.exceptions [media] docs-rst: fix cec bad cross-references 2016-09-09 09:54:21 -03:00
conf_nitpick.py [media] conf_nitpick.py: ignore C domain data used on vb2 2016-09-09 10:18:07 -03:00
conf.py doc-rst: define PDF's of the media folder 2016-09-01 08:49:33 -06:00
dmx.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
frontend.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
index.rst docs-rst: fix LaTeX \DURole renewcommand with Sphinx 1.3+ 2016-11-16 15:20:12 -07:00
intro.rst docs-rst: auto-generate PDF image files 2016-11-16 15:20:59 -07:00
lirc.h.rst.exceptions [media] lirc: document lirc modes better 2017-03-24 07:43:26 -03:00
Makefile Add a target to check broken external links in the Documentation 2017-02-15 15:22:47 -07:00
media_kapi.rst [media] doc-rst: v4l: Add documentation on CSI-2 bus configuration 2016-11-18 13:27:03 -02:00
media_uapi.rst [media] doc-rst: better organize the media books 2016-07-23 08:03:24 -03:00
media.h.rst.exceptions
net.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
typical_media_device.svg Merge branch 'patchwork' into v4l_for_linus 2016-12-15 08:38:35 -02:00
video.h.rst.exceptions [media] docs-rst exceptions: use C domain references for DVB headers 2016-09-09 09:45:24 -03:00
videodev2.h.rst.exceptions [media] vidioc-g-dv-timings.rst: document the new dv_timings flags 2016-11-16 14:37:57 -02:00