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
|
2020-03-04 09:21:39 +00:00
|
|
|
.. Documentation/userspace-api/media/fdl-appendix.rst.
|
2018-08-30 14:15:26 +00:00
|
|
|
..
|
|
|
|
.. TODO: replace it to GFDL-1.1-or-later WITH no-invariant-sections
|
|
|
|
|
2016-07-01 16:42:29 +00:00
|
|
|
.. _VIDIOC_G_INPUT:
|
2016-06-30 13:18:56 +00:00
|
|
|
|
|
|
|
************************************
|
|
|
|
ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
|
|
|
|
************************************
|
|
|
|
|
2016-07-05 18:14:35 +00:00
|
|
|
Name
|
2016-07-05 10:58:48 +00:00
|
|
|
====
|
2016-06-30 13:18:56 +00:00
|
|
|
|
2016-07-05 10:58:48 +00:00
|
|
|
VIDIOC_G_INPUT - VIDIOC_S_INPUT - Query or select the current video input
|
2016-06-30 13:18:56 +00:00
|
|
|
|
2016-07-05 18:14:35 +00:00
|
|
|
|
|
|
|
Synopsis
|
2016-06-30 13:18:56 +00:00
|
|
|
========
|
|
|
|
|
2016-08-19 19:53:38 +00:00
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_G_INPUT, int *argp )
|
|
|
|
:name: VIDIOC_G_INPUT
|
|
|
|
|
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_S_INPUT, int *argp )
|
|
|
|
:name: VIDIOC_S_INPUT
|
2016-06-30 13:18:56 +00:00
|
|
|
|
2016-07-05 10:58:48 +00:00
|
|
|
|
2016-07-05 18:14:35 +00:00
|
|
|
Arguments
|
2016-06-30 13:18:56 +00:00
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
|
|
|
File descriptor returned by :ref:`open() <func-open>`.
|
|
|
|
|
|
|
|
``argp``
|
2017-09-02 13:54:48 +00:00
|
|
|
Pointer an integer with input index.
|
2016-06-30 13:18:56 +00:00
|
|
|
|
|
|
|
|
2016-07-05 18:14:35 +00:00
|
|
|
Description
|
2016-06-30 13:18:56 +00:00
|
|
|
===========
|
|
|
|
|
|
|
|
To query the current video input applications call the
|
2016-07-03 13:02:29 +00:00
|
|
|
:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
|
2016-06-30 13:18:56 +00:00
|
|
|
stores the number of the input, as in the struct
|
2016-08-29 20:37:59 +00:00
|
|
|
:c:type:`v4l2_input` ``index`` field. This ioctl will fail
|
2016-07-03 14:53:09 +00:00
|
|
|
only when there are no video inputs, returning ``EINVAL``.
|
2016-06-30 13:18:56 +00:00
|
|
|
|
|
|
|
To select a video input applications store the number of the desired
|
2016-07-01 17:33:56 +00:00
|
|
|
input in an integer and call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer
|
2016-06-30 13:18:56 +00:00
|
|
|
to this integer. Side effects are possible. For example inputs may
|
|
|
|
support different video standards, so the driver may implicitly switch
|
|
|
|
the current standard. Because of these possible side effects
|
|
|
|
applications must select an input before querying or negotiating any
|
|
|
|
other parameters.
|
|
|
|
|
|
|
|
Information about video inputs is available using the
|
2016-07-01 16:58:44 +00:00
|
|
|
:ref:`VIDIOC_ENUMINPUT` ioctl.
|
2016-06-30 13:18:56 +00:00
|
|
|
|
|
|
|
|
2016-07-05 18:14:35 +00:00
|
|
|
Return Value
|
2016-06-30 13:18:56 +00:00
|
|
|
============
|
|
|
|
|
|
|
|
On success 0 is returned, on error -1 and the ``errno`` variable is set
|
|
|
|
appropriately. The generic error codes are described at the
|
|
|
|
:ref:`Generic Error Codes <gen-errors>` chapter.
|
|
|
|
|
|
|
|
EINVAL
|
|
|
|
The number of the video input is out of bounds.
|