diff options
author | Stefano Sabatini <stefano.sabatini-lala@poste.it> | 2011-09-13 03:46:29 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2011-09-16 02:42:47 +0400 |
commit | 9899037dc6b246f2eeb7e0255c316749372fe1ae (patch) | |
tree | f3aa2650d5fb63f567fd31fe1edabda917480203 /libavfilter/formats.c | |
parent | 98b906e1af789e9bc9930c2d2bfa3d0798405e21 (diff) |
lavfi: rename avfilter_all_* function names to avfilter_make_all_*
A function name should tell what the function does rather than what
the function returns. This also avoids possible conflicts
(e.g. between a function and a public list of all supported formats),
and clarifies the code.
Breaks audio API/ABI, add a backward compatibility layer for video
API/ABI.
Diffstat (limited to 'libavfilter/formats.c')
-rw-r--r-- | libavfilter/formats.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavfilter/formats.c b/libavfilter/formats.c index ef58665a17..0efa1aad77 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -138,8 +138,15 @@ int avfilter_add_format(AVFilterFormats **avff, int64_t fmt) return 0; } +#if FF_API_OLD_ALL_FORMATS_API AVFilterFormats *avfilter_all_formats(enum AVMediaType type) { + return avfilter_make_all_formats(type); +} +#endif + +AVFilterFormats *avfilter_make_all_formats(enum AVMediaType type) +{ AVFilterFormats *ret = NULL; int fmt; int num_formats = type == AVMEDIA_TYPE_VIDEO ? PIX_FMT_NB : @@ -153,7 +160,7 @@ AVFilterFormats *avfilter_all_formats(enum AVMediaType type) return ret; } -AVFilterFormats *avfilter_all_channel_layouts(void) +AVFilterFormats *avfilter_make_all_channel_layouts(void) { static int64_t chlayouts[] = { AV_CH_LAYOUT_MONO, @@ -174,7 +181,7 @@ AVFilterFormats *avfilter_all_channel_layouts(void) return avfilter_make_format64_list(chlayouts); } -AVFilterFormats *avfilter_all_packing_formats(void) +AVFilterFormats *avfilter_make_all_packing_formats(void) { static int packing[] = { AVFILTER_PACKED, |