2016-06-30 21:18:56 +08:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
2016-07-02 00:42:29 +08:00
|
|
|
.. _VIDIOC_G_INPUT:
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
************************************
|
|
|
|
ioctl VIDIOC_G_INPUT, VIDIOC_S_INPUT
|
|
|
|
************************************
|
|
|
|
|
|
|
|
*man VIDIOC_G_INPUT(2)*
|
|
|
|
|
|
|
|
VIDIOC_S_INPUT
|
|
|
|
Query or select the current video input
|
|
|
|
|
|
|
|
|
|
|
|
Synopsis
|
|
|
|
========
|
|
|
|
|
2016-07-02 20:49:16 +08:00
|
|
|
.. cpp:function:: int ioctl( int fd, int request, int *argp )
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
Arguments
|
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
|
|
|
File descriptor returned by :ref:`open() <func-open>`.
|
|
|
|
|
|
|
|
``request``
|
|
|
|
VIDIOC_G_INPUT, VIDIOC_S_INPUT
|
|
|
|
|
|
|
|
``argp``
|
|
|
|
|
|
|
|
|
|
|
|
Description
|
|
|
|
===========
|
|
|
|
|
|
|
|
To query the current video input applications call the
|
2016-07-03 21:02:29 +08:00
|
|
|
:ref:`VIDIOC_G_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer to an integer where the driver
|
2016-06-30 21:18:56 +08:00
|
|
|
stores the number of the input, as in the struct
|
|
|
|
:ref:`v4l2_input <v4l2-input>` ``index`` field. This ioctl will fail
|
|
|
|
only when there are no video inputs, returning EINVAL.
|
|
|
|
|
|
|
|
To select a video input applications store the number of the desired
|
2016-07-02 01:33:56 +08:00
|
|
|
input in an integer and call the :ref:`VIDIOC_S_INPUT <VIDIOC_G_INPUT>` ioctl with a pointer
|
2016-06-30 21:18:56 +08: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-02 00:58:44 +08:00
|
|
|
:ref:`VIDIOC_ENUMINPUT` ioctl.
|
2016-06-30 21:18:56 +08:00
|
|
|
|
|
|
|
|
|
|
|
Return Value
|
|
|
|
============
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
|
|
|
|
.. ------------------------------------------------------------------------------
|
|
|
|
.. This file was automatically converted from DocBook-XML with the dbxml
|
|
|
|
.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
|
|
|
|
.. from the linux kernel, refer to:
|
|
|
|
..
|
|
|
|
.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
|
|
|
|
.. ------------------------------------------------------------------------------
|