History

lavfi: deprecate aconvert.

This filter is not required anymore with aformat. Drop it at next bump.

Clément Bœsch committed 13 years ago

Commit 9ab221f1 parent 71ef1ec8 files · +16 −5Browse files

Unified · Split

8 files
  1. doc/examples/filtering_audio.c +1 −1
  2. doc/faq.texi +3 −3
  3. doc/filters.texi +2 −0
  4. libavfilter/af_aconvert.c +2 −0
  5. libavfilter/allfilters.c +2 −0
  6. libavfilter/avfilter.c +2 −0
  7. libavfilter/avfiltergraph.h +1 −1
  8. libavfilter/version.h +3 −0
doc/examples/filtering_audio.c+1−1
@@ -37,7 +37,7 @@ · 36 unmodified lines
3737 #include <libavfilter/buffersink.h>
3838 #include <libavfilter/buffersrc.h>
3939
40−const char *filter_descr = "aresample=8000,aconvert=s16:mono";
40+const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono";
4141 const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
4242
4343 static AVFormatContext *fmt_ctx;
doc/faq.texi+3−3
@@ -393,17 +393,17 @@ Appending @code{:v} to it will do exactly that. · 392 unmodified lines
393393 Use @option{-dumpgraph -} to find out exactly where the channel layout is
394394 lost.
395395
396−Most likely, it is through @code{auto-inserted aconvert}. Try to understand
396+Most likely, it is through @code{auto-inserted aresample}. Try to understand
397397 why the converting filter was needed at that place.
398398
399399 Just before the output is a likely place, as @option{-f lavfi} currently
400400 only support packed S16.
401401
402−Then insert the correct @code{aconvert} explicitly in the filtergraph,
402+Then insert the correct @code{aformat} explicitly in the filtergraph,
403403 specifying the exact format.
404404
405405 @example
406−aconvert=s16:stereo:packed
406+aformat=sample_fmts=s16:channel_layouts=stereo
407407 @end example
408408
409409 @section Why does FFmpeg not see the subtitles in my VOB file?
doc/filters.texi+2−0
@@ -283,6 +283,8 @@ Below is a description of the currently available audio filters. · 282 unmodified lines
283283
284284 Convert the input audio format to the specified formats.
285285
286+@emph{This filter is deprecated. Use @ref{aformat} instead.}
287+
286288 The filter accepts a string of the form:
287289 "@var{sample_format}:@var{channel_layout}".
288290
libavfilter/af_aconvert.c+2−0
@@ -45,6 +45,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args0) · 44 unmodified lines
4545 int ret = 0;
4646 char *args = av_strdup(args0);
4747
48+ av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat instead\n");
49+
4850 aconvert->out_sample_fmt = AV_SAMPLE_FMT_NONE;
4951 aconvert->out_chlayout = 0;
5052
libavfilter/allfilters.c+2−0
@@ -45,7 +45,9 @@ void avfilter_register_all(void) · 44 unmodified lines
4545 return;
4646 initialized = 1;
4747
48+#if FF_API_ACONVERT_FILTER
4849 REGISTER_FILTER(ACONVERT, aconvert, af);
50+#endif
4951 REGISTER_FILTER(AFADE, afade, af);
5052 REGISTER_FILTER(AFORMAT, aformat, af);
5153 REGISTER_FILTER(ALLPASS, allpass, af);
libavfilter/avfilter.c+2−0
@@ -675,7 +675,9 @@ static int process_options(AVFilterContext *ctx, AVDictionary **options, · 674 unmodified lines
675675 // TODO: drop me
676676 static const char *const filters_left_to_update[] = {
677677 "abuffer",
678+#if FF_API_ACONVERT_FILTER
678679 "aconvert",
680+#endif
679681 "atempo",
680682 "buffer",
681683 "mp",
libavfilter/avfiltergraph.h+1−1
@@ -98,7 +98,7 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, · 97 unmodified lines
9898 * Enable or disable automatic format conversion inside the graph.
9999 *
100100 * Note that format conversion can still happen inside explicitly inserted
101− * scale and aconvert filters.
101+ * scale and aresample filters.
102102 *
103103 * @param flags any of the AVFILTER_AUTO_CONVERT_* constants
104104 */
libavfilter/version.h+3−0
@@ -66,5 +66,8 @@ · 65 unmodified lines
6666 #ifndef FF_API_OLD_FILTER_OPTS
6767 #define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 4)
6868 #endif
69+#ifndef FF_API_ACONVERT_FILTER
70+#define FF_API_ACONVERT_FILTER (LIBAVFILTER_VERSION_MAJOR < 4)
71+#endif
6972
7073 #endif /* AVFILTER_VERSION_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t