2016-06-30 15:18:56 +02:00
.. -*- coding: utf-8; mode: rst -*-
2016-07-01 13:42:29 -03:00
.. _VIDIOC_G_OUTPUT:
2016-06-30 15:18:56 +02:00
***** ***** ***** ***** ***** ***** ***** ***
ioctl VIDIOC_G_OUTPUT, VIDIOC_S_OUTPUT
***** ***** ***** ***** ***** ***** ***** ***
2016-07-05 15:14:35 -03:00
Name
2016-07-05 07:58:48 -03:00
====
2016-06-30 15:18:56 +02:00
2016-07-05 07:58:48 -03:00
VIDIOC_G_OUTPUT - VIDIOC_S_OUTPUT - Query or select the current video output
2016-06-30 15:18:56 +02:00
2016-07-05 15:14:35 -03:00
Synopsis
2016-06-30 15:18:56 +02:00
========
2016-08-19 16:53:38 -03:00
.. c:function :: int ioctl( int fd, VIDIOC_G_OUTPUT, int *argp )
:name: VIDIOC_G_OUTPUT
.. c:function :: int ioctl( int fd, VIDIOC_S_OUTPUT, int *argp )
:name: VIDIOC_S_OUTPUT
2016-06-30 15:18:56 +02:00
2016-07-05 07:58:48 -03:00
2016-07-05 15:14:35 -03:00
Arguments
2016-06-30 15:18:56 +02:00
=========
`` fd ``
File descriptor returned by :ref: `open() <func-open>` .
`` argp ``
2016-07-05 15:14:35 -03:00
Description
2016-06-30 15:18:56 +02:00
===========
To query the current video output applications call the
2016-07-03 10:02:29 -03:00
:ref: `VIDIOC_G_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a pointer to an integer where the driver
2016-06-30 15:18:56 +02:00
stores the number of the output, as in the struct
2016-08-29 17:37:59 -03:00
:c:type: `v4l2_output` `` index `` field. This ioctl will
2016-07-03 11:53:09 -03:00
fail only when there are no video outputs, returning the `` EINVAL `` error
2016-06-30 15:18:56 +02:00
code.
To select a video output applications store the number of the desired
2016-07-01 14:33:56 -03:00
output in an integer and call the :ref: `VIDIOC_S_OUTPUT <VIDIOC_G_OUTPUT>` ioctl with a
2016-06-30 15:18:56 +02:00
pointer to this integer. Side effects are possible. For example outputs
may support different video standards, so the driver may implicitly
switch the current standard. standard. Because of these possible side
effects applications must select an output before querying or
negotiating any other parameters.
Information about video outputs is available using the
2016-07-01 13:58:44 -03:00
:ref: `VIDIOC_ENUMOUTPUT` ioctl.
2016-06-30 15:18:56 +02:00
2016-07-05 15:14:35 -03:00
Return Value
2016-06-30 15:18:56 +02: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 output is out of bounds, or there are no
video outputs at all.