[FFmpeg-devel] [PATCH/RFC] Per-codec option system

Ronald S. Bultje rsbultje
Tue Sep 29 20:40:00 CEST 2009


On Tue, Sep 29, 2009 at 2:21 PM, Jason Garrett-Glaser
<darkshikari at gmail.com> wrote:
> A very simple implementation of a string option system, with x264
> completed as an example. ?Not implemented in ffmpeg.c yet.

I privmsg'ed you a way to do at least some of this:
- add a AOptions*opts at the end of AVCodec, like pix_fmts (can also
be done in AVMuxer if necessary) and then rename it to AVStuffOption
- make this an array of, per codec:

AVOption options = {
   { "bitrate", TYPE_INT, OFFSET_IN_STRUCT(MyCodecContext, bit_rate), rest },
   { ... },

    &options (or NULL, if none)

This allows setting, help and listing, see libavcodec/opt.h. I don't
know how to do defaults, I guess you might add a function pointer to
set defaults like you did or specify a default in the AVOption


More information about the ffmpeg-devel mailing list