Improving support for IIDC cameras (libavdevice/libdc1394.c)
|Reported by:||marlam||Owned by:|
|Blocking:||Reproduced by developer:||no|
|Analyzed by developer:||no|
[This is the following post from ffmpeg-devel:
<http://ffmpeg.org/pipermail/ffmpeg-devel/2011-May/111608.html>. Since there was no reply, I add this ticket so that the patch does not get lost.]
currently, the libdc1394 format only supports very few video modes:
320x240 or 640x480, and only two pixel formats. Furthermore, these modes
have to be selected via AVFormatParameters, there is no autodetection.
I'd like to change that so that the camera is queried for the modes it
supports, and a suitable mode is selected with regard to
AVFormatParameters. If no parameters are given, the best mode should be
chosen automatically. Furthermore, I'd like to add support for more
The attached patches do this in two steps:
1) Remove support for the libdc1394 v1 API. V2 has been available for
ages (it even is in Debian oldstable), and V1 is not shipped with
current distributions anymore (it does not work with current kernels).
2) Replace the mode selection code in dc1394.c (but leave the rest of
the code untouched). Use the libdc1394 v2 API to query available video
modes, remove those that we currently do not support, and sort the rest
according to preference. Then pick a mode according to
AVFormatParameters, or use a fallback based on the preferences list. At
the same time, support all dc1394 color codings for which there is a
corresponding FFmpeg pixel format.