2016-06-30 16:18:56 +03:00
|
|
|
.. -*- coding: utf-8; mode: rst -*-
|
|
|
|
|
2016-07-01 19:42:29 +03:00
|
|
|
.. _VIDIOC_DQEVENT:
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
********************
|
|
|
|
ioctl VIDIOC_DQEVENT
|
|
|
|
********************
|
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Name
|
2016-07-05 13:58:48 +03:00
|
|
|
====
|
2016-06-30 16:18:56 +03:00
|
|
|
|
2016-07-05 13:58:48 +03:00
|
|
|
VIDIOC_DQEVENT - Dequeue event
|
2016-06-30 16:18:56 +03:00
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
|
|
|
|
Synopsis
|
2016-06-30 16:18:56 +03:00
|
|
|
========
|
|
|
|
|
2016-08-19 22:53:38 +03:00
|
|
|
.. c:function:: int ioctl( int fd, VIDIOC_DQEVENT, struct v4l2_event *argp )
|
|
|
|
:name: VIDIOC_DQEVENT
|
2016-06-30 16:18:56 +03:00
|
|
|
|
2016-07-05 13:58:48 +03:00
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Arguments
|
2016-06-30 16:18:56 +03:00
|
|
|
=========
|
|
|
|
|
|
|
|
``fd``
|
|
|
|
File descriptor returned by :ref:`open() <func-open>`.
|
|
|
|
|
|
|
|
``argp``
|
|
|
|
|
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Description
|
2016-06-30 16:18:56 +03:00
|
|
|
===========
|
|
|
|
|
|
|
|
Dequeue an event from a video device. No input is required for this
|
|
|
|
ioctl. All the fields of the struct :ref:`v4l2_event <v4l2-event>`
|
|
|
|
structure are filled by the driver. The file handle will also receive
|
|
|
|
exceptions which the application may get by e.g. using the select system
|
|
|
|
call.
|
|
|
|
|
|
|
|
|
2016-08-18 19:46:03 +03:00
|
|
|
.. tabularcolumns:: |p{3.0cm}|p{4.3cm}|p{2.5cm}|p{7.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _v4l2-event:
|
|
|
|
|
2016-08-18 19:46:03 +03:00
|
|
|
.. cssclass: longtable
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: struct v4l2_event
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2 1
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``type``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- Type of the event, see :ref:`event-type`.
|
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- union
|
|
|
|
|
|
|
|
- ``u``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- struct :ref:`v4l2_event_vsync <v4l2-event-vsync>`
|
|
|
|
|
|
|
|
- ``vsync``
|
|
|
|
|
|
|
|
- Event data for event ``V4L2_EVENT_VSYNC``.
|
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>`
|
|
|
|
|
|
|
|
- ``ctrl``
|
|
|
|
|
|
|
|
- Event data for event ``V4L2_EVENT_CTRL``.
|
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- struct :ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
|
|
|
|
|
|
|
|
- ``frame_sync``
|
|
|
|
|
|
|
|
- Event data for event ``V4L2_EVENT_FRAME_SYNC``.
|
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- struct :ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
|
|
|
|
|
|
|
|
- ``motion_det``
|
|
|
|
|
|
|
|
- Event data for event V4L2_EVENT_MOTION_DET.
|
|
|
|
|
|
|
|
- .. row 7
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- struct :ref:`v4l2_event_src_change <v4l2-event-src-change>`
|
|
|
|
|
|
|
|
- ``src_change``
|
|
|
|
|
|
|
|
- Event data for event V4L2_EVENT_SOURCE_CHANGE.
|
|
|
|
|
|
|
|
- .. row 8
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- __u8
|
|
|
|
|
2016-07-13 14:43:30 +03:00
|
|
|
- ``data``\ [64]
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- Event data. Defined by the event type. The union should be used to
|
2016-07-04 22:25:48 +03:00
|
|
|
define easily accessible type for events.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 9
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``pending``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- Number of pending events excluding this one.
|
|
|
|
|
|
|
|
- .. row 10
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``sequence``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- Event sequence number. The sequence number is incremented for
|
2016-07-04 22:25:48 +03:00
|
|
|
every subscribed event that takes place. If sequence numbers are
|
|
|
|
not contiguous it means that events have been lost.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 11
|
|
|
|
|
|
|
|
- struct timespec
|
|
|
|
|
|
|
|
- ``timestamp``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- Event timestamp. The timestamp has been taken from the
|
2016-07-04 22:25:48 +03:00
|
|
|
``CLOCK_MONOTONIC`` clock. To access the same clock outside V4L2,
|
|
|
|
use :c:func:`clock_gettime(2)`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 12
|
|
|
|
|
|
|
|
- u32
|
|
|
|
|
|
|
|
- ``id``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The ID associated with the event source. If the event does not
|
2016-07-04 22:25:48 +03:00
|
|
|
have an associated ID (this depends on the event type), then this
|
|
|
|
is 0.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 13
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
2016-07-13 14:43:30 +03:00
|
|
|
- ``reserved``\ [8]
|
2016-06-30 16:18:56 +03:00
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- Reserved for future extensions. Drivers must set the array to
|
2016-07-04 22:25:48 +03:00
|
|
|
zero.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
2016-08-18 20:31:47 +03:00
|
|
|
.. cssclass:: longtable
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _event-type:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: Event Types
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 1 4
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_ALL``
|
|
|
|
|
|
|
|
- 0
|
|
|
|
|
|
|
|
- All events. V4L2_EVENT_ALL is valid only for
|
2016-07-04 22:25:48 +03:00
|
|
|
VIDIOC_UNSUBSCRIBE_EVENT for unsubscribing all events at once.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_VSYNC``
|
|
|
|
|
|
|
|
- 1
|
|
|
|
|
|
|
|
- This event is triggered on the vertical sync. This event has a
|
2016-07-04 22:25:48 +03:00
|
|
|
struct :ref:`v4l2_event_vsync <v4l2-event-vsync>` associated
|
|
|
|
with it.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_EOS``
|
|
|
|
|
|
|
|
- 2
|
|
|
|
|
|
|
|
- This event is triggered when the end of a stream is reached. This
|
2016-07-04 22:25:48 +03:00
|
|
|
is typically used with MPEG decoders to report to the application
|
|
|
|
when the last of the MPEG stream has been decoded.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_CTRL``
|
|
|
|
|
|
|
|
- 3
|
|
|
|
|
|
|
|
- This event requires that the ``id`` matches the control ID from
|
2016-07-04 22:25:48 +03:00
|
|
|
which you want to receive events. This event is triggered if the
|
|
|
|
control's value changes, if a button control is pressed or if the
|
|
|
|
control's flags change. This event has a struct
|
|
|
|
:ref:`v4l2_event_ctrl <v4l2-event-ctrl>` associated with it.
|
|
|
|
This struct contains much of the same information as struct
|
|
|
|
:ref:`v4l2_queryctrl <v4l2-queryctrl>` and struct
|
|
|
|
:ref:`v4l2_control <v4l2-control>`.
|
|
|
|
|
|
|
|
If the event is generated due to a call to
|
|
|
|
:ref:`VIDIOC_S_CTRL <VIDIOC_G_CTRL>` or
|
|
|
|
:ref:`VIDIOC_S_EXT_CTRLS <VIDIOC_G_EXT_CTRLS>`, then the
|
|
|
|
event will *not* be sent to the file handle that called the ioctl
|
|
|
|
function. This prevents nasty feedback loops. If you *do* want to
|
|
|
|
get the event, then set the ``V4L2_EVENT_SUB_FL_ALLOW_FEEDBACK``
|
|
|
|
flag.
|
|
|
|
|
|
|
|
This event type will ensure that no information is lost when more
|
|
|
|
events are raised than there is room internally. In that case the
|
|
|
|
struct :ref:`v4l2_event_ctrl <v4l2-event-ctrl>` of the
|
|
|
|
second-oldest event is kept, but the ``changes`` field of the
|
|
|
|
second-oldest event is ORed with the ``changes`` field of the
|
|
|
|
oldest event.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_FRAME_SYNC``
|
|
|
|
|
|
|
|
- 4
|
|
|
|
|
|
|
|
- Triggered immediately when the reception of a frame has begun.
|
2016-07-04 22:25:48 +03:00
|
|
|
This event has a struct
|
|
|
|
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>`
|
|
|
|
associated with it.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
If the hardware needs to be stopped in the case of a buffer
|
|
|
|
underrun it might not be able to generate this event. In such
|
|
|
|
cases the ``frame_sequence`` field in struct
|
|
|
|
:ref:`v4l2_event_frame_sync <v4l2-event-frame-sync>` will not
|
|
|
|
be incremented. This causes two consecutive frame sequence numbers
|
|
|
|
to have n times frame interval in between them.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_SOURCE_CHANGE``
|
|
|
|
|
|
|
|
- 5
|
|
|
|
|
|
|
|
- This event is triggered when a source parameter change is detected
|
2016-07-04 22:25:48 +03:00
|
|
|
during runtime by the video device. It can be a runtime resolution
|
|
|
|
change triggered by a video decoder or the format change happening
|
|
|
|
on an input connector. This event requires that the ``id`` matches
|
|
|
|
the input index (when used with a video device node) or the pad
|
|
|
|
index (when used with a subdevice node) from which you want to
|
|
|
|
receive events.
|
|
|
|
|
|
|
|
This event has a struct
|
|
|
|
:ref:`v4l2_event_src_change <v4l2-event-src-change>`
|
|
|
|
associated with it. The ``changes`` bitfield denotes what has
|
|
|
|
changed for the subscribed pad. If multiple events occurred before
|
|
|
|
application could dequeue them, then the changes will have the
|
|
|
|
ORed value of all the events generated.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 7
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_MOTION_DET``
|
|
|
|
|
|
|
|
- 6
|
|
|
|
|
|
|
|
- Triggered whenever the motion detection state for one or more of
|
2016-07-04 22:25:48 +03:00
|
|
|
the regions changes. This event has a struct
|
|
|
|
:ref:`v4l2_event_motion_det <v4l2-event-motion-det>`
|
|
|
|
associated with it.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 8
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_PRIVATE_START``
|
|
|
|
|
|
|
|
- 0x08000000
|
|
|
|
|
|
|
|
- Base event number for driver-private events.
|
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _v4l2-event-vsync:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: struct v4l2_event_vsync
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u8
|
|
|
|
|
|
|
|
- ``field``
|
|
|
|
|
|
|
|
- The upcoming field. See enum :ref:`v4l2_field <v4l2-field>`.
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-18 19:46:03 +03:00
|
|
|
.. tabularcolumns:: |p{3.5cm}|p{3.0cm}|p{1.8cm}|p{8.5cm}|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _v4l2-event-ctrl:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: struct v4l2_event_ctrl
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2 1
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``changes``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- A bitmask that tells what has changed. See
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`ctrl-changes-flags`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``type``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The type of the control. See enum
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`v4l2_ctrl_type <v4l2-ctrl-type>`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- union (anonymous)
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
|
|
|
-
|
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 4
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- __s32
|
|
|
|
|
|
|
|
- ``value``
|
|
|
|
|
|
|
|
- The 32-bit value of the control for 32-bit control types. This is
|
2016-07-04 22:25:48 +03:00
|
|
|
0 for string controls since the value of a string cannot be passed
|
|
|
|
using :ref:`VIDIOC_DQEVENT`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 5
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- __s64
|
|
|
|
|
|
|
|
- ``value64``
|
|
|
|
|
|
|
|
- The 64-bit value of the control for 64-bit control types.
|
|
|
|
|
|
|
|
- .. row 6
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``flags``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The control flags. See :ref:`control-flags`.
|
|
|
|
|
|
|
|
- .. row 7
|
|
|
|
|
|
|
|
- __s32
|
|
|
|
|
|
|
|
- ``minimum``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The minimum value of the control. See struct
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 8
|
|
|
|
|
|
|
|
- __s32
|
|
|
|
|
|
|
|
- ``maximum``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The maximum value of the control. See struct
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 9
|
|
|
|
|
|
|
|
- __s32
|
|
|
|
|
|
|
|
- ``step``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The step value of the control. See struct
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 10
|
|
|
|
|
|
|
|
- __s32
|
|
|
|
|
|
|
|
- ``default_value``
|
|
|
|
|
2016-07-04 22:25:48 +03:00
|
|
|
-
|
2016-06-30 16:18:56 +03:00
|
|
|
- The default value value of the control. See struct
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`v4l2_queryctrl <v4l2-queryctrl>`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _v4l2-event-frame-sync:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: struct v4l2_event_frame_sync
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``frame_sequence``
|
|
|
|
|
|
|
|
- The sequence number of the frame being received.
|
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _v4l2-event-src-change:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: struct v4l2_event_src_change
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``changes``
|
|
|
|
|
|
|
|
- A bitmask that tells what has changed. See
|
2016-07-04 22:25:48 +03:00
|
|
|
:ref:`src-changes-flags`.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{4.4cm}|p{4.4cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _v4l2-event-motion-det:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: struct v4l2_event_motion_det
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 1 1 2
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``flags``
|
|
|
|
|
|
|
|
- Currently only one flag is available: if
|
2016-07-04 22:25:48 +03:00
|
|
|
``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` is set, then the
|
|
|
|
``frame_sequence`` field is valid, otherwise that field should be
|
|
|
|
ignored.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``frame_sequence``
|
|
|
|
|
|
|
|
- The sequence number of the frame being received. Only valid if the
|
2016-07-04 22:25:48 +03:00
|
|
|
``V4L2_EVENT_MD_FL_HAVE_FRAME_SEQ`` flag was set.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- __u32
|
|
|
|
|
|
|
|
- ``region_mask``
|
|
|
|
|
|
|
|
- The bitmask of the regions that reported motion. There is at least
|
2016-07-04 22:25:48 +03:00
|
|
|
one region. If this field is 0, then no motion was detected at
|
|
|
|
all. If there is no ``V4L2_CID_DETECT_MD_REGION_GRID`` control
|
|
|
|
(see :ref:`detect-controls`) to assign a different region to
|
|
|
|
each cell in the motion detection grid, then that all cells are
|
|
|
|
automatically assigned to the default region 0.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _ctrl-changes-flags:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: Control Changes
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 1 4
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_CTRL_CH_VALUE``
|
|
|
|
|
|
|
|
- 0x0001
|
|
|
|
|
|
|
|
- This control event was triggered because the value of the control
|
2016-07-04 22:25:48 +03:00
|
|
|
changed. Special cases: Volatile controls do no generate this
|
|
|
|
event; If a control has the ``V4L2_CTRL_FLAG_EXECUTE_ON_WRITE``
|
|
|
|
flag set, then this event is sent as well, regardless its value.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 2
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_CTRL_CH_FLAGS``
|
|
|
|
|
|
|
|
- 0x0002
|
|
|
|
|
|
|
|
- This control event was triggered because the control flags
|
2016-07-04 22:25:48 +03:00
|
|
|
changed.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
- .. row 3
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_CTRL_CH_RANGE``
|
|
|
|
|
|
|
|
- 0x0004
|
|
|
|
|
|
|
|
- This control event was triggered because the minimum, maximum,
|
2016-07-04 22:25:48 +03:00
|
|
|
step or the default value of the control changed.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
[media] docs-rst: add tabularcolumns to all tables
LaTeX doesn't handle too well auto-width on tables, and ReST
markup requires an special tag to give it the needed hints.
As we're using A4 paper, we have 17cm of useful spaces. As
most media tables have widths, let's use it to generate the
needed via the following perl script:
my ($line_size, $table_header, $has_cols) = (17.5, 0, 0);
my $out;
my $header = "";
my @widths = ();
sub round { $_[0] > 0 ? int($_[0] + .5) : -int(-$_[0] + .5) }
while (<>) {
if (!$table_header) {
$has_cols = 1 if (m/..\s+tabularcolumns::/);
if (m/..\s+flat-table::/) {
$table_header = 1;
$header = $_;
next;
}
$out .= $_;
next;
}
$header .= $_;
@widths = split(/ /, $1) if (m/:widths:\s+(.*)/);
if (m/^\n$/) {
if (!$has_cols && @widths) {
my ($tot, $t, $i) = (0, 0, 0);
foreach my $v(@widths) { $tot += $v; };
$out .= ".. tabularcolumns:: |";
for ($i = 0; $i < scalar @widths - 1; $i++) {
my $v = $widths[$i];
my $w = round(10 * ($v * $line_size) / $tot) / 10;
$out .= sprintf "p{%.1fcm}|", $w;
$t += $w;
}
my $w = $line_size - $t;
$out .= sprintf "p{%.1fcm}|\n\n", $w;
}
$out .= $header;
$table_header = 0;
$has_cols = 0;
$header = "";
@widths = ();
}
}
print $out;
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-08-17 14:14:19 +03:00
|
|
|
.. tabularcolumns:: |p{6.6cm}|p{2.2cm}|p{8.7cm}|
|
|
|
|
|
2016-08-19 17:14:23 +03:00
|
|
|
.. _src-changes-flags:
|
|
|
|
|
2016-06-30 16:18:56 +03:00
|
|
|
.. flat-table:: Source Changes
|
|
|
|
:header-rows: 0
|
|
|
|
:stub-columns: 0
|
|
|
|
:widths: 3 1 4
|
|
|
|
|
|
|
|
|
|
|
|
- .. row 1
|
|
|
|
|
|
|
|
- ``V4L2_EVENT_SRC_CH_RESOLUTION``
|
|
|
|
|
|
|
|
- 0x0001
|
|
|
|
|
|
|
|
- This event gets triggered when a resolution change is detected at
|
2016-07-04 22:25:48 +03:00
|
|
|
an input. This can come from an input connector or from a video
|
|
|
|
decoder.
|
2016-06-30 16:18:56 +03:00
|
|
|
|
|
|
|
|
2016-07-05 21:14:35 +03:00
|
|
|
Return Value
|
2016-06-30 16:18:56 +03: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.
|