Nicolas George
aa1246ea42
lavfi: unify src_buffer and buffersrc.
Most of the code is moved to buffersrc.c
to help Git see the similarities.
src_buffer.c still contains the obsolete compatibility functions.
The format change detection code was removed as it has been
implemented directly in ffmpeg.
It can easily be brought back from the history.
13 years ago
Michael Niedermayer
ac87c273a6
src_buffer: propagate errors from copy_buffer_ref()
Fixes a null ptr deref
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
dfa988ee5e
libavfilter: src_buffer: add time_base for audio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
aa69db3abf
libavfilter: src_buffer: fix planar audio
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
664f0aac62
libavfilter: src_buffer, use only aresample, not aconvert.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Michael Niedermayer
13fdb35535
src_buffer: fix query_formats_audio()
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
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
Michael Niedermayer
1ca37e79d0
src_buffer: ifdef->if CONFIG_*
Reviewed-by: Stefano
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Nicolas George
75e0324eab
src_buffer: move code to avoid forward declarations.
13 years ago
Nicolas George
4d4350f47a
src_buffer: update get_nb_failed_requests name.
Implement av_buffersrc_get_nb_failed_requests.
Deprecate av_vsrc_buffer_get_nb_failed_requests.
13 years ago
Nicolas George
675e83bb5c
asrc_abuffer: deprecate av_asrc_buffer_* functions.
13 years ago
Nicolas George
317b2b7e92
lavfi: remove av_buffersrc_buffer.
It is no longer used anywhere.
Furthermore, the header it was declared in was not installed,
so it can not be considered part of the public API.
13 years ago
Nicolas George
7bac2a78c2
src_buffer: implement av_buffersrc_add_frame.
It supersedes av_vsrc_buffer_add_frame and handles
both audio and video.
13 years ago
Nicolas George
a96cd73ff2
src_buffer: implement audio buffer copy.
13 years ago
Clément Bœsch
af58a77f0a
lavfi/src_buffer: fix indent.
13 years ago
Nicolas George
f8d58c594d
src_buffer: merge av_asrc_buffer_add_audio_buffer_ref.
Implement it using av_buffersrc_add_ref.
13 years ago
Nicolas George
be8edff8d1
src_buffer: move audio format change check in a separate function.
13 years ago
Nicolas George
cc14cdec45
src_buffer: move buffer copy in a separate function.
This will make merging with the audio part easier.
13 years ago
Nicolas George
f94b150a03
src_buffer: move format change check in a separate function.
This will make merging the check with the audio part easier.
13 years ago
Nicolas George
3985ec0ee6
src_buffer: introduce av_buffersrc_add_ref().
This function merges the features of
av_vsrc_buffer_add_video_buffer_ref() and
av_buffersrc_buffer().
13 years ago
Nicolas George
f1b82099cd
src_buffer: add forgotten avfilter_unref_buffer.
13 years ago
Nicolas George
2ae5af8094
lavfi: rename vsrc_buffer.c into src_buffer.c.
13 years ago
Nicolas George
7ad0d9864e
lavfi: merge asrc_abuffer into vsrc_buffer.
13 years ago
Nicolas George
2d6522bab0
vsrc_buffer: count the number of failed requests.
13 years ago
Nicolas George
f75ee4031e
vsrc_buffer: return EAGAIN if no frame is available.
This is not an erroneous condition, do not print a warning.
13 years ago
Michael Niedermayer
5cd460ba63
vsrc_buffer: fix null ptr segfault
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
7bf9e3391f
vsrc_buffer: fix check from 7ae7c41
.
The user submitted variable in this function is frame, not buf.
13 years ago
Anton Khirnov
7ae7c41413
vsrc_buffer: allow using a NULL buffer to signal EOF.
13 years ago
Michael Niedermayer
25eae29ea1
vsrc_buffer: remove overwrite support.
the overwrite flag became unused when merging support for buffering
multiple frames.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
a03f8ea0a8
vsrc_buffer: when no frame is available, return an error instead of segfaulting.
13 years ago
Anton Khirnov
95587d29d7
vsrc_buffer: allow buffering arbitrary number of frames.
13 years ago
Michael Niedermayer
2d54bbb950
vsrc_buffer: Store allocated scale filter and free it later.
Fixes a memleak.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Anton Khirnov
43fe6a2905
vsrc_buffer: release the buffer on uninit.
13 years ago
Anton Khirnov
5d25140f71
vsrc_buffer: error on changing frame parameters.
13 years ago
Diego Biurrun
3dc99a18d4
cosmetics: drop some pointless parentheses
13 years ago
Anton Khirnov
e1d9dbf2d4
lavfi: add a new function av_buffersrc_buffer().
It can be used to directly pass a AVFilterBufferRef to lavfi, avoiding a
memcpy.
13 years ago
Stefano Sabatini
1c9e340d35
lavfi: add avfilter_copy_frame_props()
avfilter_copy_frame_props() avoids code duplication and increases
robustness.
14 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
Michael Niedermayer
2982b02b79
vsrc_buffer: FIx incompatible pointer type warning
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
13 years ago
Stefano Sabatini
e26782a9b4
lavfi: add ff_parse_pixel_format() internal function, and use it
Reduce code duplication.
13 years ago
Mina Nagy Zaki
fd2c0a5db2
lavfi: add layout negotiation fields and helper functions.
14 years ago
Stefano Sabatini
27bcf55f45
vsrc_buffer: add flags param to av_vsrc_buffer_add_video_buffer_ref
The new flags parameter allows to specify if the video ref to add
should overwrite the cache, if the flag is not set vsrc_buffer will
complain and abort; otherwise it will clean the already cached video
ref before to overwrite it, thus avoiding a leak.
14 years ago
Stefano Sabatini
9e66b64c36
vsrc_buffer: propagate error code in av_vsrc_buffer_add_frame()
Propagate av_vsrc_buffer_add_video_buffer_ref() error code rather than
return 0.
14 years ago
Stefano Sabatini
cf06e3e4dd
vsrc_buffer: return an error code if no frames are available
Also decrease the log level of the corresponding message to WARNING,
since the error is not fatal.
14 years ago
Stefano Sabatini
f7053dc41a
vsrc_buffer: tweak error message in init()
Change:
Expected 7 arguments, but only %d found in '%s'\n
to:
Expected 7 arguments, but %d found in '%s'\n
as the user may provide more than 7 arguments, in that case the error
is not misleading.
Signed-off-by: Anton Khirnov <anton@khirnov.net>
14 years ago
Stefano Sabatini
c000a9f783
vsrc_buffer: add av_vsrc_buffer_add_frame()
The new function is a wrapper around
av_vsrc_buffer_add_video_buffer_ref(), and allows to simplify the act
of pushing AVFrame data to the source buffer.
14 years ago
Stefano Sabatini
50764e19a8
vsrc_buffer: make the source accept sws_param in init
Avoid the need of two distinct av_vsrc_add_video_buffer_ref*
functions. Simplify the interface.
14 years ago
Stefano Sabatini
509b32cf5d
vsrc_buffer: propagate avfilter_open() error code
14 years ago