Michael Niedermayer
21d8a80e30
af_aresample: use new swr API to pass and compensate PTS
This code is not only much more powerfull its also simpler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
087d09b6d5
af_aresample: allocate a larger buffer so accumulated data can be returned quicker
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e17a039647
af_aresample: use extended_data
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
96ac8663de
af_aresample: Consider the swresample delay during calculating timestamps.
The difference from this should be pretty small.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
6ba692f8a7
af_aresample: fix rounding that led to sample accumulation in the buffers.
This fixes a regression that apparently was missed when switching to the
in af resampler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
db6ef054f5
af_aresample: 10l fix, wrong timebase for next_pts.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
847943bc51
aresample: add code to flush the internal swr buffer.
Inspired-by code from af_resample.c written by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b3e1b95afa
aresample: check return code of swr_convert()
Issue found by comparing af_resample.c and af_aresample.c
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
b13d39bd81
av_aresample: Allow changing sample format and channel layout as well
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
e3c6b61263
af_aresample: support all swresample parameters.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
47c2e52bc6
af_aresample: fix typo in query formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
efdc895fbd
lavfi: fix pts rescaling in the resampler
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
75492cce8e
lavfi: fix resample with differing formats
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Clément Bœsch
4522df52aa
lavfi: remove audio.h include from avfilter.h.
avfilter.h is a public header and the unexported audio.h header contains
only internal prototypes.
13 years ago
Robert Nagy
ed66bbfcb9
lavfi/aresample: properly propagate pts == AV_NOPTS_VALUE;
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
13 years ago
Clément Bœsch
e96be8409f
lavfi/aresample: use libswresample.
13 years ago
Reimar Döffinger
5af7daabc4
Mark AVFilterPad[] compound literals as const.
GCC 4.6.2 at least still seems to fail to put them in .rodata though,
see also http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37303
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago
Stefano Sabatini
22137bb5c2
af_aresample: fix properties setting in the output buffer
In particular: set output timebase to 1/output_sample_rate, fix output
PTS computation, and do not forget to copy properties values from the
input buffer.
13 years ago
Stefano Sabatini
db79d04173
af_aresample: do not request a buffer with AV_PERM_REUSE2 permissions in filter_samples()
That was pointless. Simplify.
13 years ago
Stefano Sabatini
9899037dc6
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.
13 years ago
Stefano Sabatini
2c0317419b
lavfi: simplify signature for avfilter_get_audio_buffer() and friends
The additional parameters were never used and are complicating the
function interface. Also, they were inconsistent with the way the
video API works.
So this assumes that a requested samples buffer will have *always* the
format specified in the requested link.
This breaks audio filtering API and ABI.
13 years ago
Mina Nagy Zaki
3a9e227fb1
lavfi: add aresample filter
Based on a patch by Stefano.
Signed-off-by: Stefano Sabatini <stefano.sabatini-lala@poste.it>
13 years ago