doc-rst: linux_tv DocBook to reST migration (docs-next)
[deliverable/linux.git] / Documentation / linux_tv / media / v4l / vidioc-g-output.rst
1 .. -*- coding: utf-8; mode: rst -*-
2
3 .. _vidioc-g-output:
4
5 **************************************
6 ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
7 **************************************
8
9 *man VIDIOC_G_OUTPUT(2)*
10
11 VIDIOC_S_OUTPUT
12 Query or select the current video output
13
14
15 Synopsis
16 ========
17
18 .. c:function:: int ioctl( int fd, int request, int *argp )
19
20 Arguments
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
32 Description
33 ===========
34
35 To query the current video output applications call the
36 ``VIDIOC_G_OUTPUT`` ioctl with a pointer to an integer where the driver
37 stores the number of the output, as in the struct
38 :ref:`v4l2_output <v4l2-output>` ``index`` field. This ioctl will
39 fail only when there are no video outputs, returning the EINVAL error
40 code.
41
42 To select a video output applications store the number of the desired
43 output in an integer and call the ``VIDIOC_S_OUTPUT`` ioctl with a
44 pointer to this integer. Side effects are possible. For example outputs
45 may support different video standards, so the driver may implicitly
46 switch the current standard. standard. Because of these possible side
47 effects applications must select an output before querying or
48 negotiating any other parameters.
49
50 Information about video outputs is available using the
51 :ref:`VIDIOC_ENUMOUTPUT <vidioc-enumoutput>` ioctl.
52
53
54 Return Value
55 ============
56
57 On success 0 is returned, on error -1 and the ``errno`` variable is set
58 appropriately. The generic error codes are described at the
59 :ref:`Generic Error Codes <gen-errors>` chapter.
60
61 EINVAL
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.034355 seconds and 5 git commands to generate.