diff options
| author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-04-04 07:14:55 -0400 |
|---|---|---|
| committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-07-17 10:57:21 -0400 |
| commit | a4c8c262f8ae71a842585d00db9fc10014061ddf (patch) | |
| tree | 2f7c0054a64ee80eb36da675360fafeff70e3566 /Documentation/DocBook | |
| parent | 715bfb3e1f0ca0f6c6bd7805d90f31325fb61b72 (diff) | |
[media] DocBook media: update VIDIOC_G/S/TRY_EXT_CTRLS
Document the support for the new compound type controls.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'Documentation/DocBook')
| -rw-r--r-- | Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml index e9f6735c0823..2a157b3f2ab2 100644 --- a/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml +++ b/Documentation/DocBook/media/v4l/vidioc-g-ext-ctrls.xml | |||
| @@ -72,23 +72,30 @@ initialize the <structfield>id</structfield>, | |||
| 72 | <structfield>size</structfield> and <structfield>reserved2</structfield> fields | 72 | <structfield>size</structfield> and <structfield>reserved2</structfield> fields |
| 73 | of each &v4l2-ext-control; and call the | 73 | of each &v4l2-ext-control; and call the |
| 74 | <constant>VIDIOC_G_EXT_CTRLS</constant> ioctl. String controls controls | 74 | <constant>VIDIOC_G_EXT_CTRLS</constant> ioctl. String controls controls |
| 75 | must also set the <structfield>string</structfield> field.</para> | 75 | must also set the <structfield>string</structfield> field. Controls |
| 76 | of compound types (<constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is set) | ||
| 77 | must set the <structfield>ptr</structfield> field.</para> | ||
| 76 | 78 | ||
| 77 | <para>If the <structfield>size</structfield> is too small to | 79 | <para>If the <structfield>size</structfield> is too small to |
| 78 | receive the control result (only relevant for pointer-type controls | 80 | receive the control result (only relevant for pointer-type controls |
| 79 | like strings), then the driver will set <structfield>size</structfield> | 81 | like strings), then the driver will set <structfield>size</structfield> |
| 80 | to a valid value and return an &ENOSPC;. You should re-allocate the | 82 | to a valid value and return an &ENOSPC;. You should re-allocate the |
| 81 | string memory to this new size and try again. It is possible that the | 83 | memory to this new size and try again. For the string type it is possible that |
| 82 | same issue occurs again if the string has grown in the meantime. It is | 84 | the same issue occurs again if the string has grown in the meantime. It is |
| 83 | recommended to call &VIDIOC-QUERYCTRL; first and use | 85 | recommended to call &VIDIOC-QUERYCTRL; first and use |
| 84 | <structfield>maximum</structfield>+1 as the new <structfield>size</structfield> | 86 | <structfield>maximum</structfield>+1 as the new <structfield>size</structfield> |
| 85 | value. It is guaranteed that that is sufficient memory. | 87 | value. It is guaranteed that that is sufficient memory. |
| 86 | </para> | 88 | </para> |
| 87 | 89 | ||
| 90 | <para>N-dimensional arrays are set and retrieved row-by-row. You cannot set a partial | ||
| 91 | array, all elements have to be set or retrieved. The total size is calculated | ||
| 92 | as <structfield>elems</structfield> * <structfield>elem_size</structfield>. | ||
| 93 | These values can be obtained by calling &VIDIOC-QUERY-EXT-CTRL;.</para> | ||
| 94 | |||
| 88 | <para>To change the value of a set of controls applications | 95 | <para>To change the value of a set of controls applications |
| 89 | initialize the <structfield>id</structfield>, <structfield>size</structfield>, | 96 | initialize the <structfield>id</structfield>, <structfield>size</structfield>, |
| 90 | <structfield>reserved2</structfield> and | 97 | <structfield>reserved2</structfield> and |
| 91 | <structfield>value/string</structfield> fields of each &v4l2-ext-control; and | 98 | <structfield>value/value64/string/ptr</structfield> fields of each &v4l2-ext-control; and |
| 92 | call the <constant>VIDIOC_S_EXT_CTRLS</constant> ioctl. The controls | 99 | call the <constant>VIDIOC_S_EXT_CTRLS</constant> ioctl. The controls |
| 93 | will only be set if <emphasis>all</emphasis> control values are | 100 | will only be set if <emphasis>all</emphasis> control values are |
| 94 | valid.</para> | 101 | valid.</para> |
| @@ -96,7 +103,7 @@ valid.</para> | |||
| 96 | <para>To check if a set of controls have correct values applications | 103 | <para>To check if a set of controls have correct values applications |
| 97 | initialize the <structfield>id</structfield>, <structfield>size</structfield>, | 104 | initialize the <structfield>id</structfield>, <structfield>size</structfield>, |
| 98 | <structfield>reserved2</structfield> and | 105 | <structfield>reserved2</structfield> and |
| 99 | <structfield>value/string</structfield> fields of each &v4l2-ext-control; and | 106 | <structfield>value/value64/string/ptr</structfield> fields of each &v4l2-ext-control; and |
| 100 | call the <constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctl. It is up to | 107 | call the <constant>VIDIOC_TRY_EXT_CTRLS</constant> ioctl. It is up to |
| 101 | the driver whether wrong values are automatically adjusted to a valid | 108 | the driver whether wrong values are automatically adjusted to a valid |
| 102 | value or if an error is returned.</para> | 109 | value or if an error is returned.</para> |
| @@ -158,19 +165,33 @@ applications must set the array to zero.</entry> | |||
| 158 | <entry></entry> | 165 | <entry></entry> |
| 159 | <entry>__s32</entry> | 166 | <entry>__s32</entry> |
| 160 | <entry><structfield>value</structfield></entry> | 167 | <entry><structfield>value</structfield></entry> |
| 161 | <entry>New value or current value.</entry> | 168 | <entry>New value or current value. Valid if this control is not of |
| 169 | type <constant>V4L2_CTRL_TYPE_INTEGER64</constant> and | ||
| 170 | <constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is not set.</entry> | ||
| 162 | </row> | 171 | </row> |
| 163 | <row> | 172 | <row> |
| 164 | <entry></entry> | 173 | <entry></entry> |
| 165 | <entry>__s64</entry> | 174 | <entry>__s64</entry> |
| 166 | <entry><structfield>value64</structfield></entry> | 175 | <entry><structfield>value64</structfield></entry> |
| 167 | <entry>New value or current value.</entry> | 176 | <entry>New value or current value. Valid if this control is of |
| 177 | type <constant>V4L2_CTRL_TYPE_INTEGER64</constant> and | ||
| 178 | <constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is not set.</entry> | ||
| 168 | </row> | 179 | </row> |
| 169 | <row> | 180 | <row> |
| 170 | <entry></entry> | 181 | <entry></entry> |
| 171 | <entry>char *</entry> | 182 | <entry>char *</entry> |
| 172 | <entry><structfield>string</structfield></entry> | 183 | <entry><structfield>string</structfield></entry> |
| 173 | <entry>A pointer to a string.</entry> | 184 | <entry>A pointer to a string. Valid if this control is of |
| 185 | type <constant>V4L2_CTRL_TYPE_STRING</constant>.</entry> | ||
| 186 | </row> | ||
| 187 | <row> | ||
| 188 | <entry></entry> | ||
| 189 | <entry>void *</entry> | ||
| 190 | <entry><structfield>ptr</structfield></entry> | ||
| 191 | <entry>A pointer to a compound type which can be an N-dimensional array and/or a | ||
| 192 | compound type (the control's type is >= <constant>V4L2_CTRL_COMPOUND_TYPES</constant>). | ||
| 193 | Valid if <constant>V4L2_CTRL_FLAG_HAS_PAYLOAD</constant> is set for this control. | ||
| 194 | </entry> | ||
| 174 | </row> | 195 | </row> |
| 175 | </tbody> | 196 | </tbody> |
| 176 | </tgroup> | 197 | </tgroup> |
