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
37#include <libavfilter/buffersink.h>37#include <libavfilter/buffersink.h>
38#include <libavfilter/buffersrc.h>38#include <libavfilter/buffersrc.h>
39 39
40const char *filter_descr = "aresample=8000,aconvert=s16:mono";40const char *filter_descr = "aresample=8000,aformat=sample_fmts=s16:channel_layouts=mono";
41const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";41const char *player = "ffplay -f s16le -ar 8000 -ac 1 -";
42 42
43static AVFormatContext *fmt_ctx;43static AVFormatContext *fmt_ctx;
doc/faq.texi+3−3
@@ -393,17 +393,17 @@ Appending @code{:v} to it will do exactly that. · 392 unmodified lines
393Use @option{-dumpgraph -} to find out exactly where the channel layout is393Use @option{-dumpgraph -} to find out exactly where the channel layout is
394lost.394lost.
395 395
396Most likely, it is through @code{auto-inserted aconvert}. Try to understand396Most likely, it is through @code{auto-inserted aresample}. Try to understand
397why the converting filter was needed at that place.397why the converting filter was needed at that place.
398 398
399Just before the output is a likely place, as @option{-f lavfi} currently399Just before the output is a likely place, as @option{-f lavfi} currently
400only support packed S16.400only support packed S16.
401 401
402Then insert the correct @code{aconvert} explicitly in the filtergraph,402Then insert the correct @code{aformat} explicitly in the filtergraph,
403specifying the exact format.403specifying the exact format.
404 404
405@example405@example
406aconvert=s16:stereo:packed406aformat=sample_fmts=s16:channel_layouts=stereo
407@end example407@end example
408 408
409@section Why does FFmpeg not see the subtitles in my VOB file?409@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
283 283
284Convert the input audio format to the specified formats.284Convert the input audio format to the specified formats.
285 285
286@emph{This filter is deprecated. Use @ref{aformat} instead.}
287
286The filter accepts a string of the form:288The filter accepts a string of the form:
287"@var{sample_format}:@var{channel_layout}".289"@var{sample_format}:@var{channel_layout}".
288 290
libavfilter/af_aconvert.c+2−0
@@ -45,6 +45,8 @@ static av_cold int init(AVFilterContext *ctx, const char *args0) · 44 unmodified lines
45 int ret = 0;45 int ret = 0;
46 char *args = av_strdup(args0);46 char *args = av_strdup(args0);
47 47
48 av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat instead\n");
49
48 aconvert->out_sample_fmt = AV_SAMPLE_FMT_NONE;50 aconvert->out_sample_fmt = AV_SAMPLE_FMT_NONE;
49 aconvert->out_chlayout = 0;51 aconvert->out_chlayout = 0;
50 52
libavfilter/allfilters.c+2−0
@@ -45,7 +45,9 @@ void avfilter_register_all(void) · 44 unmodified lines
45 return;45 return;
46 initialized = 1;46 initialized = 1;
47 47
48#if FF_API_ACONVERT_FILTER
48 REGISTER_FILTER(ACONVERT, aconvert, af);49 REGISTER_FILTER(ACONVERT, aconvert, af);
50#endif
49 REGISTER_FILTER(AFADE, afade, af);51 REGISTER_FILTER(AFADE, afade, af);
50 REGISTER_FILTER(AFORMAT, aformat, af);52 REGISTER_FILTER(AFORMAT, aformat, af);
51 REGISTER_FILTER(ALLPASS, allpass, af);53 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
675// TODO: drop me675// TODO: drop me
676static const char *const filters_left_to_update[] = {676static const char *const filters_left_to_update[] = {
677 "abuffer",677 "abuffer",
678#if FF_API_ACONVERT_FILTER
678 "aconvert",679 "aconvert",
680#endif
679 "atempo",681 "atempo",
680 "buffer",682 "buffer",
681 "mp",683 "mp",
libavfilter/avfiltergraph.h+1−1
@@ -98,7 +98,7 @@ int avfilter_graph_create_filter(AVFilterContext **filt_ctx, AVFilter *filt, · 97 unmodified lines
98 * Enable or disable automatic format conversion inside the graph.98 * Enable or disable automatic format conversion inside the graph.
99 *99 *
100 * Note that format conversion can still happen inside explicitly inserted100 * Note that format conversion can still happen inside explicitly inserted
101 * scale and aconvert filters.101 * scale and aresample filters.
102 *102 *
103 * @param flags any of the AVFILTER_AUTO_CONVERT_* constants103 * @param flags any of the AVFILTER_AUTO_CONVERT_* constants
104 */104 */
libavfilter/version.h+3−0
@@ -66,5 +66,8 @@ · 65 unmodified lines
66#ifndef FF_API_OLD_FILTER_OPTS66#ifndef FF_API_OLD_FILTER_OPTS
67#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 4)67#define FF_API_OLD_FILTER_OPTS (LIBAVFILTER_VERSION_MAJOR < 4)
68#endif68#endif
69#ifndef FF_API_ACONVERT_FILTER
70#define FF_API_ACONVERT_FILTER (LIBAVFILTER_VERSION_MAJOR < 4)
71#endif
69 72
70#endif /* AVFILTER_VERSION_H */73#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