.. code-block:: c
- :caption: Example 3: Information about the current audio input
+ :caption: Example 1.3. Information about the current audio input
struct v4l2_audio audio;
.. code-block:: c
- :caption: Example 4: Switching to the first audio input
+ :caption: Example 1.4. Switching to the first audio input
struct v4l2_audio audio;
.. _enum_all_controls:
.. code-block:: c
- :caption: Example 8: Enumerating all user controls
+ :caption: Example 1.8. Enumerating all user controls
struct v4l2_queryctrl queryctrl;
.. code-block:: c
- :caption: Example 9: Enumerating all user controls (alternative)
+ :caption: Example 1.9. Enumerating all user controls (alternative)
memset(&queryctrl, 0, sizeof(queryctrl));
.. code-block:: c
- :caption: Example 10: Changing controls
+ :caption: Example 1.10. Changing controls
struct v4l2_queryctrl queryctrl;
struct v4l2_control control;
change ``V4L2_BUF_TYPE_VIDEO_CAPTURE`` for other types of device.
.. code-block:: c
- :caption: Example 11: Resetting the cropping parameters
+ :caption: Example 1.11. Resetting the cropping parameters
struct v4l2_cropcap cropcap;
struct v4l2_crop crop;
}
.. code-block:: c
- :caption: Example 12: Simple downscaling
+ :caption: Example 1.12. Simple downscaling
struct v4l2_cropcap cropcap;
struct v4l2_format format;
**NOTE:** This example assumes an output device.
.. code-block:: c
- :caption: Example 13. Selecting an output area
+ :caption: Example 1.13. Selecting an output area
struct v4l2_cropcap cropcap;
struct v4l2_crop crop;
**NOTE:** This example assumes a video capture device.
.. code-block:: c
- :caption: Example 14: Current scaling factor and pixel aspect
+ :caption: Example 1.14. Current scaling factor and pixel aspect
struct v4l2_cropcap cropcap;
struct v4l2_crop crop;
.. code-block:: c
- :caption: Example 5: Information about the current video standard
+ :caption: Example 1.5. Information about the current video standard
v4l2_std_id std_id;
struct v4l2_standard standard;
.. code-block:: c
- :caption: Example 6: Listing the video standards supported by the current input
+ :caption: Example 1.6. Listing the video standards supported by the current input
struct v4l2_input input;
struct v4l2_standard standard;
.. code-block:: c
- :caption: Example 7: Selecting a new video standard
+ :caption: Example 1.7. Selecting a new video standard
struct v4l2_input input;
v4l2_std_id std_id;
all the output ioctls when the device has one or more outputs.
.. code-block:: c
- :caption: Example 1: Information about the current video input
+ :caption: Example 1.1. Information about the current video input
struct v4l2_input input;
int index;
.. code-block:: c
- :caption: Example 2: Switching to the first video input
+ :caption: Example 1.2. Switching to the first video input
int index;