On Sat, Feb 15, 2014 at 12:59 PM, Anton Khirnov <an...@khirnov.net> wrote: > > On Sat, 15 Feb 2014 12:10:24 +0100, Vittorio Giovara > <vittorio.giov...@gmail.com> wrote: >> On Saturday, February 15, 2014, Anton Khirnov <an...@khirnov.net> wrote: >> >> > --- >> > doc/APIchanges | 4 ++++ >> > libavutil/opt.c | 14 +++++++++++--- >> > libavutil/opt.h | 9 +++++++++ >> > libavutil/version.h | 4 ++-- >> > 4 files changed, 26 insertions(+), 5 deletions(-) >> > >> > diff --git a/doc/APIchanges b/doc/APIchanges >> > index ba7ebd1..3803aed 100644 >> > --- a/doc/APIchanges >> > +++ b/doc/APIchanges >> > @@ -13,6 +13,10 @@ libavutil: 2013-12-xx >> > >> > API changes, most recent first: >> > >> > +2014-xx-xx - xxxxxxx - lavu 53.03.0 - opt.h >> > + Add AV_OPT_FLAG_EXPORT and AV_OPT_FLAG_READONLY to mark options meant >> > (only) >> > + for reading. >> >> >> The patch looks ok, but I don't understand why you are splitting the >> flags. After all caller has access to all avoptions, so in a way they are >> all exported already. Or am I missing something? > > The flag is supposed to signal the intended use of the option. Of course the > caller already has access to all options, but most options will never contain > anything interesting -- only the default value or whatever the caller put > there. > The export flag should be set on the options that can be updated on their own > without the caller setting them. One example would be the bitrate for encoding > -- the caller can set it to the average bitrate, then the encoder would update > it for each frame to the immediate value. >
I see and I agree, thanks for the explanation. Vittorio _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel