~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/Documentation/userspace-api/media/v4l/vidioc-enum-framesizes.rst

Version: ~ [ linux-6.12-rc7 ] ~ [ linux-6.11.7 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.60 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.116 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.171 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.229 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.285 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.323 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.12 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

Diff markup

Differences between /Documentation/userspace-api/media/v4l/vidioc-enum-framesizes.rst (Architecture i386) and /Documentation/userspace-api/media/v4l/vidioc-enum-framesizes.rst (Architecture mips)


  1 .. SPDX-License-Identifier: GFDL-1.1-no-invari      1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
  2 .. c:namespace:: V4L                                2 .. c:namespace:: V4L
  3                                                     3 
  4 .. _VIDIOC_ENUM_FRAMESIZES:                         4 .. _VIDIOC_ENUM_FRAMESIZES:
  5                                                     5 
  6 ****************************                        6 ****************************
  7 ioctl VIDIOC_ENUM_FRAMESIZES                        7 ioctl VIDIOC_ENUM_FRAMESIZES
  8 ****************************                        8 ****************************
  9                                                     9 
 10 Name                                               10 Name
 11 ====                                               11 ====
 12                                                    12 
 13 VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes     13 VIDIOC_ENUM_FRAMESIZES - Enumerate frame sizes
 14                                                    14 
 15 Synopsis                                           15 Synopsis
 16 ========                                           16 ========
 17                                                    17 
 18 .. c:macro:: VIDIOC_ENUM_FRAMESIZES                18 .. c:macro:: VIDIOC_ENUM_FRAMESIZES
 19                                                    19 
 20 ``int ioctl(int fd, VIDIOC_ENUM_FRAMESIZES, st     20 ``int ioctl(int fd, VIDIOC_ENUM_FRAMESIZES, struct v4l2_frmsizeenum *argp)``
 21                                                    21 
 22 Arguments                                          22 Arguments
 23 =========                                          23 =========
 24                                                    24 
 25 ``fd``                                             25 ``fd``
 26     File descriptor returned by :c:func:`open(     26     File descriptor returned by :c:func:`open()`.
 27                                                    27 
 28 ``argp``                                           28 ``argp``
 29     Pointer to struct :c:type:`v4l2_frmsizeenu     29     Pointer to struct :c:type:`v4l2_frmsizeenum`
 30     that contains an index and pixel format an     30     that contains an index and pixel format and receives a frame width
 31     and height.                                    31     and height.
 32                                                    32 
 33 Description                                        33 Description
 34 ===========                                        34 ===========
 35                                                    35 
 36 This ioctl allows applications to enumerate al     36 This ioctl allows applications to enumerate all frame sizes (i. e. width
 37 and height in pixels) that the device supports     37 and height in pixels) that the device supports for the given pixel
 38 format.                                            38 format.
 39                                                    39 
 40 The supported pixel formats can be obtained by     40 The supported pixel formats can be obtained by using the
 41 :ref:`VIDIOC_ENUM_FMT` function.                   41 :ref:`VIDIOC_ENUM_FMT` function.
 42                                                    42 
 43 The return value and the content of the ``v4l2     43 The return value and the content of the ``v4l2_frmsizeenum.type`` field
 44 depend on the type of frame sizes the device s     44 depend on the type of frame sizes the device supports. Here are the
 45 semantics of the function for the different ca     45 semantics of the function for the different cases:
 46                                                    46 
 47 -  **Discrete:** The function returns success      47 -  **Discrete:** The function returns success if the given index value
 48    (zero-based) is valid. The application shou     48    (zero-based) is valid. The application should increase the index by
 49    one for each call until ``EINVAL`` is retur     49    one for each call until ``EINVAL`` is returned. The
 50    ``v4l2_frmsizeenum.type`` field is set to       50    ``v4l2_frmsizeenum.type`` field is set to
 51    ``V4L2_FRMSIZE_TYPE_DISCRETE`` by the drive     51    ``V4L2_FRMSIZE_TYPE_DISCRETE`` by the driver. Of the union only the
 52    ``discrete`` member is valid.                   52    ``discrete`` member is valid.
 53                                                    53 
 54 -  **Step-wise:** The function returns success     54 -  **Step-wise:** The function returns success if the given index value
 55    is zero and ``EINVAL`` for any other index      55    is zero and ``EINVAL`` for any other index value. The
 56    ``v4l2_frmsizeenum.type`` field is set to       56    ``v4l2_frmsizeenum.type`` field is set to
 57    ``V4L2_FRMSIZE_TYPE_STEPWISE`` by the drive     57    ``V4L2_FRMSIZE_TYPE_STEPWISE`` by the driver. Of the union only the
 58    ``stepwise`` member is valid.                   58    ``stepwise`` member is valid.
 59                                                    59 
 60 -  **Continuous:** This is a special case of t     60 -  **Continuous:** This is a special case of the step-wise type above.
 61    The function returns success if the given i     61    The function returns success if the given index value is zero and
 62    ``EINVAL`` for any other index value. The `     62    ``EINVAL`` for any other index value. The ``v4l2_frmsizeenum.type``
 63    field is set to ``V4L2_FRMSIZE_TYPE_CONTINU     63    field is set to ``V4L2_FRMSIZE_TYPE_CONTINUOUS`` by the driver. Of
 64    the union only the ``stepwise`` member is v     64    the union only the ``stepwise`` member is valid and the
 65    ``step_width`` and ``step_height`` values a     65    ``step_width`` and ``step_height`` values are set to 1.
 66                                                    66 
 67 When the application calls the function with i     67 When the application calls the function with index zero, it must check
 68 the ``type`` field to determine the type of fr     68 the ``type`` field to determine the type of frame size enumeration the
 69 device supports. Only for the ``V4L2_FRMSIZE_T     69 device supports. Only for the ``V4L2_FRMSIZE_TYPE_DISCRETE`` type does
 70 it make sense to increase the index value to r     70 it make sense to increase the index value to receive more frame sizes.
 71                                                    71 
 72 .. note::                                          72 .. note::
 73                                                    73 
 74    The order in which the frame sizes are retu     74    The order in which the frame sizes are returned has no special
 75    meaning. In particular does it not say anyt     75    meaning. In particular does it not say anything about potential default
 76    format sizes.                                   76    format sizes.
 77                                                    77 
 78 Applications can assume that the enumeration d     78 Applications can assume that the enumeration data does not change
 79 without any interaction from the application i     79 without any interaction from the application itself. This means that the
 80 enumeration data is consistent if the applicat     80 enumeration data is consistent if the application does not perform any
 81 other ioctl calls while it runs the frame size     81 other ioctl calls while it runs the frame size enumeration.
 82                                                    82 
 83 Structs                                            83 Structs
 84 =======                                            84 =======
 85                                                    85 
 86 In the structs below, *IN* denotes a value tha     86 In the structs below, *IN* denotes a value that has to be filled in by
 87 the application, *OUT* denotes values that the     87 the application, *OUT* denotes values that the driver fills in. The
 88 application should zero out all members except     88 application should zero out all members except for the *IN* fields.
 89                                                    89 
 90 .. c:type:: v4l2_frmsize_discrete                  90 .. c:type:: v4l2_frmsize_discrete
 91                                                    91 
 92 .. flat-table:: struct v4l2_frmsize_discrete       92 .. flat-table:: struct v4l2_frmsize_discrete
 93     :header-rows:  0                               93     :header-rows:  0
 94     :stub-columns: 0                               94     :stub-columns: 0
 95     :widths:       1 1 2                           95     :widths:       1 1 2
 96                                                    96 
 97     * - __u32                                      97     * - __u32
 98       - ``width``                                  98       - ``width``
 99       - Width of the frame [pixel].                99       - Width of the frame [pixel].
100     * - __u32                                     100     * - __u32
101       - ``height``                                101       - ``height``
102       - Height of the frame [pixel].              102       - Height of the frame [pixel].
103                                                   103 
104                                                   104 
105 .. c:type:: v4l2_frmsize_stepwise                 105 .. c:type:: v4l2_frmsize_stepwise
106                                                   106 
107 .. flat-table:: struct v4l2_frmsize_stepwise      107 .. flat-table:: struct v4l2_frmsize_stepwise
108     :header-rows:  0                              108     :header-rows:  0
109     :stub-columns: 0                              109     :stub-columns: 0
110     :widths:       1 1 2                          110     :widths:       1 1 2
111                                                   111 
112     * - __u32                                     112     * - __u32
113       - ``min_width``                             113       - ``min_width``
114       - Minimum frame width [pixel].              114       - Minimum frame width [pixel].
115     * - __u32                                     115     * - __u32
116       - ``max_width``                             116       - ``max_width``
117       - Maximum frame width [pixel].              117       - Maximum frame width [pixel].
118     * - __u32                                     118     * - __u32
119       - ``step_width``                            119       - ``step_width``
120       - Frame width step size [pixel].            120       - Frame width step size [pixel].
121     * - __u32                                     121     * - __u32
122       - ``min_height``                            122       - ``min_height``
123       - Minimum frame height [pixel].             123       - Minimum frame height [pixel].
124     * - __u32                                     124     * - __u32
125       - ``max_height``                            125       - ``max_height``
126       - Maximum frame height [pixel].             126       - Maximum frame height [pixel].
127     * - __u32                                     127     * - __u32
128       - ``step_height``                           128       - ``step_height``
129       - Frame height step size [pixel].           129       - Frame height step size [pixel].
130                                                   130 
131                                                   131 
132 .. c:type:: v4l2_frmsizeenum                      132 .. c:type:: v4l2_frmsizeenum
133                                                   133 
134 .. tabularcolumns:: |p{6.4cm}|p{2.8cm}|p{8.1cm    134 .. tabularcolumns:: |p{6.4cm}|p{2.8cm}|p{8.1cm}|
135                                                   135 
136 .. flat-table:: struct v4l2_frmsizeenum           136 .. flat-table:: struct v4l2_frmsizeenum
137     :header-rows:  0                              137     :header-rows:  0
138     :stub-columns: 0                              138     :stub-columns: 0
139                                                   139 
140     * - __u32                                     140     * - __u32
141       - ``index``                                 141       - ``index``
142       - IN: Index of the given frame size in t    142       - IN: Index of the given frame size in the enumeration.
143     * - __u32                                     143     * - __u32
144       - ``pixel_format``                          144       - ``pixel_format``
145       - IN: Pixel format for which the frame s    145       - IN: Pixel format for which the frame sizes are enumerated.
146     * - __u32                                     146     * - __u32
147       - ``type``                                  147       - ``type``
148       - OUT: Frame size type the device suppor    148       - OUT: Frame size type the device supports.
149     * - union {                                   149     * - union {
150       - (anonymous)                               150       - (anonymous)
151       - OUT: Frame size with the given index.     151       - OUT: Frame size with the given index.
152     * - struct :c:type:`v4l2_frmsize_discrete`    152     * - struct :c:type:`v4l2_frmsize_discrete`
153       - ``discrete``                              153       - ``discrete``
154       -                                           154       -
155     * - struct :c:type:`v4l2_frmsize_stepwise`    155     * - struct :c:type:`v4l2_frmsize_stepwise`
156       - ``stepwise``                              156       - ``stepwise``
157       -                                           157       -
158     * - }                                         158     * - }
159       -                                           159       -
160       -                                           160       -
161     * - __u32                                     161     * - __u32
162       - ``reserved[2]``                           162       - ``reserved[2]``
163       - Reserved space for future use. Must be    163       - Reserved space for future use. Must be zeroed by drivers and
164         applications.                             164         applications.
165                                                   165 
166                                                   166 
167 Enums                                             167 Enums
168 =====                                             168 =====
169                                                   169 
170 .. c:type:: v4l2_frmsizetypes                     170 .. c:type:: v4l2_frmsizetypes
171                                                   171 
172 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm    172 .. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.5cm}|
173                                                   173 
174 .. flat-table:: enum v4l2_frmsizetypes            174 .. flat-table:: enum v4l2_frmsizetypes
175     :header-rows:  0                              175     :header-rows:  0
176     :stub-columns: 0                              176     :stub-columns: 0
177     :widths:       3 1 4                          177     :widths:       3 1 4
178                                                   178 
179     * - ``V4L2_FRMSIZE_TYPE_DISCRETE``            179     * - ``V4L2_FRMSIZE_TYPE_DISCRETE``
180       - 1                                         180       - 1
181       - Discrete frame size.                      181       - Discrete frame size.
182     * - ``V4L2_FRMSIZE_TYPE_CONTINUOUS``          182     * - ``V4L2_FRMSIZE_TYPE_CONTINUOUS``
183       - 2                                         183       - 2
184       - Continuous frame size.                    184       - Continuous frame size.
185     * - ``V4L2_FRMSIZE_TYPE_STEPWISE``            185     * - ``V4L2_FRMSIZE_TYPE_STEPWISE``
186       - 3                                         186       - 3
187       - Step-wise defined frame size.             187       - Step-wise defined frame size.
188                                                   188 
189 Return Value                                      189 Return Value
190 ============                                      190 ============
191                                                   191 
192 On success 0 is returned, on error -1 and the     192 On success 0 is returned, on error -1 and the ``errno`` variable is set
193 appropriately. The generic error codes are des    193 appropriately. The generic error codes are described at the
194 :ref:`Generic Error Codes <gen-errors>` chapte    194 :ref:`Generic Error Codes <gen-errors>` chapter.
                                                      

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php