Video4Linux2 grab interface.
More...
#include <stdatomic.h>
#include "v4l2-common.h"
#include <dirent.h>
|
|
#define | V4L_ALLFORMATS 3 |
| |
|
#define | V4L_RAWFORMATS 1 |
| |
|
#define | V4L_COMPFORMATS 2 |
| |
|
#define | V4L_TS_DEFAULT 0 |
| | Return timestamps to the user exactly as returned by the kernel.
|
| |
|
#define | V4L_TS_ABS 1 |
| | Autodetect the kind of timestamps returned by the kernel and convert to absolute (wall clock) timestamps.
|
| |
|
#define | V4L_TS_MONO2ABS 2 |
| | Assume kernel timestamps are from the monotonic clock and convert to absolute timestamps.
|
| |
|
#define | V4L_TS_CONVERT_READY V4L_TS_DEFAULT |
| | Once the kind of timestamps returned by the kernel have been detected, the value of the timefilter (NULL or not) determines whether a conversion takes place.
|
| |
| #define | SET_WRAPPERS(prefix) |
| |
|
#define | v4l2_open s->open_f |
| |
|
#define | v4l2_close s->close_f |
| |
|
#define | v4l2_dup s->dup_f |
| |
|
#define | v4l2_ioctl s->ioctl_f |
| |
|
#define | v4l2_read s->read_f |
| |
|
#define | v4l2_mmap s->mmap_f |
| |
|
#define | v4l2_munmap s->munmap_f |
| |
|
#define | OFFSET(x) offsetof(struct video_data, x) |
| |
|
#define | DEC AV_OPT_FLAG_DECODING_PARAM |
| |
Video4Linux2 grab interface.
Part of this file is based on the V4L2 video capture example (http://linuxtv.org/downloads/v4l-dvb-apis/capture-example.html)
Thanks to Michael Niedermayer for providing the mapping between V4L2_PIX_FMT_* and AV_PIX_FMT_*
§ SET_WRAPPERS
| #define SET_WRAPPERS |
( |
|
prefix | ) |
|
Value:do { \
s->open_f = prefix ## open; \
s->close_f = prefix ## close; \
s->dup_f = prefix ## dup; \
s->ioctl_f = prefix ## ioctl; \
s->read_f = prefix ## read; \
s->mmap_f = prefix ## mmap; \
s->munmap_f = prefix ## munmap; \
} while (0)
§ ff_v4l2_demuxer
Initial value:= {
.name = "video4linux2,v4l2",
.read_probe = v4l2_read_probe,
.read_header = v4l2_read_header,
.read_packet = v4l2_read_packet,
.read_close = v4l2_read_close,
.get_device_list = v4l2_get_device_list,
.priv_class = &v4l2_class,
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186