|
@@ -39,17 +39,10 @@ structure. Drivers fill the rest of the structure. The results are
|
|
constant except when switching the video standard. Remember this switch
|
|
constant except when switching the video standard. Remember this switch
|
|
can occur implicit when switching the video input or output.
|
|
can occur implicit when switching the video input or output.
|
|
|
|
|
|
-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``.
|
|
|
|
-
|
|
|
|
This ioctl must be implemented for video capture or output devices that
|
|
This ioctl must be implemented for video capture or output devices that
|
|
support cropping and/or scaling and/or have non-square pixels, and for
|
|
support cropping and/or scaling and/or have non-square pixels, and for
|
|
overlay devices.
|
|
overlay devices.
|
|
|
|
|
|
-
|
|
|
|
.. c:type:: v4l2_cropcap
|
|
.. c:type:: v4l2_cropcap
|
|
|
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
@@ -62,9 +55,9 @@ overlay devices.
|
|
* - __u32
|
|
* - __u32
|
|
- ``type``
|
|
- ``type``
|
|
- Type of the data stream, set by the application. Only these types
|
|
- Type of the data stream, set by the application. Only these types
|
|
- are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``,
|
|
|
|
- ``V4L2_BUF_TYPE_VIDEO_OUTPUT`` and
|
|
|
|
- ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :c:type:`v4l2_buf_type`.
|
|
|
|
|
|
+ are valid here: ``V4L2_BUF_TYPE_VIDEO_CAPTURE``, ``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE``,
|
|
|
|
+ ``V4L2_BUF_TYPE_VIDEO_OUTPUT``, ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE`` and
|
|
|
|
+ ``V4L2_BUF_TYPE_VIDEO_OVERLAY``. See :c:type:`v4l2_buf_type` and the note above.
|
|
* - struct :ref:`v4l2_rect <v4l2-rect-crop>`
|
|
* - struct :ref:`v4l2_rect <v4l2-rect-crop>`
|
|
- ``bounds``
|
|
- ``bounds``
|
|
- Defines the window within capturing or output is possible, this
|
|
- Defines the window within capturing or output is possible, this
|
|
@@ -90,6 +83,16 @@ overlay devices.
|
|
``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and
|
|
``pixelaspect`` to 1/1. Other common values are 54/59 for PAL and
|
|
SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].
|
|
SECAM, 11/10 for NTSC sampled according to [:ref:`itu601`].
|
|
|
|
|
|
|
|
+.. note::
|
|
|
|
+ Unfortunately in the case of multiplanar buffer types
|
|
|
|
+ (``V4L2_BUF_TYPE_VIDEO_CAPTURE_MPLANE`` and ``V4L2_BUF_TYPE_VIDEO_OUTPUT_MPLANE``)
|
|
|
|
+ this API was messed up with regards to how the :c:type:`v4l2_cropcap` ``type`` field
|
|
|
|
+ should be filled in. Some drivers only accepted the ``_MPLANE`` buffer type while
|
|
|
|
+ other drivers only accepted a non-multiplanar buffer type (i.e. without the
|
|
|
|
+ ``_MPLANE`` at the end).
|
|
|
|
+
|
|
|
|
+ Starting with kernel 4.13 both variations are allowed.
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
.. _v4l2-rect-crop:
|
|
.. _v4l2-rect-crop:
|