Commit 8e1f063e authored by Nicolas George's avatar Nicolas George

lavfi: enable buffersinks unconditionally.

They are part of the public API. Their libav compatibility
counterpart are already enabled unconditionally.
parent e760424d
......@@ -36,6 +36,7 @@ OBJS = allfilters.o \
formats.o \
graphdump.o \
graphparser.o \
sink_buffer.o \
src_buffer.o \
transform.o \
vf_scale.o \
......@@ -76,8 +77,6 @@ OBJS-$(CONFIG_AEVALSRC_FILTER) += asrc_aevalsrc.o
OBJS-$(CONFIG_ANULLSRC_FILTER) += asrc_anullsrc.o
OBJS-$(CONFIG_FLITE_FILTER) += asrc_flite.o
OBJS-$(CONFIG_ABUFFERSINK_FILTER) += sink_buffer.o
OBJS-$(CONFIG_FFABUFFERSINK_FILTER) += sink_buffer.o
OBJS-$(CONFIG_ANULLSINK_FILTER) += asink_anullsink.o
OBJS-$(CONFIG_ASS_FILTER) += vf_ass.o
......@@ -154,8 +153,6 @@ OBJS-$(CONFIG_RGBTESTSRC_FILTER) += vsrc_testsrc.o
OBJS-$(CONFIG_SMPTEBARS_FILTER) += vsrc_testsrc.o
OBJS-$(CONFIG_TESTSRC_FILTER) += vsrc_testsrc.o
OBJS-$(CONFIG_BUFFERSINK_FILTER) += sink_buffer.o
OBJS-$(CONFIG_FFBUFFERSINK_FILTER) += sink_buffer.o
OBJS-$(CONFIG_NULLSINK_FILTER) += vsink_nullsink.o
OBJS-$(CONFIG_MP_FILTER) += libmpcodecs/mp_image.o
......
......@@ -27,6 +27,10 @@
extern AVFilter avfilter_##y##_##x ; \
if(CONFIG_##X##_FILTER ) avfilter_register(&avfilter_##y##_##x ); }
#define REGISTER_BUILTIN_FILTER(x,y) { \
extern AVFilter avfilter_##y##_##x ; \
avfilter_register(&avfilter_##y##_##x ); }
void avfilter_register_all(void)
{
static int initialized;
......@@ -65,11 +69,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (ANULLSRC, anullsrc, asrc);
REGISTER_FILTER (FLITE, flite, asrc);
#if !AV_HAVE_INCOMPATIBLE_FORK_ABI
REGISTER_FILTER (ABUFFERSINK, abuffersink, asink);
#endif
REGISTER_FILTER (ANULLSINK, anullsink, asink);
REGISTER_FILTER (FFABUFFERSINK, ffabuffersink, asink);
REGISTER_FILTER (ALPHAEXTRACT, alphaextract, vf);
REGISTER_FILTER (ALPHAMERGE, alphamerge, vf);
......@@ -145,10 +145,6 @@ void avfilter_register_all(void)
REGISTER_FILTER (SMPTEBARS, smptebars, vsrc);
REGISTER_FILTER (TESTSRC, testsrc, vsrc);
#if !AV_HAVE_INCOMPATIBLE_FORK_ABI
REGISTER_FILTER (BUFFERSINK, buffersink, vsink);
#endif
REGISTER_FILTER (FFBUFFERSINK,ffbuffersink,vsink);
REGISTER_FILTER (NULLSINK, nullsink, vsink);
/* multimedia filters */
......@@ -160,6 +156,13 @@ void avfilter_register_all(void)
REGISTER_FILTER (AMOVIE, amovie, avsrc);
REGISTER_FILTER (MOVIE, movie, avsrc);
REGISTER_BUILTIN_FILTER (ffbuffersink, vsink);
REGISTER_BUILTIN_FILTER (ffabuffersink, asink);
#if !AV_HAVE_INCOMPATIBLE_FORK_ABI
REGISTER_BUILTIN_FILTER (buffersink, vsink);
REGISTER_BUILTIN_FILTER (abuffersink, asink);
#endif
/* those filters are part of public or internal API => registered
* unconditionally */
{
......
......@@ -188,8 +188,6 @@ int av_buffersink_poll_frame(AVFilterContext *ctx)
return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + ff_poll_frame(inlink);
}
#if CONFIG_BUFFERSINK_FILTER || CONFIG_FFBUFFERSINK_FILTER
static av_cold int vsink_init(AVFilterContext *ctx, const char *args, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
......@@ -259,10 +257,6 @@ AVFilter avfilter_vsink_buffersink = {
.outputs = (const AVFilterPad[]) {{ .name = NULL }},
};
#endif /* CONFIG_BUFFERSINK_FILTER */
#if CONFIG_ABUFFERSINK_FILTER || CONFIG_FFABUFFERSINK_FILTER
static int filter_samples(AVFilterLink *link, AVFilterBufferRef *samplesref)
{
end_frame(link);
......@@ -354,5 +348,3 @@ AVFilter avfilter_asink_abuffersink = {
{ .name = NULL }},
.outputs = (const AVFilterPad[]) {{ .name = NULL }},
};
#endif /* CONFIG_ABUFFERSINK_FILTER */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment