[FFmpeg-devel] [PATCH] Improving support for IIDC cameras (libavdevice/libdc1394.c)

Martin Lambers marlam at marlam.de
Tue May 10 21:20:25 CEST 2011

Hello all,

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
pixel formats.

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.

Please comment.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-support-for-libdc1394-2.0.patch
Type: text/x-patch
Size: 8659 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110510/4155139c/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Improve-libdc1394-mode-and-rate-selection.patch
Type: text/x-patch
Size: 14661 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20110510/4155139c/attachment-0001.bin>

More information about the ffmpeg-devel mailing list