1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00
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 Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9' 2012-09-05 14:33:32 +02:00
alsa-audio-enc.c Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85' 2012-08-07 22:45:46 +02:00
alsa-audio.h Merge remote-tracking branch 'qatar/master' 2012-10-06 13:45:08 +02:00
avdevice.c Merge remote-tracking branch 'qatar/master' 2012-08-16 16:20:30 +02:00
avdevice.h Merge remote-tracking branch 'qatar/master' 2012-07-29 02:16:26 +02:00
bktr.c bktr: fix warning: missing braces around initializer 2012-12-29 19:27:07 +01:00
caca.c caca: fix 10l typo 2012-10-12 19:05:58 +02:00
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: Swap the min and max values of the 'standard' option 2012-11-02 11:25:48 +02:00
dv1394.h miscellaneous typo fixes 2012-12-21 00:18:34 +01:00
fbdev.c Merge remote-tracking branch 'qatar/master' 2012-10-12 17:21:01 +02:00
iec61883.c Update iec61883 to handle multiple devices, and allow 2012-11-13 19:44:21 +01:00
jack_audio.c Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9' 2012-09-05 14:33:32 +02:00
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 Merge remote-tracking branch 'qatar/master' 2012-07-29 02:16:26 +02:00
openal-dec.c Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9' 2012-09-05 14:33:32 +02:00
oss_audio.c oss: warn when non block mode cannot be enabled. 2012-11-05 00:28:21 +01:00
pulse.c Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9' 2012-09-05 14:33:32 +02:00
sdl.c Merge commit '716d413c13981da15323c7a3821860536eefdbbb' 2012-10-08 21:06:57 +02:00
sndio_common.c Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85' 2012-08-07 22:45:46 +02:00
sndio_common.h Merge remote-tracking branch 'qatar/master' 2012-10-06 13:45:08 +02:00
sndio_dec.c Merge commit 'e6153f173a49e5bfa70b0c04d2f82930533597b9' 2012-09-05 14:33:32 +02:00
sndio_enc.c Merge commit '36ef5369ee9b336febc2c270f8718cec4476cb85' 2012-08-07 22:45:46 +02:00
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 Merge commit '716d413c13981da15323c7a3821860536eefdbbb' 2012-10-08 21:06:57 +02:00
version.h lavd/v4l2: add list_standards option 2013-01-31 12:38:03 +01:00
vfwcap.c Merge commit '716d413c13981da15323c7a3821860536eefdbbb' 2012-10-08 21:06:57 +02:00
x11grab.c x11grab: fix mixed declaration and code 2012-10-29 22:24:10 +01:00