diff options
author | Nicolas George <nicolas.george@normalesup.org> | 2012-09-26 13:59:56 +0400 |
---|---|---|
committer | Nicolas George <nicolas.george@normalesup.org> | 2012-09-27 17:57:30 +0400 |
commit | 8e1f063efcde8173e006705c307c8ebc1ab15637 (patch) | |
tree | 4d493ba98bad74379f8370565bc035028d73b860 /libavfilter | |
parent | e760424ddd202e01119592044394d505810ae00a (diff) |
lavfi: enable buffersinks unconditionally.
They are part of the public API. Their libav compatibility
counterpart are already enabled unconditionally.
Diffstat (limited to 'libavfilter')
-rw-r--r-- | libavfilter/Makefile | 5 | ||||
-rw-r--r-- | libavfilter/allfilters.c | 19 | ||||
-rw-r--r-- | libavfilter/sink_buffer.c | 8 |
3 files changed, 12 insertions, 20 deletions
diff --git a/libavfilter/Makefile b/libavfilter/Makefile index 3477ecab6b..ed1b9b5ff1 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -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 diff --git a/libavfilter/allfilters.c b/libavfilter/allfilters.c index b28c024c63..49f166da7e 100644 --- a/libavfilter/allfilters.c +++ b/libavfilter/allfilters.c @@ -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 */ { diff --git a/libavfilter/sink_buffer.c b/libavfilter/sink_buffer.c index e34e8e204b..8c52c5c93b 100644 --- a/libavfilter/sink_buffer.c +++ b/libavfilter/sink_buffer.c @@ -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 */ |