1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

avfilter/formats: Schedule avfilter_make_format64_list() for removal

Despite its name, this function is not part of the public API, as
formats.h, the header containing its declaration, is a private header.
The formats API was once public API, but that changed long ago
(b74a1da49d, the commit scheduling it to
become private, is from 2012). That avfilter_make_format64_list() was
forgotten is probably a result of the confusion resulting from the
libav-ffmpeg split.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
This commit is contained in:
Andreas Rheinhardt 2020-08-08 00:37:46 +02:00
parent 2e0cf4de01
commit ae5026c905
12 changed files with 23 additions and 13 deletions

View File

@ -258,7 +258,7 @@ static int query_formats(AVFilterContext *ctx)
if (ret < 0)
return ret;
layouts = avfilter_make_format64_list(chlayouts);
layouts = ff_make_format64_list(chlayouts);
if (!layouts)
return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts);

View File

@ -126,7 +126,7 @@ static int query_formats(AVFilterContext *ctx)
if(out_layout) {
int64_t layout_list[] = { out_layout, -1 };
out_layouts = avfilter_make_format64_list(layout_list);
out_layouts = ff_make_format64_list(layout_list);
} else
out_layouts = ff_all_channel_counts();

View File

@ -145,7 +145,7 @@ static av_cold int query_formats(AVFilterContext *ctx)
if (ret < 0)
return ret;
layouts = avfilter_make_format64_list(chlayouts);
layouts = ff_make_format64_list(chlayouts);
if (!layouts)
return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts);

View File

@ -101,7 +101,7 @@ static av_cold int query_formats(AVFilterContext *ctx)
if (ret < 0)
return ret;
layouts = avfilter_make_format64_list(chlayouts);
layouts = ff_make_format64_list(chlayouts);
if (!layouts)
return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts);

View File

@ -83,11 +83,10 @@ static int query_formats(AVFilterContext *ctx)
int ret;
if ((ret = ff_set_common_formats (ctx, ff_all_formats (AVMEDIA_TYPE_AUDIO))) < 0 ||
(ret = ff_set_common_channel_layouts (ctx, avfilter_make_format64_list (chlayouts ))) < 0 ||
(ret = ff_set_common_samplerates (ctx, ff_make_format_list (sample_rates ))) < 0)
return ret;
return 0;
return ff_set_common_channel_layouts(ctx, ff_make_format64_list(chlayouts));
}
static int config_props(AVFilterLink *outlink)

View File

@ -113,7 +113,7 @@ static av_cold int query_formats(AVFilterContext *ctx)
if (ret < 0)
return ret;
layouts = avfilter_make_format64_list(chlayouts);
layouts = ff_make_format64_list(chlayouts);
if (!layouts)
return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts);

View File

@ -84,7 +84,7 @@ static int query_formats(AVFilterContext *ctx)
if (ret < 0)
return ret;
layouts = avfilter_make_format64_list(chlayouts);
layouts = ff_make_format64_list(chlayouts);
if (!layouts)
return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts);

View File

@ -194,7 +194,7 @@ static av_cold int query_formats(AVFilterContext *ctx)
if (ret < 0)
return ret;
layouts = avfilter_make_format64_list(chlayouts);
layouts = ff_make_format64_list(chlayouts);
if (!layouts)
return AVERROR(ENOMEM);
ret = ff_set_common_channel_layouts(ctx, layouts);

View File

@ -1334,7 +1334,7 @@ static int query_formats(AVFilterContext *ctx)
if ((ret = ff_formats_ref(formats, &inlink->out_formats)) < 0)
return ret;
layouts = avfilter_make_format64_list(channel_layouts);
layouts = ff_make_format64_list(channel_layouts);
if ((ret = ff_channel_layouts_ref(layouts, &inlink->out_channel_layouts)) < 0)
return ret;

View File

@ -289,7 +289,7 @@ AVFilterFormats *ff_make_format_list(const int *fmts)
return formats;
}
AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts)
AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts)
{
MAKE_FORMAT_LIST(AVFilterChannelLayouts,
channel_layouts, nb_channel_layouts);
@ -300,6 +300,13 @@ AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts)
return formats;
}
#if LIBAVFILTER_VERSION_MAJOR < 8
AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts)
{
return ff_make_format64_list(fmts);
}
#endif
#define ADD_FORMAT(f, fmt, unref_fn, type, list, nb) \
do { \
type *fmts; \

View File

@ -20,6 +20,7 @@
#define AVFILTER_FORMATS_H
#include "avfilter.h"
#include "version.h"
/**
* A list of supported formats for one end of a filter link. This is used
@ -139,8 +140,11 @@ av_warn_unused_result
AVFilterChannelLayouts *ff_all_channel_counts(void);
av_warn_unused_result
AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts);
AVFilterChannelLayouts *ff_make_format64_list(const int64_t *fmts);
#if LIBAVFILTER_VERSION_MAJOR < 8
AVFilterChannelLayouts *avfilter_make_format64_list(const int64_t *fmts);
#endif
/**
* A helper for query_formats() which sets all links to the same list of channel

View File

@ -376,7 +376,7 @@ static int movie_query_formats(AVFilterContext *ctx)
if ((ret = ff_formats_ref(ff_make_format_list(list), &outlink->in_samplerates)) < 0)
return ret;
list64[0] = c->channel_layout;
if ((ret = ff_channel_layouts_ref(avfilter_make_format64_list(list64),
if ((ret = ff_channel_layouts_ref(ff_make_format64_list(list64),
&outlink->in_channel_layouts)) < 0)
return ret;
break;