Commit | Line | Data |
---|---|---|
5377d91f MH |
1 | .. -*- coding: utf-8; mode: rst -*- |
2 | ||
af4a4d0d | 3 | .. _VIDIOC_G_OUTPUT: |
5377d91f MH |
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 | ||
b7e67f6c | 18 | .. cpp:function:: int ioctl( int fd, int request, int *argp ) |
5377d91f MH |
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 | |
4e03cb76 | 36 | :ref:`VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver |
5377d91f MH |
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 | |
2212ff25 | 43 | output in an integer and call the :ref:`VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a |
5377d91f MH |
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 | |
7347081e | 51 | :ref:`VIDIOC_ENUMOUTPUT` ioctl. |
5377d91f MH |
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 | .. ------------------------------------------------------------------------------ |