summaryrefslogtreecommitdiff
path: root/libavfilter/formats.c
diff options
context:
space:
mode:
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r--libavfilter/formats.c60
1 files changed, 45 insertions, 15 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c
index 1fd95eb174..930ed16f5a 100644
--- a/libavfilter/formats.c
+++ b/libavfilter/formats.c
@@ -85,7 +85,7 @@ do {
MERGE_REF(ret, b, fmts, type, fail); \
} while (0)
-AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
+AVFilterFormats *ff_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
{
AVFilterFormats *ret = NULL;
@@ -213,7 +213,7 @@ int64_t *ff_copy_int64_list(const int64_t * const list)
} \
}
-AVFilterFormats *avfilter_make_format_list(const int *fmts)
+AVFilterFormats *ff_make_format_list(const int *fmts)
{
MAKE_FORMAT_LIST(AVFilterFormats, formats, format_count);
while (count--)
@@ -250,7 +250,7 @@ do { \
return 0; \
} while (0)
-int avfilter_add_format(AVFilterFormats **avff, int64_t fmt)
+int ff_add_format(AVFilterFormats **avff, int64_t fmt)
{
ADD_FORMAT(avff, fmt, int, formats, format_count);
}
@@ -260,12 +260,10 @@ int ff_add_channel_layout(AVFilterChannelLayouts **l, uint64_t channel_layout)
ADD_FORMAT(l, channel_layout, uint64_t, channel_layouts, nb_channel_layouts);
}
-#if FF_API_OLD_ALL_FORMATS_API
-AVFilterFormats *avfilter_all_formats(enum AVMediaType type)
+AVFilterFormats *ff_all_formats(enum AVMediaType type)
{
return avfilter_make_all_formats(type);
}
-#endif
AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type)
{
@@ -277,7 +275,7 @@ AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type)
for (fmt = 0; fmt < num_formats; fmt++)
if ((type != AVMEDIA_TYPE_VIDEO) ||
(type == AVMEDIA_TYPE_VIDEO && !(av_pix_fmt_descriptors[fmt].flags & PIX_FMT_HWACCEL)))
- avfilter_add_format(&ret, fmt);
+ ff_add_format(&ret, fmt);
return ret;
}
@@ -329,7 +327,7 @@ void ff_channel_layouts_ref(AVFilterChannelLayouts *f, AVFilterChannelLayouts **
FORMATS_REF(f, ref);
}
-void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
+void ff_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
{
FORMATS_REF(f, ref);
}
@@ -365,7 +363,7 @@ do { \
*ref = NULL; \
} while (0)
-void avfilter_formats_unref(AVFilterFormats **ref)
+void ff_formats_unref(AVFilterFormats **ref)
{
FORMATS_UNREF(ref, formats);
}
@@ -394,8 +392,7 @@ void ff_channel_layouts_changeref(AVFilterChannelLayouts **oldref,
FORMATS_CHANGEREF(oldref, newref);
}
-void avfilter_formats_changeref(AVFilterFormats **oldref,
- AVFilterFormats **newref)
+void ff_formats_changeref(AVFilterFormats **oldref, AVFilterFormats **newref)
{
FORMATS_CHANGEREF(oldref, newref);
}
@@ -435,7 +432,7 @@ void ff_set_common_samplerates(AVFilterContext *ctx,
AVFilterFormats *samplerates)
{
SET_COMMON_FORMATS(ctx, samplerates, in_samplerates, out_samplerates,
- avfilter_formats_ref, formats);
+ ff_formats_ref, formats);
}
/**
@@ -443,10 +440,10 @@ void ff_set_common_samplerates(AVFilterContext *ctx,
* formats. If there are no links hooked to this filter, the list of formats is
* freed.
*/
-void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
+void ff_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
{
SET_COMMON_FORMATS(ctx, formats, in_formats, out_formats,
- avfilter_formats_ref, formats);
+ ff_formats_ref, formats);
}
int ff_default_query_formats(AVFilterContext *ctx)
@@ -455,7 +452,7 @@ int ff_default_query_formats(AVFilterContext *ctx)
ctx->outputs && ctx->outputs[0] ? ctx->outputs[0]->type :
AVMEDIA_TYPE_VIDEO;
- avfilter_set_common_formats(ctx, avfilter_all_formats(type));
+ ff_set_common_formats(ctx, ff_all_formats(type));
if (type == AVMEDIA_TYPE_AUDIO) {
ff_set_common_channel_layouts(ctx, ff_all_channel_layouts());
ff_set_common_samplerates(ctx, ff_all_samplerates());
@@ -539,6 +536,39 @@ int avfilter_default_query_formats(AVFilterContext *ctx)
{
return ff_default_query_formats(ctx);
}
+void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
+{
+ ff_set_common_formats(ctx, formats);
+}
+AVFilterFormats *avfilter_make_format_list(const int *fmts)
+{
+ return ff_make_format_list(fmts);
+}
+int avfilter_add_format(AVFilterFormats **avff, int64_t fmt)
+{
+ return ff_add_format(avff, fmt);
+}
+AVFilterFormats *avfilter_all_formats(enum AVMediaType type)
+{
+ return ff_all_formats(type);
+}
+AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b)
+{
+ return ff_merge_formats(a, b);
+}
+void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref)
+{
+ ff_formats_ref(f, ref);
+}
+void avfilter_formats_unref(AVFilterFormats **ref)
+{
+ ff_formats_unref(ref);
+}
+void avfilter_formats_changeref(AVFilterFormats **oldref,
+ AVFilterFormats **newref)
+{
+ ff_formats_changeref(oldref, newref);
+}
#endif
#ifdef TEST