Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d2dbd9d5 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] DocBook media: fix wrong spacing



There shouldn't be any spaces after <constant> or before </constant>.
This leads to ugly results like: 'image size set by VIDIOC_S_FMT .'

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent 0db83ced
Loading
Loading
Loading
Loading
+47 −48
Original line number Diff line number Diff line
@@ -86,17 +86,17 @@ selection targets available for a video capture device. It is recommended to
configure the cropping targets before to the composing targets.</para>

<para>The range of coordinates of the top left corner, width and height of
areas that can be sampled is given by the <constant> V4L2_SEL_TGT_CROP_BOUNDS
</constant> target. It is recommended for the driver developers to put the
areas that can be sampled is given by the <constant>V4L2_SEL_TGT_CROP_BOUNDS</constant>
target. It is recommended for the driver developers to put the
top/left corner at position <constant>(0,0)</constant>.  The rectangle's
coordinates are expressed in pixels.</para>

<para>The top left corner, width and height of the source rectangle, that is
the area actually sampled, is given by the <constant> V4L2_SEL_TGT_CROP
</constant> target. It uses the same coordinate system as <constant>
V4L2_SEL_TGT_CROP_BOUNDS </constant>. The active cropping area must lie
completely inside the capture boundaries. The driver may further adjust the
requested size and/or position according to hardware limitations.</para>
the area actually sampled, is given by the <constant>V4L2_SEL_TGT_CROP</constant>
target. It uses the same coordinate system as <constant>V4L2_SEL_TGT_CROP_BOUNDS</constant>.
The active cropping area must lie completely inside the capture boundaries. The
driver may further adjust the requested size and/or position according to hardware
limitations.</para>

<para>Each capture device has a default source rectangle, given by the
<constant>V4L2_SEL_TGT_CROP_DEFAULT</constant> target. This rectangle shall
@@ -105,8 +105,8 @@ the active crop rectangle to the default when the driver is first loaded, but
not later.</para>

<para>The composing targets refer to a memory buffer. The limits of composing
coordinates are obtained using <constant> V4L2_SEL_TGT_COMPOSE_BOUNDS
</constant>.  All coordinates are expressed in pixels. The rectangle's top/left
coordinates are obtained using <constant>V4L2_SEL_TGT_COMPOSE_BOUNDS</constant>.
All coordinates are expressed in pixels. The rectangle's top/left
corner must be located at position <constant>(0,0)</constant>. The width and
height are equal to the image size set by <constant>VIDIOC_S_FMT</constant>.
</para>
@@ -165,27 +165,26 @@ limitations.</para>
bounding rectangle.</para>

<para>The part of a video signal or graphics display where the image is
inserted by the hardware is controlled by <constant>
V4L2_SEL_TGT_COMPOSE </constant> target.  The rectangle's coordinates
are expressed in pixels. The composing rectangle must lie completely inside the
bounds rectangle.  The driver must adjust the area to fit to the bounding
limits.  Moreover, the driver can perform other adjustments according to
hardware limitations. </para>

<para>The device has a default composing rectangle, given by the <constant>
V4L2_SEL_TGT_COMPOSE_DEFAULT </constant> target. This rectangle shall cover what
inserted by the hardware is controlled by <constant>V4L2_SEL_TGT_COMPOSE</constant>
target.  The rectangle's coordinates are expressed in pixels. The composing
rectangle must lie completely inside the bounds rectangle.  The driver must
adjust the area to fit to the bounding limits.  Moreover, the driver can
perform other adjustments according to hardware limitations.</para>

<para>The device has a default composing rectangle, given by the
<constant>V4L2_SEL_TGT_COMPOSE_DEFAULT</constant> target. This rectangle shall cover what
the driver writer considers the complete picture. It is recommended for the
driver developers to put the top/left corner at position <constant> (0,0)
</constant>. Drivers shall set the active composing rectangle to the default
driver developers to put the top/left corner at position <constant>(0,0)</constant>.
Drivers shall set the active composing rectangle to the default
one when the driver is first loaded.</para>

<para>The devices may introduce additional content to video signal other than
an image from memory buffers.  It includes borders around an image. However,
such a padded area is driver-dependent feature not covered by this document.
Driver developers are encouraged to keep padded rectangle equal to active one.
The padded target is accessed by the <constant> V4L2_SEL_TGT_COMPOSE_PADDED
</constant> identifier.  It must contain all pixels from the <constant>
V4L2_SEL_TGT_COMPOSE </constant> target.</para>
The padded target is accessed by the <constant>V4L2_SEL_TGT_COMPOSE_PADDED</constant>
identifier.  It must contain all pixels from the <constant>V4L2_SEL_TGT_COMPOSE</constant>
target.</para>

   </section>

@@ -194,8 +193,8 @@ V4L2_SEL_TGT_COMPOSE </constant> target.</para>
     <title>Scaling control</title>

<para>An application can detect if scaling is performed by comparing the width
and the height of rectangles obtained using <constant> V4L2_SEL_TGT_CROP
</constant> and <constant> V4L2_SEL_TGT_COMPOSE </constant> targets. If
and the height of rectangles obtained using <constant>V4L2_SEL_TGT_CROP</constant>
and <constant>V4L2_SEL_TGT_COMPOSE</constant> targets. If
these are not equal then the scaling is applied. The application can compute
the scaling ratios using these values.</para>

@@ -238,8 +237,8 @@ The former cropping API would be simulated using the new one. </para>
      <example>
	<title>Resetting the cropping parameters</title>

	<para>(A video capture device is assumed; change <constant>
V4L2_BUF_TYPE_VIDEO_CAPTURE </constant> for other devices; change target to
	<para>(A video capture device is assumed; change
<constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> for other devices; change target to
<constant>V4L2_SEL_TGT_COMPOSE_*</constant> family to configure composing
area)</para>

@@ -292,8 +291,8 @@ area)</para>

      <example>
	<title>Querying for scaling factors</title>
	<para>A video output device is assumed; change <constant>
V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> for other devices</para>
	<para>A video output device is assumed; change
<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> for other devices</para>
	<programlisting>

	&v4l2-selection; compose = {
+19 −21
Original line number Diff line number Diff line
@@ -60,15 +60,14 @@

<para>To query the cropping (composing) rectangle set &v4l2-selection;
<structfield> type </structfield> field to the respective buffer type.
Do not use multiplanar buffers.  Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
</constant>.  Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
Do not use multiplanar buffers.  Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>
instead of <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>.  Use
<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> instead of
<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>.  The next step is
setting the value of &v4l2-selection; <structfield>target</structfield> field
to <constant> V4L2_SEL_TGT_CROP </constant> (<constant>
V4L2_SEL_TGT_COMPOSE </constant>).  Please refer to table <xref
linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional
targets.  The <structfield>flags</structfield> and <structfield>reserved
to <constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>).
Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" />
for additional targets.  The <structfield>flags</structfield> and <structfield>reserved
</structfield> fields of &v4l2-selection; are ignored and they must be filled
with zeros.  The driver fills the rest of the structure or
returns &EINVAL; if incorrect buffer type or target was used. If cropping
@@ -81,15 +80,14 @@ coordinates are always expressed in pixels. </para>

<para>To change the cropping (composing) rectangle set the &v4l2-selection;
<structfield>type</structfield> field to the respective buffer type.  Do not
use multiplanar buffers.  Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE
</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE
</constant>.  Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of
use multiplanar buffers.  Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>
instead of <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>.  Use
<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> instead of
<constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>.  The next step is
setting the value of &v4l2-selection; <structfield>target</structfield> to
<constant>V4L2_SEL_TGT_CROP</constant> (<constant>
V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref
linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional
targets.  The &v4l2-rect; <structfield>r</structfield> rectangle need to be
<constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>).
Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" />
for additional targets.  The &v4l2-rect; <structfield>r</structfield> rectangle need to be
set to the desired active area. Field &v4l2-selection; <structfield> reserved
</structfield> is ignored and must be filled with zeros.  The driver may adjust
coordinates of the requested rectangle. An application may