2018-08-30 14:15:26 +00:00
|
|
|
.. Permission is granted to copy, distribute and/or modify this
|
|
|
|
.. document under the terms of the GNU Free Documentation License,
|
|
|
|
.. Version 1.1 or any later version published by the Free Software
|
|
|
|
.. Foundation, with no Invariant Sections, no Front-Cover Texts
|
|
|
|
.. and no Back-Cover Texts. A copy of the license is included at
|
|
|
|
.. Documentation/media/uapi/fdl-appendix.rst.
|
|
|
|
..
|
|
|
|
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
|
|
|
|
2016-04-12 22:40:46 +00:00
|
|
|
.. _metadata:
|
|
|
|
|
|
|
|
******************
|
|
|
|
Metadata Interface
|
|
|
|
******************
|
|
|
|
|
|
|
|
Metadata refers to any non-image data that supplements video frames with
|
2017-06-16 13:49:29 +00:00
|
|
|
additional information. This may include statistics computed over the image,
|
|
|
|
frame capture parameters supplied by the image source or device specific
|
|
|
|
parameters for specifying how the device processes images. This interface is
|
|
|
|
intended for transfer of metadata between the userspace and the hardware and
|
|
|
|
control of that operation.
|
2016-04-12 22:40:46 +00:00
|
|
|
|
2017-06-16 13:49:29 +00:00
|
|
|
The metadata interface is implemented on video device nodes. The device can be
|
|
|
|
dedicated to metadata or can support both video and metadata as specified in its
|
|
|
|
reported capabilities.
|
2016-04-12 22:40:46 +00:00
|
|
|
|
|
|
|
Querying Capabilities
|
|
|
|
=====================
|
|
|
|
|
2017-06-16 13:49:29 +00:00
|
|
|
Device nodes supporting the metadata capture interface set the
|
|
|
|
``V4L2_CAP_META_CAPTURE`` flag in the ``device_caps`` field of the
|
2016-04-12 22:40:46 +00:00
|
|
|
:c:type:`v4l2_capability` structure returned by the :c:func:`VIDIOC_QUERYCAP`
|
2017-06-16 13:49:29 +00:00
|
|
|
ioctl. That flag means the device can capture metadata to memory. Similarly,
|
|
|
|
device nodes supporting metadata output interface set the
|
|
|
|
``V4L2_CAP_META_OUTPUT`` flag in the ``device_caps`` field of
|
|
|
|
:c:type:`v4l2_capability` structure. That flag means the device can read
|
|
|
|
metadata from memory.
|
2016-04-12 22:40:46 +00:00
|
|
|
|
|
|
|
At least one of the read/write or streaming I/O methods must be supported.
|
|
|
|
|
|
|
|
|
|
|
|
Data Format Negotiation
|
|
|
|
=======================
|
|
|
|
|
|
|
|
The metadata device uses the :ref:`format` ioctls to select the capture format.
|
|
|
|
The metadata buffer content format is bound to that selected format. In addition
|
|
|
|
to the basic :ref:`format` ioctls, the :c:func:`VIDIOC_ENUM_FMT` ioctl must be
|
|
|
|
supported as well.
|
|
|
|
|
|
|
|
To use the :ref:`format` ioctls applications set the ``type`` field of the
|
2017-06-16 13:49:29 +00:00
|
|
|
:c:type:`v4l2_format` structure to ``V4L2_BUF_TYPE_META_CAPTURE`` or to
|
|
|
|
``V4L2_BUF_TYPE_META_OUTPUT`` and use the :c:type:`v4l2_meta_format` ``meta``
|
|
|
|
member of the ``fmt`` union as needed per the desired operation. Both drivers
|
|
|
|
and applications must set the remainder of the :c:type:`v4l2_format` structure
|
|
|
|
to 0.
|
2016-04-12 22:40:46 +00:00
|
|
|
|
2018-10-09 11:29:14 +00:00
|
|
|
.. c:type:: v4l2_meta_format
|
2016-04-12 22:40:46 +00:00
|
|
|
|
media: fix pdf build with Spinx 1.6
Sphinx 1.6 generates some LaTeX code before each table,
starting its own environment before calling tabulary,
apparently to improve table layout.
The problem is that such environment is incompatible with
adjustbox. While, in thesis, it should be possible to override
it or to redefine tabulary, I was unable to produce such patch.
Also, that would likely break on some future Sphinx version.
So, instead, let's just change the font size on bigger tables,
in order for them to fit into the page size. That is not as
good as adjustbox, and require some manual work, but it should
be less sensitive to Sphinx changes.
While here, adjust a few other tables whose text is exceeding
the cell boundaries.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2017-08-26 09:28:26 +00:00
|
|
|
.. tabularcolumns:: |p{1.4cm}|p{2.2cm}|p{13.9cm}|
|
|
|
|
|
2016-04-12 22:40:46 +00:00
|
|
|
.. flat-table:: struct v4l2_meta_format
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
* - __u32
|
|
|
|
- ``dataformat``
|
|
|
|
- The data format, set by the application. This is a little endian
|
|
|
|
:ref:`four character code <v4l2-fourcc>`. V4L2 defines metadata formats
|
|
|
|
in :ref:`meta-formats`.
|
|
|
|
* - __u32
|
|
|
|
- ``buffersize``
|
|
|
|
- Maximum buffer size in bytes required for data. The value is set by the
|
|
|
|
driver.
|