media: Rename stateful codec control macros

For historical reasons, stateful codec controls are named
as {}_MPEG_{}. While we can't at this point sanely
change all control IDs (such as V4L2_CID_MPEG_VIDEO_VP8_FRAME_HEADER),
we can least change the more meaningful macros such as classes
macros.

Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
Tested-by: Jernej Skrabec <jernej.skrabec@siol.net>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Ezequiel Garcia
2020-12-03 12:27:32 +01:00
committed by Mauro Carvalho Chehab
parent c8363ff21b
commit 35aaa6e650
14 changed files with 241 additions and 232 deletions
@@ -32,7 +32,7 @@ file handle is visible through another file handle).
One of the most common memory-to-memory device is the codec. Codecs
are more complicated than most and require additional setup for
their codec parameters. This is done through codec controls.
See :ref:`mpeg-controls`. More details on how to use codec memory-to-memory
See :ref:`codec-controls`. More details on how to use codec memory-to-memory
devices are given in the following sections.
.. toctree::
@@ -1,6 +1,6 @@
.. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
.. _mpeg-controls:
.. _codec-controls:
***********************
Codec Control Reference
@@ -26,7 +26,7 @@ Generic Codec Controls
Codec Control IDs
-----------------
``V4L2_CID_MPEG_CLASS (class)``
``V4L2_CID_CODEC_CLASS (class)``
The Codec class descriptor. Calling
:ref:`VIDIOC_QUERYCTRL` for this control will
return a description of this control class. This description can be
@@ -55,8 +55,8 @@ controls in that array and a control class. Control classes are used to
group similar controls into a single class. For example, control class
``V4L2_CTRL_CLASS_USER`` contains all user controls (i. e. all controls
that can also be set using the old :ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>`
ioctl). Control class ``V4L2_CTRL_CLASS_MPEG`` contains all controls
relating to MPEG encoding, etc.
ioctl). Control class ``V4L2_CTRL_CLASS_CODEC`` contains controls
relating to codecs.
All controls in the control array must belong to the specified control
class. An error is returned if this is not the case.
@@ -130,9 +130,9 @@ control class is found:
.. code-block:: c
qctrl.id = V4L2_CTRL_CLASS_MPEG | V4L2_CTRL_FLAG_NEXT_CTRL;
qctrl.id = V4L2_CTRL_CLASS_CODEC | V4L2_CTRL_FLAG_NEXT_CTRL;
while (0 == ioctl(fd, VIDIOC_QUERYCTRL, &qctrl)) {
if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_MPEG)
if (V4L2_CTRL_ID2CLASS(qctrl.id) != V4L2_CTRL_CLASS_CODEC)
break;
/* ... */
qctrl.id |= V4L2_CTRL_FLAG_NEXT_CTRL;
@@ -322,10 +322,10 @@ still cause this situation.
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` and
:ref:`VIDIOC_G_CTRL <VIDIOC_G_CTRL>` ioctl belong to this
class.
* - ``V4L2_CTRL_CLASS_MPEG``
* - ``V4L2_CTRL_CLASS_CODEC``
- 0x990000
- The class containing MPEG compression controls. These controls are
described in :ref:`mpeg-controls`.
- The class containing stateful codec controls. These controls are
described in :ref:`codec-controls`.
* - ``V4L2_CTRL_CLASS_CAMERA``
- 0x9a0000
- The class containing camera controls. These controls are described