doc-rst: linux_tv: don't simplify VIDIOC_G_foo references
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / vidioc-g-output.rst
CommitLineData
5377d91f
MH
1.. -*- coding: utf-8; mode: rst -*-
2
af4a4d0d 3.. _VIDIOC_G_OUTPUT:
5377d91f
MH
4
5**************************************
6ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
7**************************************
8
9*man VIDIOC_G_OUTPUT(2)*
10
11VIDIOC_S_OUTPUT
12Query or select the current video output
13
14
15Synopsis
16========
17
18.. c:function:: int ioctl( int fd, int request, int *argp )
19
20Arguments
21=========
22
23``fd``
24 File descriptor returned by :ref:`open() <func-open>`.
25
26``request``
27 VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
28
29``argp``
30
31
32Description
33===========
34
35To query the current video output applications call the
4e03cb76 36:ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver
5377d91f
MH
37stores the number of the output, as in the struct
38:ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will
39fail only when there are no video outputs, returning the EINVAL error
40code.
41
42To select a video output applications store the number of the desired
2212ff25 43output in an integer and call the :ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a
5377d91f
MH
44pointer to this integer. Side effects are possible. For example outputs
45may support different video standards, so the driver may implicitly
46switch the current standard. standard. Because of these possible side
47effects applications must select an output before querying or
48negotiating any other parameters.
49
50Information about video outputs is available using the
7347081e 51:ref:`VIDIOC_ENUMOUTPUT` ioctl.
5377d91f
MH
52
53
54Return Value
55============
56
57On success 0 is returned, on error -1 and the ``errno`` variable is set
58appropriately. The generic error codes are described at the
59:ref:`Generic Error Codes <gen-errors>` chapter.
60
61EINVAL
62 The number of the video output is out of bounds, or there are no
63 video outputs at all.
64
65
66.. ------------------------------------------------------------------------------
67.. This file was automatically converted from DocBook-XML with the dbxml
68.. library (https://github.com/return42/sphkerneldoc). The origin XML comes
69.. from the linux kernel, refer to:
70..
71.. * https://github.com/torvalds/linux/tree/master/Documentation/DocBook
72.. ------------------------------------------------------------------------------
This page took 0.027054 seconds and 5 git commands to generate.