[FFmpeg-devel] [PATCH 1/2] Deprecate av_opt_show() in favor of a new function av_opt_show2(), which allows to specify only a subset of all the options to show.

Aurelien Jacobs aurel
Sun Sep 5 22:11:34 CEST 2010


On Fri, Sep 03, 2010 at 05:00:24PM +0200, Stefano Sabatini wrote:
> On date Friday 2010-09-03 15:02:13 +0200, Aurelien Jacobs encoded:
> > On Fri, Sep 03, 2010 at 02:33:20AM +0200, Stefano Sabatini wrote:
> > > On date Wednesday 2010-09-01 13:18:43 -0300, Ramiro Polla encoded:
> > > > On Wed, Sep 1, 2010 at 1:09 PM, Stefano Sabatini
> > > > <stefano.sabatini-lala at poste.it> wrote:
> > > > > On date Wednesday 2010-09-01 17:53:32 +0200, Aurelien Jacobs encoded:
> > > > >> On Wed, Sep 01, 2010 at 12:53:10AM +0200, Stefano Sabatini wrote:
> > > > >> > diff --git a/libavcodec/opt.c b/libavcodec/opt.c
> > > > >> > index 128d95d..7c8a9c1 100644
> > > > >> > --- a/libavcodec/opt.c
> > > > >> > +++ b/libavcodec/opt.c
> > > > >> > [...]
> > > > >> >
> > > > >> > +#if LIBAVCODEC_VERSION_MAJOR < 53
> > > > >>
> > > > >> Please don't use LIBAVCODEC_VERSION_MAJOR directly.
> > > > >> Instead, define a FF_API_OPT_SHOW in avcodec.h.
> > > > >
> > > > > What's the advantage of such approach?
> > > > 
> > > > It has been discussed lately on the list. It's easier to
> > > > enable/disable specific updates.
> > > 
> > > I have about 10000 mails in my ffmpeg-devel mailbox, please provide a
> > > link or resume the explanation, in this case it looks to me just like
> > > an useless complication.
> > 
> > See thread "[PATCH] #define LAVF_API_MAX_STREAMS" started on August 11.
> 
> Updated, even if in this case it looks a bit overkill, regards.
>
> [...]
> 
> diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h
> index b4b0cec..4bb0592 100644
> --- a/libavcodec/avcodec.h
> +++ b/libavcodec/avcodec.h
> @@ -50,6 +50,7 @@
>  #ifndef FF_API_PALETTE_CONTROL
>  #define FF_API_PALETTE_CONTROL  (LIBAVCODEC_VERSION_MAJOR < 54)
>  #endif
> +#define FF_API_OPT_SHOW         (LIBAVCODEC_VERSION_MAJOR < 53)

Please add #ifndef like other defines around. This will allow for
example some automated regression tests by simply configuring with:
  --extra-cflags="-DFF_API_OPT_SHOW=0"

Aurel



More information about the ffmpeg-devel mailing list