[FFmpeg-devel] [PATCH] libavfilter: constify filter list
nfxjfg at googlemail.com
Tue Jan 30 15:37:38 EET 2018
On Tue, 30 Jan 2018 20:16:50 +0700
Muhammad Faiz <mfcc64 at gmail.com> wrote:
> On Tue, Jan 30, 2018 at 2:58 PM, wm4 <nfxjfg at googlemail.com> wrote:
> > On Tue, 30 Jan 2018 14:24:12 +0700
> > Muhammad Faiz <mfcc64 at gmail.com> wrote:
> >> Move REGISTER_FILTER to FILTER_TABLE in configure.
> >> Auto generate filter extern and filter table.
> >> Sort filter table, use bsearch on avfilter_get_by_name.
> >> Define next pointer at filter extern, no need to initialize
> >> next pointer at run time, so AVFilter can be set to const.
> >> Make avfilter_register always return error.
> >> Target checkasm now depends on EXTRALIBS-avformat.
> >> Signed-off-by: Muhammad Faiz <mfcc64 at gmail.com>
> >> ---
> > Pretty nice. Should we still add a new filter listing API that uses the
> > same idiom as the BSF API? (Although you generate the .next links at
> > configure time it might still be nice to eventually get rid of that.)
> IMHO, it is uglier (i.e. by requiring opaque pointer). I don't know
> other people's opinion. Anyway, it can be added later.
Yes, because it uses an opaque pointer, it could use the linked list,
without changing any of the existing code. I think a simple filter array
would be preferable in the end, which would require an iteration
function which can pass an index to the user.
(Although I agree that this opaque thing is uglier than the current API
or an API which just takes an index.)
More information about the ffmpeg-devel