Nicolas George
69d67fb622
lavfi: reindent after last commit.
12 years ago
Nicolas George
79d8cfacf0
lavfi: loop on request_frame if necessary.
...
Some filters need several input frames before producing output.
For these filter, it becomes simpler to return 0 in
request_frame() and let the framework call it again until
output has been produced.
12 years ago
Nicolas George
befbcc374d
lavfi: add common code to handle options parsing.
12 years ago
Anton Khirnov
556aab8f11
lavfi: use designated initializers in avfilter_class
12 years ago
Clément Bœsch
df5be5e275
lavfi/avfilter: raise filter_frame() error.
12 years ago
Michael Niedermayer
212b89f8b4
avfilter: remove unused variable
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
Michael Niedermayer
3c14c82b7e
avfilter: Silence warning: passing argument 3 of av_image_copy from incompatible pointer type
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Stefano Sabatini
e47114d545
lavfi: increment max number of registered filters from 128 to 256
...
The total number of implemented filters is already over 128.
12 years ago
Xi Wang
eb553096e5
lavfi: fix null checking in avfilter_config_links()
...
Move the first use of `link' after the null pointer check.
Signed-off-by: Xi Wang <xi.wang@gmail.com>
Reviewed-by: Stefano Sabatini <stefasab@gmail.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
ff6b34009d
lavfi: fix use-after-free in ff_filter_frame.
...
Unlike the original ff_start_frame code, the incoming reference
may be freed before that point.
Fix CID966654.
12 years ago
Nicolas George
82541d8330
lavfi: merge all filtering code into ff_filter_frame.
12 years ago
Michael Niedermayer
c0c0b19644
lavfi: remove some draw_slice related code that has become unneeded
...
Reviewed-by: Nicolas George <nicolas.george@normalesup.org>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
12 years ago
Nicolas George
0146c1f0f1
lavfi: remove init and check of rate and layout.
...
The sample rate and channel layout are negotiated and set
by the filter graph system.
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
f6dd145533
avfilter: check that filter_frame and slice variants are not both used
...
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
Anton Khirnov
59ee9f78b0
lavfi: do not use av_pix_fmt_descriptors directly.
13 years ago
Anton Khirnov
716d413c13
Replace PIX_FMT_* -> AV_PIX_FMT_*, PixelFormat -> AVPixelFormat
13 years ago
Mans Rullgard
1fce361d70
lavfi: replace empty input/output lists with null pointers
...
Signed-off-by: Mans Rullgard <mans@mansr.com>
13 years ago
Stefano Sabatini
34bf06a35c
lavfi: when configuring a link, set channel layout from previous link if unspecified
...
In avfilter_config_links(), if the current channel layout is not
specified, set the same value of the previous link in the filterchain.
Consistent with the logic used to set the other link parameters.
13 years ago
Nicolas George
c2271fa7f9
lavfi: free partial audio buffers when destroying links.
...
Fix a memleak that the recent change of architecture made
more likely to happen.
13 years ago
Nicolas George
beeba9161a
lavfi: add a closed field to AVFilerLink.
...
It will help forward errors and maintain consistency.
13 years ago
Martin Storsjö
1d9c2dc89a
Don't include common.h from avutil.h
...
Signed-off-by: Martin Storsjö <martin@martin.st>
13 years ago
Stefano Sabatini
5c0d8bc4ce
lavfi: add avfilter_get_class() and iteration callbacks
...
Allow iteration over filter options.
13 years ago
Diego Biurrun
49c45a2624
avfilter: Fix printf format string conversion specifier
...
libavfilter/avfilter.c:224:9: warning: format ‘%ld’ expects argument of type ‘long int’, but argument 5 has type ‘int’ [-Wformat]
13 years ago
Nicolas George
d06bfda07e
lavfi: rescale link->current_pts.
...
The doxy says, and the heap implementations assumes,
it is in AV_TIME_BASE units.
13 years ago
Stefano Sabatini
21d5609826
lavfi: add init_opaque callback
...
This will be used by filters which require an opaque field to be passed
in input. Should be required only for filters which imply a programmatic
use.
This is possibly a temporary solution, to be removed when we'll have a
clearer and better agreememnt of how/if to pass binary data for
initializing a filter.
See thread:
Subject: [FFmpeg-devel][PATCH] lavfi: add init2 callback
Date: Fri, 6 Jul 2012 01:22:17 +0200
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
1a49a169eb
lavfi: make filters less verbose.
13 years ago
Anton Khirnov
1961e46c15
lavfi: remove disabled FF_API_FILTERS_PUBLIC cruft
13 years ago
Anton Khirnov
5e88b96f37
lavfi: remove disabled FF_API_DEFAULT_CONFIG_OUTPUT_LINK cruft
13 years ago
Anton Khirnov
205e90249a
lavfi: use proper FF_API guards for different deprecated functions
13 years ago
Anton Khirnov
a5e8c41c28
lavfi: remove 'opaque' parameter from AVFilter.init()
...
It is not used in any filters currently and is inherently evil. If
passing binary data to filters is required in the future, it should be
done with some AVOptions-based system.
13 years ago
Nicolas George
bd9939f495
lavfi: display pad type with mismatch error message.
13 years ago
Michael Niedermayer
0412e5187e
lavfi/avfilter: use av_assert
...
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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
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
Anton Khirnov
84b9fbe055
lavfi: add avfilter_pad_get_type() and avfilter_pad_get_name().
...
This will allow making AVFilterPad opaque for the calling apps, since
those are the only two fields that can be useful to the users.
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
Alex Converse
65a80ee1ec
avfilter: Log an error if avfilter fails to configure a link.
13 years ago
Stefano Sabatini
ee1748ab53
lavfi: fix signature for default_filter_name()
...
Return a const char *, fix warnings:
libavfilter/avfilter.c: In function ‘default_filter_name’:
libavfilter/avfilter.c:414:5: warning: return discards ‘const’ qualifier from pointer target type [enabled by default]
libavfilter/avfilter.c: At top level:
libavfilter/avfilter.c:419:5: warning: initialization from incompatible pointer type [enabled by default]
libavfilter/avfilter.c:419:5: warning: (near initialization for ‘avfilter_class.item_name’) [enabled by default]
13 years ago
Nicolas George
7b42036b3b
lavfi: add a frame_rate field to AVFilterLink.
13 years ago
Stefano Sabatini
ad347bf459
lavfi: remove avfilter_default_item_name() from public API
...
The function was introduced in 4d6a8a2bdb
and is not used anymore
outside avfilter.c.
This avoids to pollute the public API with an apparently unnecessary
function. The function was introduced a few days ago, so removing it from
the public API should do no much harm.
13 years ago
Stefano Sabatini
1488c4dc0b
lavfi: move tracing utilities definition from video.c to avfilter.c
...
These utilities are meant to be defined in avfilter.c, since they are
generic and thus contain both audio and video code.
13 years ago
Anton Khirnov
803391f719
lavfi: remove request/poll and drawing functions from public API on next bump
...
They are only useful inside filters and we don't allow user filters for
now.
13 years ago