From 8d900aa4d0061967678c28d74659f918b0dbcad9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 17 Jun 2012 12:36:52 +0200 Subject: [PATCH 1/6] lavfi: remove disabled FF_API_GRAPH_AVCLASS cruft --- libavfilter/avfiltergraph.c | 2 -- libavfilter/avfiltergraph.h | 2 -- libavfilter/graphparser.c | 19 ++++++------------- libavfilter/version.h | 3 --- 4 files changed, 6 insertions(+), 20 deletions(-) diff --git a/libavfilter/avfiltergraph.c b/libavfilter/avfiltergraph.c index 95e0a219af..b9f01645d0 100644 --- a/libavfilter/avfiltergraph.c +++ b/libavfilter/avfiltergraph.c @@ -42,9 +42,7 @@ AVFilterGraph *avfilter_graph_alloc(void) AVFilterGraph *ret = av_mallocz(sizeof(AVFilterGraph)); if (!ret) return NULL; -#if FF_API_GRAPH_AVCLASS ret->av_class = &filtergraph_class; -#endif return ret; } diff --git a/libavfilter/avfiltergraph.h b/libavfilter/avfiltergraph.h index 0d600b91ce..7c4672dbc9 100644 --- a/libavfilter/avfiltergraph.h +++ b/libavfilter/avfiltergraph.h @@ -26,9 +26,7 @@ #include "libavutil/log.h" typedef struct AVFilterGraph { -#if FF_API_GRAPH_AVCLASS const AVClass *av_class; -#endif unsigned filter_count; AVFilterContext **filters; diff --git a/libavfilter/graphparser.c b/libavfilter/graphparser.c index 5f77084020..49155293d8 100644 --- a/libavfilter/graphparser.c +++ b/libavfilter/graphparser.c @@ -350,12 +350,6 @@ static int parse_outputs(const char **buf, AVFilterInOut **curr_inputs, return pad; } -#if FF_API_GRAPH_AVCLASS -#define log_ctx graph -#else -#define log_ctx NULL -#endif - static int parse_sws_flags(const char **buf, AVFilterGraph *graph) { char *p = strchr(*buf, ';'); @@ -364,7 +358,7 @@ static int parse_sws_flags(const char **buf, AVFilterGraph *graph) return 0; if (!p) { - av_log(log_ctx, AV_LOG_ERROR, "sws_flags not terminated with ';'.\n"); + av_log(graph, AV_LOG_ERROR, "sws_flags not terminated with ';'.\n"); return AVERROR(EINVAL); } @@ -397,18 +391,18 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, AVFilterContext *filter; filters += strspn(filters, WHITESPACES); - if ((ret = parse_inputs(&filters, &curr_inputs, &open_outputs, log_ctx)) < 0) + if ((ret = parse_inputs(&filters, &curr_inputs, &open_outputs, graph)) < 0) goto fail; - if ((ret = parse_filter(&filter, &filters, graph, index, log_ctx)) < 0) + if ((ret = parse_filter(&filter, &filters, graph, index, graph)) < 0) goto fail; - if ((ret = link_filter_inouts(filter, &curr_inputs, &open_inputs, log_ctx)) < 0) + if ((ret = link_filter_inouts(filter, &curr_inputs, &open_inputs, graph)) < 0) goto fail; if ((ret = parse_outputs(&filters, &curr_inputs, &open_inputs, &open_outputs, - log_ctx)) < 0) + graph)) < 0) goto fail; filters += strspn(filters, WHITESPACES); @@ -420,7 +414,7 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, } while (chr == ',' || chr == ';'); if (chr) { - av_log(log_ctx, AV_LOG_ERROR, + av_log(graph, AV_LOG_ERROR, "Unable to parse graph description substring: \"%s\"\n", filters - 1); ret = AVERROR(EINVAL); @@ -446,7 +440,6 @@ int avfilter_graph_parse2(AVFilterGraph *graph, const char *filters, return ret; } -#undef log_ctx int avfilter_graph_parse(AVFilterGraph *graph, const char *filters, AVFilterInOut *open_inputs, diff --git a/libavfilter/version.h b/libavfilter/version.h index b8f2749e12..38b61fd8d4 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -44,9 +44,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_GRAPH_AVCLASS -#define FF_API_GRAPH_AVCLASS (LIBAVFILTER_VERSION_MAJOR > 2) -#endif #ifndef FF_API_SAMPLERATE64 #define FF_API_SAMPLERATE64 (LIBAVFILTER_VERSION_MAJOR < 3) #endif From 6c1e065bd4a20f6bcac14667ae11d7ffee1551d9 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 17 Jun 2012 12:36:52 +0200 Subject: [PATCH 2/6] lavfi: remove disabled FF_API_SAMPLERATE64 cruft --- libavfilter/af_resample.c | 4 ---- libavfilter/avfilter.h | 4 ---- libavfilter/version.h | 3 --- 3 files changed, 11 deletions(-) diff --git a/libavfilter/af_resample.c b/libavfilter/af_resample.c index bc4a0073a1..8a02cfe976 100644 --- a/libavfilter/af_resample.c +++ b/libavfilter/af_resample.c @@ -119,11 +119,7 @@ static int config_output(AVFilterLink *outlink) av_get_channel_layout_string(buf2, sizeof(buf2), -1, outlink->channel_layout); av_log(ctx, AV_LOG_VERBOSE, -#if FF_API_SAMPLERATE64 - "fmt:%s srate:%"PRId64" cl:%s -> fmt:%s srate:%"PRId64" cl:%s\n", -#else "fmt:%s srate:%d cl:%s -> fmt:%s srate:%d cl:%s\n", -#endif /* FF_API_SAMPLERATE64 */ av_get_sample_fmt_name(inlink ->format), inlink ->sample_rate, buf1, av_get_sample_fmt_name(outlink->format), outlink->sample_rate, buf2); diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index b3b32dd0f6..5507a60897 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -541,11 +541,7 @@ struct AVFilterLink { AVRational sample_aspect_ratio; ///< agreed upon sample aspect ratio /* These two parameters apply only to audio */ uint64_t channel_layout; ///< channel layout of current buffer (see libavutil/audioconvert.h) -#if FF_API_SAMPLERATE64 - int64_t sample_rate; ///< samples per second -#else int sample_rate; ///< samples per second -#endif int format; ///< agreed upon media format diff --git a/libavfilter/version.h b/libavfilter/version.h index 38b61fd8d4..472643bc79 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -44,9 +44,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_SAMPLERATE64 -#define FF_API_SAMPLERATE64 (LIBAVFILTER_VERSION_MAJOR < 3) -#endif #ifndef FF_API_VSRC_BUFFER_ADD_FRAME #define FF_API_VSRC_BUFFER_ADD_FRAME (LIBAVFILTER_VERSION_MAJOR < 3) #endif From 0b3b95813576aeafc64813c93c6387b24e210f9a Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 17 Jun 2012 12:36:52 +0200 Subject: [PATCH 3/6] lavfi: remove disabled FF_API_VSRC_BUFFER_ADD_FRAME cruft --- libavfilter/Makefile | 1 - libavfilter/buffersrc.c | 20 -------------------- libavfilter/version.h | 3 --- libavfilter/vsrc_buffer.h | 37 ------------------------------------- 4 files changed, 61 deletions(-) delete mode 100644 libavfilter/vsrc_buffer.h diff --git a/libavfilter/Makefile b/libavfilter/Makefile index c77d450d7e..b78960932f 100644 --- a/libavfilter/Makefile +++ b/libavfilter/Makefile @@ -10,7 +10,6 @@ HEADERS = avfilter.h \ buffersink.h \ buffersrc.h \ version.h \ - vsrc_buffer.h \ OBJS = allfilters.o \ audio.o \ diff --git a/libavfilter/buffersrc.c b/libavfilter/buffersrc.c index 30e34b75fa..e1311c022a 100644 --- a/libavfilter/buffersrc.c +++ b/libavfilter/buffersrc.c @@ -29,7 +29,6 @@ #include "formats.h" #include "internal.h" #include "video.h" -#include "vsrc_buffer.h" #include "libavutil/audioconvert.h" #include "libavutil/fifo.h" @@ -70,25 +69,6 @@ typedef struct { return AVERROR(EINVAL);\ } -#if FF_API_VSRC_BUFFER_ADD_FRAME -int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, - int64_t pts, AVRational pixel_aspect) -{ - int64_t orig_pts = frame->pts; - AVRational orig_sar = frame->sample_aspect_ratio; - int ret; - - frame->pts = pts; - frame->sample_aspect_ratio = pixel_aspect; - if ((ret = av_buffersrc_write_frame(buffer_filter, frame)) < 0) - return ret; - frame->pts = orig_pts; - frame->sample_aspect_ratio = orig_sar; - - return 0; -} -#endif - int av_buffersrc_write_frame(AVFilterContext *buffer_filter, AVFrame *frame) { BufferSourceContext *c = buffer_filter->priv; diff --git a/libavfilter/version.h b/libavfilter/version.h index 472643bc79..d61d11173e 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -44,9 +44,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_VSRC_BUFFER_ADD_FRAME -#define FF_API_VSRC_BUFFER_ADD_FRAME (LIBAVFILTER_VERSION_MAJOR < 3) -#endif #ifndef FF_API_DEFAULT_CONFIG_OUTPUT_LINK #define FF_API_DEFAULT_CONFIG_OUTPUT_LINK (LIBAVFILTER_VERSION_MAJOR < 3) #endif diff --git a/libavfilter/vsrc_buffer.h b/libavfilter/vsrc_buffer.h deleted file mode 100644 index cbcc6305bb..0000000000 --- a/libavfilter/vsrc_buffer.h +++ /dev/null @@ -1,37 +0,0 @@ -/* - * Copyright (c) 2008 Vitor Sessak - * - * This file is part of Libav. - * - * Libav is free software; you can redistribute it and/or - * modify it under the terms of the GNU Lesser General Public - * License as published by the Free Software Foundation; either - * version 2.1 of the License, or (at your option) any later version. - * - * Libav is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public - * License along with Libav; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - */ - -#ifndef AVFILTER_VSRC_BUFFER_H -#define AVFILTER_VSRC_BUFFER_H - -/** - * @file - * memory buffer source API for video - */ - -#include "libavcodec/avcodec.h" /* AVFrame */ -#include "avfilter.h" - -#if FF_API_VSRC_BUFFER_ADD_FRAME -int av_vsrc_buffer_add_frame(AVFilterContext *buffer_filter, AVFrame *frame, - int64_t pts, AVRational pixel_aspect); -#endif - -#endif /* AVFILTER_VSRC_BUFFER_H */ From 205e90249a7ec905f4d8512fb8e77050643ef452 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 26 Jun 2012 13:17:31 +0200 Subject: [PATCH 4/6] lavfi: use proper FF_API guards for different deprecated functions --- libavfilter/avfilter.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index de059b7f15..c30b057695 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -448,6 +448,8 @@ int avfilter_default_config_output_link(AVFilterLink *link) { return 0; } +#endif +#if FF_API_FILTERS_PUBLIC void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, AVFilterPad *newpad) From 5e88b96f37d7eb7d435b6334d99aa067da8a0cb5 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 17 Jun 2012 12:36:52 +0200 Subject: [PATCH 5/6] lavfi: remove disabled FF_API_DEFAULT_CONFIG_OUTPUT_LINK cruft --- libavfilter/avfilter.c | 6 ------ libavfilter/avfilter.h | 6 ------ libavfilter/version.h | 3 --- 3 files changed, 15 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index c30b057695..fa31d0989d 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -443,12 +443,6 @@ enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx) return pads[pad_idx].type; } -#if FF_API_DEFAULT_CONFIG_OUTPUT_LINK -int avfilter_default_config_output_link(AVFilterLink *link) -{ - return 0; -} -#endif #if FF_API_FILTERS_PUBLIC void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, AVFilterPad **pads, AVFilterLink ***links, diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 5507a60897..319e021c35 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -409,12 +409,6 @@ void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir attribute_deprecated void avfilter_default_end_frame(AVFilterLink *link); -#if FF_API_DEFAULT_CONFIG_OUTPUT_LINK -/** default handler for config_props() for audio/video outputs */ -attribute_deprecated -int avfilter_default_config_output_link(AVFilterLink *link); -#endif - /** default handler for get_video_buffer() for video inputs */ attribute_deprecated AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, diff --git a/libavfilter/version.h b/libavfilter/version.h index d61d11173e..f5a0982438 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -44,9 +44,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_DEFAULT_CONFIG_OUTPUT_LINK -#define FF_API_DEFAULT_CONFIG_OUTPUT_LINK (LIBAVFILTER_VERSION_MAJOR < 3) -#endif #ifndef FF_API_FILTERS_PUBLIC #define FF_API_FILTERS_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 3) #endif From 1961e46c15c23a041f8d8614a25388a3ee9eff63 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Sun, 17 Jun 2012 12:36:52 +0200 Subject: [PATCH 6/6] lavfi: remove disabled FF_API_FILTERS_PUBLIC cruft --- libavfilter/avfilter.c | 35 ------------- libavfilter/avfilter.h | 114 ----------------------------------------- libavfilter/formats.c | 40 --------------- libavfilter/formats.h | 2 - libavfilter/version.h | 3 -- libavfilter/video.c | 51 ------------------ 6 files changed, 245 deletions(-) diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index fa31d0989d..b550169468 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -442,38 +442,3 @@ enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx) { return pads[pad_idx].type; } - -#if FF_API_FILTERS_PUBLIC -void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, - AVFilterPad **pads, AVFilterLink ***links, - AVFilterPad *newpad) -{ - ff_insert_pad(idx, count, padidx_off, pads, links, newpad); -} -void avfilter_insert_inpad(AVFilterContext *f, unsigned index, - AVFilterPad *p) -{ - ff_insert_pad(index, &f->nb_inputs, offsetof(AVFilterLink, dstpad), - &f->input_pads, &f->inputs, p); -#if FF_API_FOO_COUNT - f->input_count = f->nb_inputs; -#endif -} -void avfilter_insert_outpad(AVFilterContext *f, unsigned index, - AVFilterPad *p) -{ - ff_insert_pad(index, &f->nb_outputs, offsetof(AVFilterLink, srcpad), - &f->output_pads, &f->outputs, p); -#if FF_API_FOO_COUNT - f->output_count = f->nb_outputs; -#endif -} -int avfilter_poll_frame(AVFilterLink *link) -{ - return ff_poll_frame(link); -} -int avfilter_request_frame(AVFilterLink *link) -{ - return ff_request_frame(link); -} -#endif diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 319e021c35..d119c1a0a2 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -198,43 +198,6 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask); */ void avfilter_unref_buffer(AVFilterBufferRef *ref); -#if FF_API_FILTERS_PUBLIC -/** - * @addtogroup lavfi_deprecated - * @deprecated Those functions are only useful inside filters and - * user filters are not supported at this point. - * @{ - */ -struct AVFilterFormats { - unsigned format_count; ///< number of formats - int *formats; ///< list of media formats - - unsigned refcount; ///< number of references to this list - struct AVFilterFormats ***refs; ///< references to this list -}; - -attribute_deprecated -AVFilterFormats *avfilter_make_format_list(const int *fmts); -attribute_deprecated -int avfilter_add_format(AVFilterFormats **avff, int fmt); -attribute_deprecated -AVFilterFormats *avfilter_all_formats(enum AVMediaType type); -attribute_deprecated -AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b); -attribute_deprecated -void avfilter_formats_ref(AVFilterFormats *formats, AVFilterFormats **ref); -attribute_deprecated -void avfilter_formats_unref(AVFilterFormats **ref); -attribute_deprecated -void avfilter_formats_changeref(AVFilterFormats **oldref, - AVFilterFormats **newref); -attribute_deprecated -void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats); -/** - * @} - */ -#endif - #if FF_API_AVFILTERPAD_PUBLIC /** * A filter pad used for either input or output. @@ -396,48 +359,6 @@ const char *avfilter_pad_get_name(AVFilterPad *pads, int pad_idx); */ enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx); -#if FF_API_FILTERS_PUBLIC -/** default handler for start_frame() for video inputs */ -attribute_deprecated -void avfilter_default_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); - -/** default handler for draw_slice() for video inputs */ -attribute_deprecated -void avfilter_default_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); - -/** default handler for end_frame() for video inputs */ -attribute_deprecated -void avfilter_default_end_frame(AVFilterLink *link); - -/** default handler for get_video_buffer() for video inputs */ -attribute_deprecated -AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, - int perms, int w, int h); - -/** Default handler for query_formats() */ -attribute_deprecated -int avfilter_default_query_formats(AVFilterContext *ctx); -#endif - -#if FF_API_FILTERS_PUBLIC -/** start_frame() handler for filters which simply pass video along */ -attribute_deprecated -void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); - -/** draw_slice() handler for filters which simply pass video along */ -attribute_deprecated -void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); - -/** end_frame() handler for filters which simply pass video along */ -attribute_deprecated -void avfilter_null_end_frame(AVFilterLink *link); - -/** get_video_buffer() handler for filters which simply pass video along */ -attribute_deprecated -AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, - int perms, int w, int h); -#endif - /** * Filter definition. This defines the pads a filter contains, and all the * callback functions used to interact with the filter. @@ -614,12 +535,6 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, */ int avfilter_config_links(AVFilterContext *filter); -#if FF_API_FILTERS_PUBLIC -attribute_deprecated -AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, - int w, int h); -#endif - /** * Create a buffer reference wrapped around an already allocated image * buffer. @@ -653,21 +568,6 @@ AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, enum AVSampleFormat sample_fmt, uint64_t channel_layout); -#if FF_API_FILTERS_PUBLIC -attribute_deprecated -int avfilter_request_frame(AVFilterLink *link); - -attribute_deprecated -int avfilter_poll_frame(AVFilterLink *link); - -attribute_deprecated -void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); -attribute_deprecated -void avfilter_end_frame(AVFilterLink *link); -attribute_deprecated -void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); -#endif - /** Initialize the filter system. Register all builtin filters. */ void avfilter_register_all(void); @@ -745,20 +645,6 @@ void avfilter_free(AVFilterContext *filter); int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx); -#if FF_API_FILTERS_PUBLIC -attribute_deprecated -void avfilter_insert_pad(unsigned idx, unsigned *count, size_t padidx_off, - AVFilterPad **pads, AVFilterLink ***links, - AVFilterPad *newpad); - -attribute_deprecated -void avfilter_insert_inpad(AVFilterContext *f, unsigned index, - AVFilterPad *p); -attribute_deprecated -void avfilter_insert_outpad(AVFilterContext *f, unsigned index, - AVFilterPad *p); -#endif - /** * Copy the frame properties of src to dst, without copying the actual * image data. diff --git a/libavfilter/formats.c b/libavfilter/formats.c index 36af528c67..3ec68397c9 100644 --- a/libavfilter/formats.c +++ b/libavfilter/formats.c @@ -389,43 +389,3 @@ int ff_default_query_formats(AVFilterContext *ctx) return 0; } - -#if FF_API_FILTERS_PUBLIC -int avfilter_default_query_formats(AVFilterContext *ctx) -{ - return ff_default_query_formats(ctx); -} -void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) -{ - ff_set_common_formats(ctx, formats); -} -AVFilterFormats *avfilter_make_format_list(const int *fmts) -{ - return ff_make_format_list(fmts); -} -int avfilter_add_format(AVFilterFormats **avff, int fmt) -{ - return ff_add_format(avff, fmt); -} -AVFilterFormats *avfilter_all_formats(enum AVMediaType type) -{ - return ff_all_formats(type); -} -AVFilterFormats *avfilter_merge_formats(AVFilterFormats *a, AVFilterFormats *b) -{ - return ff_merge_formats(a, b); -} -void avfilter_formats_ref(AVFilterFormats *f, AVFilterFormats **ref) -{ - ff_formats_ref(f, ref); -} -void avfilter_formats_unref(AVFilterFormats **ref) -{ - ff_formats_unref(ref); -} -void avfilter_formats_changeref(AVFilterFormats **oldref, - AVFilterFormats **newref) -{ - ff_formats_changeref(oldref, newref); -} -#endif diff --git a/libavfilter/formats.h b/libavfilter/formats.h index c3e9522c89..4f95c16262 100644 --- a/libavfilter/formats.h +++ b/libavfilter/formats.h @@ -61,7 +61,6 @@ * get updated as well. Therefore, we have the format list structure store a * pointer to each of the pointers to itself. */ -#if !FF_API_FILTERS_PUBLIC struct AVFilterFormats { unsigned format_count; ///< number of formats int *formats; ///< list of media formats @@ -69,7 +68,6 @@ struct AVFilterFormats { unsigned refcount; ///< number of references to this list struct AVFilterFormats ***refs; ///< references to this list }; -#endif typedef struct AVFilterChannelLayouts { uint64_t *channel_layouts; ///< list of channel layouts diff --git a/libavfilter/version.h b/libavfilter/version.h index f5a0982438..0f4353fea9 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -44,9 +44,6 @@ * Those FF_API_* defines are not part of public API. * They may change, break or disappear at any time. */ -#ifndef FF_API_FILTERS_PUBLIC -#define FF_API_FILTERS_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 3) -#endif #ifndef FF_API_AVFILTERPAD_PUBLIC #define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 4) #endif diff --git a/libavfilter/video.c b/libavfilter/video.c index a00f8c1cb2..feaaebab86 100644 --- a/libavfilter/video.c +++ b/libavfilter/video.c @@ -308,54 +308,3 @@ void ff_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) draw_slice = default_draw_slice; draw_slice(link, y, h, slice_dir); } - -#if FF_API_FILTERS_PUBLIC -AVFilterBufferRef *avfilter_default_get_video_buffer(AVFilterLink *link, int perms, int w, int h) -{ - return ff_default_get_video_buffer(link, perms, w, h); -} -void avfilter_default_start_frame(AVFilterLink *inlink, AVFilterBufferRef *picref) -{ - default_start_frame(inlink, picref); -} -void avfilter_default_end_frame(AVFilterLink *inlink) -{ - default_end_frame(inlink); -} -void avfilter_default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_dir) -{ - default_draw_slice(inlink, y, h, slice_dir); -} -AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h) -{ - return ff_null_get_video_buffer(link, perms, w, h); -} -void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) -{ - ff_null_start_frame(link, picref); -} -void avfilter_null_end_frame(AVFilterLink *link) -{ - ff_null_end_frame(link); -} -void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) -{ - ff_null_draw_slice(link, y, h, slice_dir); -} -void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) -{ - ff_start_frame(link, picref); -} -void avfilter_end_frame(AVFilterLink *link) -{ - ff_end_frame(link); -} -void avfilter_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) -{ - ff_draw_slice(link, y, h, slice_dir); -} -AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int w, int h) -{ - return ff_get_video_buffer(link, perms, w, h); -} -#endif