diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-08-29 17:37:59 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-09-09 09:34:01 -0300 |
commit | e8be7e97e639af6f968473e5a598afbebc737b9c (patch) | |
tree | a33c38e32956ad127634eabb978f824ecbbb6c65 /Documentation/media/uapi/v4l/vidioc-g-selection.rst | |
parent | 2257e180101c910c2d93dd226ab1e500e4a6813c (diff) | |
download | linux-stable-e8be7e97e639af6f968473e5a598afbebc737b9c.tar.gz |
[media] docs-rst: convert uAPI structs to C domain
instead of declaring the uAPI structs using usual refs, e. g.:
.. _foo-struct:
Use the C domain way:
.. c:type:: foo_struct
This way, the kAPI documentation can use cross-references to
point to the uAPI symbols.
That solves about ~100 undefined warnings like:
WARNING: c:type reference target not found: foo_struct
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'Documentation/media/uapi/v4l/vidioc-g-selection.rst')
-rw-r--r-- | Documentation/media/uapi/v4l/vidioc-g-selection.rst | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/Documentation/media/uapi/v4l/vidioc-g-selection.rst b/Documentation/media/uapi/v4l/vidioc-g-selection.rst index 85b5afa48474..af38b2568e3b 100644 --- a/Documentation/media/uapi/v4l/vidioc-g-selection.rst +++ b/Documentation/media/uapi/v4l/vidioc-g-selection.rst @@ -41,43 +41,43 @@ Description The ioctls are used to query and configure selection rectangles. To query the cropping (composing) rectangle set struct -:ref:`v4l2_selection <v4l2-selection>` ``type`` field to the +:c:type:`v4l2_selection` ``type`` field to the respective buffer type. Do not use the multiplanar buffer types. Use ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and use ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the -value of struct :ref:`v4l2_selection <v4l2-selection>` ``target`` +value of struct :c:type:`v4l2_selection` ``target`` field to ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer to table :ref:`v4l2-selections-common` or :ref:`selection-api` for additional targets. The ``flags`` and ``reserved`` fields of struct -:ref:`v4l2_selection <v4l2-selection>` are ignored and they must be +:c:type:`v4l2_selection` are ignored and they must be filled with zeros. The driver fills the rest of the structure or returns EINVAL error code if incorrect buffer type or target was used. If cropping (composing) is not supported then the active rectangle is not mutable and it is always equal to the bounds rectangle. Finally, the -struct :ref:`v4l2_rect <v4l2-rect>` ``r`` rectangle is filled with +struct :c:type:`v4l2_rect` ``r`` rectangle is filled with the current cropping (composing) coordinates. The coordinates are expressed in driver-dependent units. The only exception are rectangles for images in raw formats, whose coordinates are always expressed in pixels. To change the cropping (composing) rectangle set the struct -:ref:`v4l2_selection <v4l2-selection>` ``type`` field to the +:c:type:`v4l2_selection` ``type`` field to the respective buffer type. Do not use multiplanar buffers. Use ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` instead of ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``. Use ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` instead of ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``. The next step is setting the -value of struct :ref:`v4l2_selection <v4l2-selection>` ``target`` to +value of struct :c:type:`v4l2_selection` ``target`` to ``V4L2_SEL_TGT_CROP`` (``V4L2_SEL_TGT_COMPOSE``). Please refer to table :ref:`v4l2-selections-common` or :ref:`selection-api` for additional -targets. The struct :ref:`v4l2_rect <v4l2-rect>` ``r`` rectangle need +targets. The struct :c:type:`v4l2_rect` ``r`` rectangle need to be set to the desired active area. Field struct -:ref:`v4l2_selection <v4l2-selection>` ``reserved`` is ignored and +:c:type:`v4l2_selection` ``reserved`` is ignored and must be filled with zeros. The driver may adjust coordinates of the requested rectangle. An application may introduce constraints to control -rounding behaviour. The struct :ref:`v4l2_selection <v4l2-selection>` +rounding behaviour. The struct :c:type:`v4l2_selection` ``flags`` field must be set to one of the following: - ``0`` - The driver can adjust the rectangle size freely and shall @@ -102,7 +102,7 @@ horizontal and vertical offset and sizes are chosen according to following priority: 1. Satisfy constraints from struct - :ref:`v4l2_selection <v4l2-selection>` ``flags``. + :c:type:`v4l2_selection` ``flags``. 2. Adjust width, height, left, and top to hardware limits and alignments. @@ -115,7 +115,7 @@ following priority: 5. Keep horizontal and vertical offset as close as possible to original ones. -On success the struct :ref:`v4l2_rect <v4l2-rect>` ``r`` field +On success the struct :c:type:`v4l2_rect` ``r`` field contains the adjusted rectangle. When the parameters are unsuitable the application may modify the cropping (composing) or image parameters and repeat the cycle until satisfactory parameters have been negotiated. If @@ -140,7 +140,7 @@ Selection targets and flags are documented in -.. _v4l2-selection: +.. c:type:: v4l2_selection .. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}| @@ -179,7 +179,7 @@ Selection targets and flags are documented in - .. row 4 - - struct :ref:`v4l2_rect <v4l2-rect>` + - struct :c:type:`v4l2_rect` - ``r`` @@ -207,7 +207,7 @@ EINVAL supported, or the ``flags`` argument is not valid. ERANGE - It is not possible to adjust struct :ref:`v4l2_rect <v4l2-rect>` + It is not possible to adjust struct :c:type:`v4l2_rect` ``r`` rectangle to satisfy all constraints given in the ``flags`` argument. |