aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/DocBook/media/v4l/vidioc-g-selection.xml
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/DocBook/media/v4l/vidioc-g-selection.xml')
-rw-r--r--Documentation/DocBook/media/v4l/vidioc-g-selection.xml40
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.
63Do not use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 63Do not use multiplanar buffers. Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>
64</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 64instead 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
67setting the value of &v4l2-selection; <structfield>target</structfield> field 67setting the value of &v4l2-selection; <structfield>target</structfield> field
68to <constant> V4L2_SEL_TGT_CROP </constant> (<constant> 68to <constant>V4L2_SEL_TGT_CROP</constant> (<constant>V4L2_SEL_TGT_COMPOSE</constant>).
69V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref 69Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" />
70linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional 70for additional targets. The <structfield>flags</structfield> and <structfield>reserved
71targets. 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
73with zeros. The driver fills the rest of the structure or 72with zeros. The driver fills the rest of the structure or
74returns &EINVAL; if incorrect buffer type or target was used. If cropping 73returns &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
79units. The only exception are rectangles for images in raw formats, whose 78units. The only exception are rectangles for images in raw formats, whose
80coordinates are always expressed in pixels. </para> 79coordinates 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
84use multiplanar buffers. Use <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE 83use multiplanar buffers. Use <constant>V4L2_BUF_TYPE_VIDEO_CAPTURE</constant>
85</constant> instead of <constant> V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE 84instead 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
88setting the value of &v4l2-selection; <structfield>target</structfield> to 87setting 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>).
90V4L2_SEL_TGT_COMPOSE </constant>). Please refer to table <xref 89Please refer to table <xref linkend="v4l2-selections-common" /> or <xref linkend="selection-api" />
91linkend="v4l2-selections-common" /> or <xref linkend="selection-api" /> for additional 90for additional targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
92targets. The &v4l2-rect; <structfield>r</structfield> rectangle need to be
93set to the desired active area. Field &v4l2-selection; <structfield> reserved 91set 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
95coordinates of the requested rectangle. An application may 93coordinates of the requested rectangle. An application may
@@ -149,8 +147,8 @@ On success the &v4l2-rect; <structfield>r</structfield> field contains
149the adjusted rectangle. When the parameters are unsuitable the application may 147the adjusted rectangle. When the parameters are unsuitable the application may
150modify the cropping (composing) or image parameters and repeat the cycle until 148modify the cropping (composing) or image parameters and repeat the cycle until
151satisfactory parameters have been negotiated. If constraints flags have to be 149satisfactory parameters have been negotiated. If constraints flags have to be
152violated at then ERANGE is returned. The error indicates that <emphasis> there 150violated at then ERANGE is returned. The error indicates that <emphasis>there
153exist no rectangle </emphasis> that satisfies the constraints.</para> 151exist 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>