ffmpeg/libavdevice
Giorgio Vazzana 514216d8a9 lavd/v4l2: read the correct time per frame from devices that support a standard
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.html

Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
2013-01-31 15:29:53 +01:00
..
alldevices.c Merge commit 'a0b7e289075dccf223b7f407790d8a86fc5d77e8' 2013-01-04 13:01:54 +01:00
alsa-audio-common.c Merge commit '97bf7c03b1338a867da52c159a2afecbdedcfa88' 2012-11-12 11:32:11 +01:00
alsa-audio-dec.c
alsa-audio-enc.c
alsa-audio.h
avdevice.c
avdevice.h
bktr.c bktr: fix warning: missing braces around initializer 2012-12-29 19:27:07 +01:00
caca.c
dshow_capture.h dshow: handle events in graph 2012-12-17 03:44:12 -02:00
dshow_common.c
dshow_enummediatypes.c
dshow_enumpins.c
dshow_filter.c dshow: Use NO_DSHOW_STRSAFE for all dshow header inclusions 2012-11-16 19:26:13 +01:00
dshow_pin.c dshow: Use NO_DSHOW_STRSAFE for all dshow header inclusions 2012-11-16 19:26:13 +01:00
dshow.c dshow: call CoUninitialize() on dshow_read_close() 2012-12-17 03:44:51 -02:00
dv1394.c
dv1394.h miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
fbdev.c
iec61883.c Update iec61883 to handle multiple devices, and allow 2012-11-13 19:44:21 +01:00
jack_audio.c
lavfi.c lavd/lavfi: fix float.h include. 2012-12-06 15:09:47 +01:00
libavdevice.v
libcdio.c Merge commit '80ac87c13dc8c6c063e26a464c5c542357c0583f' 2013-01-18 13:36:39 +01:00
libdc1394.c Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967' 2012-12-05 13:34:45 +01:00
Makefile
openal-dec.c
oss_audio.c
pulse.c
sdl.c
sndio_common.c
sndio_common.h
sndio_dec.c
sndio_enc.c
timefilter.c Merge commit 'cb45553f577f8e0ebfe05d3287e1b6fa5859b967' 2012-12-05 13:34:45 +01:00
timefilter.h
v4l2.c lavd/v4l2: read the correct time per frame from devices that support a standard 2013-01-31 15:29:53 +01:00
v4l.c
version.h lavd/v4l2: add list_standards option 2013-01-31 12:38:03 +01:00
vfwcap.c
x11grab.c