diff options
Diffstat (limited to 'Documentation/DocBook/media/v4l/vidioc-g-selection.xml')
| -rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-selection.xml | 40 |
1 files changed, 19 insertions, 21 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml index b11ec75e21a1..9c04ac8661b1 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-selection.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-selection.xml | |||
| @@ -58,17 +58,16 @@ | |||
| 58 | 58 | ||
| 59 | <para>The ioctls are used to query and configure selection rectangles.</para> | 59 | <para>The ioctls are used to query and configure selection rectangles.</para> |
| 60 | 60 | ||
| 61 | <para> To query the cropping (composing) rectangle set &v4l2-selection; | 61 | <para>To query the cropping (composing) rectangle set &v4l2-selection; |
| 62 | <structfield> type </structfield> field to the respective buffer type. | 62 | <structfield> type </structfield> field to the respective buffer type. |
| 63 | Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | 63 | Do not use multiplanar buffers. Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> |
| 64 | </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE | 64 | instead of <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>. Use |
| 65 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 65 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> instead of |
| 66 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 66 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>. The next step is |
| 67 | setting the value of &v4l2-selection; <structfield>target</structfield> field | 67 | setting the value of &v4l2-selection; <structfield>target</structfield> field |
| 68 | to <constant> V4L2_SEL_TGT_CROP </constant> (<constant> | 68 | to <constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>). |
| 69 | V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref | 69 | Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> |
| 70 | linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional | 70 | for additional targets. The <structfield>flags</structfield> and <structfield>reserved |
| 71 | targets. The <structfield>flags</structfield> and <structfield>reserved | ||
| 72 | </structfield> fields of &v4l2-selection; are ignored and they must be filled | 71 | </structfield> fields of &v4l2-selection; are ignored and they must be filled |
| 73 | with zeros. The driver fills the rest of the structure or | 72 | with zeros. The driver fills the rest of the structure or |
| 74 | returns &EINVAL; if incorrect buffer type or target was used. If cropping | 73 | returns &EINVAL; if incorrect buffer type or target was used. If cropping |
| @@ -77,19 +76,18 @@ always equal to the bounds rectangle. Finally, the &v4l2-rect; | |||
| 77 | <structfield>r</structfield> rectangle is filled with the current cropping | 76 | <structfield>r</structfield> rectangle is filled with the current cropping |
| 78 | (composing) coordinates. The coordinates are expressed in driver-dependent | 77 | (composing) coordinates. The coordinates are expressed in driver-dependent |
| 79 | units. The only exception are rectangles for images in raw formats, whose | 78 | units. The only exception are rectangles for images in raw formats, whose |
| 80 | coordinates are always expressed in pixels. </para> | 79 | coordinates are always expressed in pixels.</para> |
| 81 | 80 | ||
| 82 | <para> To change the cropping (composing) rectangle set the &v4l2-selection; | 81 | <para>To change the cropping (composing) rectangle set the &v4l2-selection; |
| 83 | <structfield>type</structfield> field to the respective buffer type. Do not | 82 | <structfield>type</structfield> field to the respective buffer type. Do not |
| 84 | use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE | 83 | use multiplanar buffers. Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant> |
| 85 | </constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE | 84 | instead of <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE</constant>. Use |
| 86 | </constant>. Use <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT </constant> instead of | 85 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT</constant> instead of |
| 87 | <constant> V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE </constant>. The next step is | 86 | <constant>V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE</constant>. The next step is |
| 88 | setting the value of &v4l2-selection; <structfield>target</structfield> to | 87 | setting the value of &v4l2-selection; <structfield>target</structfield> to |
| 89 | <constant>V4L2_SEL_TGT_CROP</constant> (<constant> | 88 | <constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>). |
| 90 | V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref | 89 | Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> |
| 91 | linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional | 90 | for additional targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be |
| 92 | targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be | ||
| 93 | set to the desired active area. Field &v4l2-selection; <structfield> reserved | 91 | set to the desired active area. Field &v4l2-selection; <structfield> reserved |
| 94 | </structfield> is ignored and must be filled with zeros. The driver may adjust | 92 | </structfield> is ignored and must be filled with zeros. The driver may adjust |
| 95 | coordinates of the requested rectangle. An application may | 93 | coordinates of the requested rectangle. An application may |
| @@ -149,8 +147,8 @@ On success the &v4l2-rect; <structfield>r</structfield> field contains | |||
| 149 | the adjusted rectangle. When the parameters are unsuitable the application may | 147 | the adjusted rectangle. When the parameters are unsuitable the application may |
| 150 | modify the cropping (composing) or image parameters and repeat the cycle until | 148 | modify the cropping (composing) or image parameters and repeat the cycle until |
| 151 | satisfactory parameters have been negotiated. If constraints flags have to be | 149 | satisfactory parameters have been negotiated. If constraints flags have to be |
| 152 | violated at then ERANGE is returned. The error indicates that <emphasis> there | 150 | violated at then ERANGE is returned. The error indicates that <emphasis>there |
| 153 | exist no rectangle </emphasis> that satisfies the constraints.</para> | 151 | exist no rectangle</emphasis> that satisfies the constraints.</para> |
| 154 | 152 | ||
| 155 | <para>Selection targets and flags are documented in <xref | 153 | <para>Selection targets and flags are documented in <xref |
| 156 | linkend="v4l2-selections-common"/>.</para> | 154 | linkend="v4l2-selections-common"/>.</para> |
