Matthieu Bouron
e1f4971209
lavfi: use an audio frame pool for each link of the filtergraph
8 years ago
Clément Bœsch
58672347cb
lavfi: remove 2 unused lavc includes
8 years ago
Andreas Cadhalpun
e6c20e214e
avfilter: add missing FF_API_AVFILTERBUFFER guards
...
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Vittorio Giovara
f6974fe651
lavfi: Drop deprecated AVFilterBuffer* code
...
Deprecated in 11/2012.
9 years ago
Andreas Cadhalpun
095347ffe4
disable deprecation warnings in deprecated code
...
Reviewed-by: wm4 <nfxjfg@googlemail.com>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
9 years ago
Michael Niedermayer
00948ff876
avfilter/audio: use av_mallocz_array()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Anton Khirnov
c9c7bc4493
lavfi: switch ff_default_get_audio_buffer() to av_frame_get_buffer()
...
This simplifies the code and avoids using libavcodec-specific
avcodec_fill_audio_frame().
12 years ago
Michael Niedermayer
f963c77856
avfilter: avoid direct access to "frame"->channels
...
This avoids ABI issues
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
7e350379f8
lavfi: switch to AVFrame.
...
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
12 years ago
Nicolas George
b6afb2dde1
lavfi: support unknown channel layouts.
12 years ago
Nicolas George
82541d8330
lavfi: merge all filtering code into ff_filter_frame.
12 years ago
Nicolas George
2eb2e1798e
lavfi: add avfilter_get_audio_buffer_ref_from_arrays_channels.
...
It is the same as avfilter_get_audio_buffer_ref_from_arrays
except it has a "channels" and the channel layout can be 0.
12 years ago
Nicolas George
34de47aa35
lavfi: add an accessor for ref->audio->channels.
12 years ago
Nicolas George
238edd2fe3
lavfi: add a channels field to AVFilterLink.
...
Also: fix af_pan and af_aresample, that forgot to update
audio->channels.
12 years ago
Michael Niedermayer
3ed483cdfa
libavfilter: Support using filter_frame for video
...
With this we can mix filters using filter_frame OR start/draw_slice/end
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
a0b8eec719
default_filter_frame: fix argument name
...
Based on code by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
cd7febd33f
lavfi: replace filter_samples by filter_frame
...
Based on patch by Anton Khirnov
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Anton Khirnov
565e4993c6
lavfi: merge start_frame/draw_slice/end_frame
...
Any alleged performance benefits gained from the split are purely
mythological and do not justify added code complexity.
12 years ago
Justin Ruggles
a903f8f087
Include libavutil/channel_layout.h instead of libavutil/audioconvert.h
...
Also reorder some other #include when applicable.
12 years ago
Nicolas George
8ad54a44eb
lavfi: check that buffer and link properties match.
12 years ago
Nicolas George
c262ddb8c5
lavfi: set sample_rate in the default allocator.
12 years ago
Nicolas George
beeba9161a
lavfi: add a closed field to AVFilerLink.
...
It will help forward errors and maintain consistency.
12 years ago
Nicolas George
e54e30c889
lavfi: grant all permissions on mallocated audio buffers.
...
The permissions not requested by the filter that created
the buffer may be useful for a later filter and avoid a copy.
12 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
12 years ago
Nicolas George
271ddb116c
lavfi: use min_perms and rej_perms for out pads.
...
There are several reasons for doing that:
1. It documents the code for the reader and helps find
inconsistencies and bugs.
2. For rej_perms, it guarantees the change will be done
even if the output reference can be created by several
code paths.
3. It can be used to predict cases where a copy will,
or will not happen and optimize buffer allocation
(for example not request a rare direct-rendering buffer
from a device sink if it will be copied anyway).
Note that a filter is still allowed to manage the permissions
on its own without using these fields.
12 years ago
Reinhard Tartler
800750417f
lavfi: properly signal out-of-memory error in ff_filter_samples
...
Found with a clang-scan report on http://fate.libav.org/csa/
12 years ago
Anton Khirnov
cd99146253
lavfi: add error handling to filter_samples().
13 years ago
Nicolas George
0689d5e17a
lavfi: implement samples framing on links.
...
Links can be set up to group samples into buffers of
specified minimum and maximum size.
13 years ago
Anton Khirnov
fa06623930
lavfi/audio: eliminate ff_default_filter_samples().
...
It currently does the following:
1) get a zeroed audio buffer
2) copy some properties (but not the data) of the input buffer to it
3) pass this buffer to the output filter
This looks useless and is indeed not used by any filters, therefore
delete it.
Make ff_null_filter_samples() (just pass the buffer to the next filter)
the new default.
13 years ago
Stefano Sabatini
c0b3c0ffb7
lavfi/audio: remove unused variable in ff_filter_samples()
...
Fix warning:
libavfilter/audio.c: In function ‘ff_filter_samples’:
libavfilter/audio.c:193:13: warning: unused variable ‘size’ [-Wunused-variable]
13 years ago
Anton Khirnov
e026c9b390
lavfi/audio: don't set cur_buf in ff_filter_samples().
...
It's redundant, since the input buffer is passed as a parameter to the
filter_samples() callback, and can lead to stale pointers remaining on
the link.
13 years ago
Anton Khirnov
9cdf74f904
lavfi/audio: use av_samples_copy() instead of custom code.
...
Fixes a possible invalid write, found by Nicolas George.
13 years ago
Anton Khirnov
9baeff9506
lavfi: replace AVFilterContext.input/output_count with nb_inputs/outputs
...
This is more consistent with naming in the rest of Libav.
13 years ago
Stefano Sabatini
134815a030
lavfi: change name of tracing functions and of the macro which enables them
...
The enabling symbol is renamed FF_AVFILTER_TRACE. Avoid conflicts with
the DEBUG macro, which may be defined for different purposes.
13 years ago
Nicolas George
9915a33fc2
lavfi/audio: fix size of copied samples.
...
Fixes sporadic segfaults with some filters.
13 years ago
Anton Khirnov
7b3b24a8ee
lavfi: initialize pts to AV_NOPTS_VALUE when creating new buffer refs.
13 years ago
Stefano Sabatini
4d4098da00
lavfi: drop planar/packed negotiation support
...
The planar/packed switch and the packing_formats list is no longer
required, since the planar/packed information is now stored in the sample
format enum.
This is technically a major API break, possibly it should be not too
painful as we marked the audio filtering API as unstable.
13 years ago
Michael Niedermayer
47aae2bc2e
lavfi: switch to _alt functions
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
0b45334a58
lavfi: move audio-related functions to a separate file.
...
This is easier to follow than having them randomly scattered in
avfilter.c and defaults.c.
13 years ago