[FFmpeg-devel] [PATCH 2/2] lavd/v4l2: list formats supported by a decoder as compressed
Stephan Hilb
stephan at ecshi.net
Sat Feb 2 00:04:46 CET 2013
>> type & V4L_RAWFORMATS) {
>> const char *fmt_name = av_get_pix_fmt_name(pix_fmt);
>> av_log(ctx, AV_LOG_INFO, "Raw : %9s : %20s :",
>> fmt_name ? fmt_name : "Unsupported",
>> vfd.description);
>> - } else if (vfd.flags & V4L2_FMT_FLAG_COMPRESSED &&
>> + } else if ((vfd.flags & V4L2_FMT_FLAG_COMPRESSED ||
>> codec_id) && type & V4L_COMPFORMATS) {
>
> I don't think this is correct, since for example I got rawvideo listed
> as compressed.
sorry, my bad, it should compare to AV_CODEC_ID_RAWVIDEO.
> Basically "compressed" and "uncompressed" are V4L concepts, which
> make no much sense in the libav* space (and I tend to dislike the
> somehow arbitrary distinction made in the list_formats code, which
> doesn't map well with libav* internals), but maybe we can find some
> clever way to cope with it.
Why not output a table like this:
v4l2 format │ v4l2 comp. │ ffmpeg decoder │ framesizes
────────────┼────────────┼────────────────┼──────────────────
foo │ X │ foodec │ 160x120, 320x240
bar │ │ bardec │ 42x42
yuv420 │ │ raw │ 640x480
strange │ X │ unsupported │ 640x480
One could see whether the format is supported and which decoder is used.
My main problem is that the current code assumes that formats which do
not set the V4L2_FMT_FLAG_COMPRESSED tag don't use a decoder and have
an ffmpeg equivalent pixelformat, which is not true in the case of cpia.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20130202/5383ecaf/attachment.asc>
More information about the ffmpeg-devel
mailing list