[FFmpeg-devel] [PATCH] lavfi/movie: add support to setting format and codec options
Nicolas George
nicolas.george at normalesup.org
Wed May 9 16:20:25 CEST 2012
Le primidi 11 floréal, an CCXX, Stefano Sabatini a écrit :
> static const AVOption movie_options[]= {
> +{"codec_opts", "set codec options", OFFSET(codec_opts), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX },
> +{"copts", "set format options", OFFSET(codec_opts), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX },
> {"format_name", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX },
> {"f", "set format name", OFFSET(format_name), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX },
> +{"format_opts", "set format options", OFFSET(format_opts), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX },
> +{"fopts", "set format options", OFFSET(format_opts), AV_OPT_TYPE_STRING, {.str = 0}, CHAR_MIN, CHAR_MAX },
Nice idea, but IMHO, the implementation you chose is not in the spirit of
the options system. IMHO, the options should not be nested: src_movie takes
the options it understands and leaves the rest in the dictionary for the
format, toe formats takes and removes what it understands, the rest is for
the codec, and if there are options after the codec, they are unknown and
should generate an error. That is the way ffmpeg proceeds (except for
streams specifier when the same option can be applied to several streams)
and the way the API was designed.
Regards,
--
Nicolas George
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20120509/573deafb/attachment.asc>
More information about the ffmpeg-devel
mailing list