Paul B Mahol
ed93ed5ee3
avfilter: don't anonymously typedef structs
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
3d55e4883c
avfilter/aeval: remove comment that was left from some other file
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
c02921417b
avfilter/aeval: free input frame on error
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Paul B Mahol
dbc7f02a72
avfilter/aeval: trim last frame's number of samples to match requested duration
...
Fixes #6181 .
Signed-off-by: Paul B Mahol <onemda@gmail.com>
8 years ago
Ganesh Ajjanagadde
6aaac24d72
avfilter/all: propagate errors of functions from avfilter/formats
...
Many of the functions from avfilter/formats can return errors, usually AVERROR(ENOMEM).
This propagates the return values.
All of these were found by using av_warn_unused_result, demonstrating its utility.
Tested with FATE. I am least sure of the changes to avfilter/filtergraph,
since I don't know what/how reduce_format is intended to behave and how it should
react to errors.
Fixes: CID 1325680, 1325679, 1325678.
Reviewed-by: Michael Niedermayer <michael@niedermayer.cc>
Previous version Reviewed-by: Nicolas George <george@nsup.org>
Previous version Reviewed-by: Clément Bœsch <u@pkh.me>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde@gmail.com>
9 years ago
Paul B Mahol
a0854c084e
avfilter: handle error in query_formats() in bunch of filters
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
10 years ago
Ole Andre Birkedal
c8372f8001
avfilter/aeval: Fixed a memory leak in EvalContext::channel_values
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
10 years ago
Michael Niedermayer
efbf107f5b
avfilter/aeval: silence "may be used uninitialized" warning
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Michael Niedermayer
0fe6906d96
avfilter/aeval: Fix use of uninitialized variable
...
Fixes CID1135776
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
11 years ago
Stefano Sabatini
8f1edc73a8
lavfi: rename asrc_aevalsrc.c to aeval.c
...
The file now contains both source and filter, the new name looks more
appropriate.
11 years ago
Stefano Sabatini
e424abc3a0
lavfi: add aeval filter
11 years ago
Stefano Sabatini
405b3eb535
lavfi/aevalsrc: duplicate last expression for the missing channels
...
Use last expression for the missing channel expressions in case the
channel layout was specified. Enhance flexibility.
11 years ago
Stefano Sabatini
98786aa2f0
lavfi/aevalsrc: initialize pointer to expression to NULL
...
Fix crash in case of expression parsing failure.
11 years ago
Nicolas George
6e2473edfd
lavfi: parsing helper for unknown channel layouts.
...
Make ff_parse_channel_layout() accept unknown layouts too.
11 years ago
Paul B Mahol
b890198b66
avfilter: add av_cold to init()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Paul B Mahol
b211607b5c
avfilter: various cosmetics
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
11 years ago
Michael Niedermayer
aac57c765f
avfilter/asrc_aevalsrc: fix cases of unknown channel layout
...
Fixes >8 channels
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Paul B Mahol
937cfebd72
lavfi/aevalsrc: remove hard limit on number of channels
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
db4e191d88
lavfi/aevalsrc: do not free AVOption variables in uninit()
...
The generic code frees them already.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Paul B Mahol
badbd2414d
lavfi/aevalsrc: use AV_OPT_TYPE_DURATION
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
f4341c64be
avfilter: add av_cold to uninit()
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
3d7d819aad
avfilter/asrc_aevalsrc: fix return code, 2nd try
...
Found-by: ubitux
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
fd6228e657
lavfi: remove now unused args parameter from AVFilter.init and init_opaque
...
This is mostly automated global search and replace
The deprecated aconvert filter is disabled, if it still has users
it should be updated
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Michael Niedermayer
491d261ade
avfilter/asrc_aevalsrc: check correct variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Clément Bœsch
64ce15b9f4
lavfi/aevalsrc: switch to an AVOptions-based system.
12 years ago
Paul B Mahol
ed8373e7db
lavfi: always check return value of ff_get_{audio,video}_buffer()
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Clément Bœsch
44f3d21799
lavfi/aevalsrc: raise filter_frame() error.
12 years ago
Matthieu Bouron
f9eed5d7e6
lavfi/aevalsrc: try to honor specified duration
...
If nb_samples divide sample_rate and if nb_samples allow it, aevalsrc
should generate the exact amount of samples according to duration.
Example:
aevalsrc=0::n=480:s=48000:d=5.21 should generate 250080 samples.
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
12 years ago
Paul B Mahol
185d1f3bfc
lavfi: declare arrays that never change as static const
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Clément Bœsch
2d9d444051
lavfi: convert remaining input/output list compound literals to named objects.
...
This is following 568c70e79e
.
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
Paul B Mahol
1acd2f6ba7
Replace rest of libavutil/audioconvert.h with libavutil/channel_layout.h
...
Also remove it in once case when it is not needed.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
12 years ago
Michael Niedermayer
989c91b504
asrc_aevalsrc: Fix use of uninitialized pointer inside av_strtok()
...
Fixes CID733842
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
42d621d131
lavfi: add priv class to filter definitions and flags to filter internal options
...
This allows the iteration callbacks to discover the internal class and
options, and show them when required.
12 years ago
Stefano Sabatini
fda968aa8f
lavfi: decrease logging level of message showing initial parameters
...
Reduce log clutter, consistent with 1a49a169eb
.
13 years ago
Stefano Sabatini
c17808cebd
lavfi: define macro AVFILTER_DEFINE_CLASS
...
The macro can be used to define consistently the internal class of a
filter, save some typing and factorize.
13 years ago
Paul B Mahol
54101214d8
lavfi: use designated initializers for AVClass
...
While here:
- add missing .version and .category,
- make .class_name consistent across filters,
- align declarations.
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Paul B Mahol
c9e183b490
lavfi: update some deprecated functions
...
Signed-off-by: Paul B Mahol <onemda@gmail.com>
13 years ago
Stefano Sabatini
0f0f3bd1e0
lavfi: use av_default_item_name() as filter private context logger
...
avfilter_default_filter_name() is supposed to access an AVFilterContext
struct, if used with a private struct it will cause a crash since it will
access fields which are non defined in the private struct.
13 years ago
Stefano Sabatini
4d6a8a2bdb
lavfi: add avfilter_default_filter_name()
...
The function is modelled after av_default_item_name(), and will print the
name of the instance filter if defined, otherwise the name of the filter.
This allows to show the instance name in the log, which is useful when
debugging complex filter graphs.
13 years ago
Stefano Sabatini
17d4233c9c
lavfi/aevalsrc: reindent after the previous commit
13 years ago
Stefano Sabatini
e1a8df70a2
lavfi/aevalsrc: add option channel_layout
...
Allow to explicitly specify the channel layout to select.
13 years ago
Stefano Sabatini
cfde7395b1
lavfi/aevalsrc: remove limitation on the number of channels
13 years ago
Stefano Sabatini
e556121ec1
lavfi/aevalsrc: correct the supported sample format
...
The source supports *planar* double, fix regression introduced by me in
4d4098da
.
13 years ago
Stefano Sabatini
986d2f6ec0
lavfi/aevalsrc: fix sample rate negotiation, after the last merge
...
Fix crash.
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
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
Stefano Sabatini
6c26fe8b5a
aevalsrc: add duration option
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
Reimar Döffinger
d78473334e
Add const to static arrays where it was forgotten.
...
Signed-off-by: Reimar Döffinger <Reimar.Doeffinger@gmx.de>
13 years ago