• Giorgio Vazzana's avatar
    lavd/v4l2: read the correct time per frame from devices that support a standard · 514216d8
    Giorgio Vazzana authored
    Generally speaking, there are two types of v4l2 devices [1]:
    
    1) devices that support a standard, like PAL or NTFS (tv cards, for example). For
    this class of devices the framerate is fixed by the standard (for example PAL uses
    25 fps) and the v4l2 driver cannot usually negotiate a different framerate (unless
    it can skip frames on the driver side, to save I/O bandwidth).
    
    2) devices for which the notion of standard does not make sense (webcams, for example).
    For these devices it is usually possibile to request a desidered framerate.
    
    In either case, the desidered frame rate can be requested when the VIDIOC_G_PARM
    ioctl returns the V4L2_CAP_TIMEPERFRAME flag in the capability field.
    
    Currently the code does not check for V4L2_CAP_TIMEPERFRAME and supports only the
    second category of devices, returning a time per frame of 0/0 for devices in the
    first group that do not permit to negotiate the framerate.
    
    This patch adds support to read the correct framerate in all cases.
    
    [1] http://linuxtv.org/downloads/v4l-dvb-apis/standard.htmlSigned-off-by: 's avatarStefano Sabatini <stefasab@gmail.com>
    514216d8
Name
Last commit
Last update
..
Makefile Loading commit data...
alldevices.c Loading commit data...
alsa-audio-common.c Loading commit data...
alsa-audio-dec.c Loading commit data...
alsa-audio-enc.c Loading commit data...
alsa-audio.h Loading commit data...
avdevice.c Loading commit data...
avdevice.h Loading commit data...
bktr.c Loading commit data...
caca.c Loading commit data...
dshow.c Loading commit data...
dshow_capture.h Loading commit data...
dshow_common.c Loading commit data...
dshow_enummediatypes.c Loading commit data...
dshow_enumpins.c Loading commit data...
dshow_filter.c Loading commit data...
dshow_pin.c Loading commit data...
dv1394.c Loading commit data...
dv1394.h Loading commit data...
fbdev.c Loading commit data...
iec61883.c Loading commit data...
jack_audio.c Loading commit data...
lavfi.c Loading commit data...
libavdevice.v Loading commit data...
libcdio.c Loading commit data...
libdc1394.c Loading commit data...
openal-dec.c Loading commit data...
oss_audio.c Loading commit data...
pulse.c Loading commit data...
sdl.c Loading commit data...
sndio_common.c Loading commit data...
sndio_common.h Loading commit data...
sndio_dec.c Loading commit data...
sndio_enc.c Loading commit data...
timefilter.c Loading commit data...
timefilter.h Loading commit data...
v4l.c Loading commit data...
v4l2.c Loading commit data...
version.h Loading commit data...
vfwcap.c Loading commit data...
x11grab.c Loading commit data...