diff options
author | Giorgio Vazzana <mywing81@gmail.com> | 2013-01-30 15:08:04 +0100 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-01-31 15:29:53 +0100 |
commit | 514216d8a928cf80980ca8dc5daea46e9d41cad9 (patch) | |
tree | d0b73d2570139b5e2d21f08141c9ab58160f5a29 /libavcodec/dnxhdenc.h | |
parent | 402ea625ab7be2fed10c8728029ffbe1ff4bf2d7 (diff) | |
download | ffmpeg-514216d8a928cf80980ca8dc5daea46e9d41cad9.tar.gz |
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>
Diffstat (limited to 'libavcodec/dnxhdenc.h')
0 files changed, 0 insertions, 0 deletions