Commit 5916bc46 authored by Michael Niedermayer's avatar Michael Niedermayer

Merge commit '1961e46c'

* commit '1961e46c':
  lavfi: remove disabled FF_API_FILTERS_PUBLIC cruft
  lavfi: remove disabled FF_API_DEFAULT_CONFIG_OUTPUT_LINK cruft
  lavfi: use proper FF_API guards for different deprecated functions
  lavfi: remove disabled FF_API_VSRC_BUFFER_ADD_FRAME cruft
  lavfi: remove disabled FF_API_SAMPLERATE64 cruft
  lavfi: remove disabled FF_API_GRAPH_AVCLASS cruft

Conflicts:
	libavfilter/avfilter.c
	libavfilter/avfilter.h
	libavfilter/buffersrc.c
	libavfilter/formats.c
	libavfilter/graphparser.c
	libavfilter/version.h
	libavfilter/video.c
	libavfilter/vsrc_buffer.h
Merged-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parents 052f4f85 1961e46c
......@@ -22,7 +22,6 @@ HEADERS = asrc_abuffer.h \
buffersink.h \
buffersrc.h \
version.h \
vsrc_buffer.h \
OBJS = allfilters.o \
audio.o \
......
......@@ -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);
......
......@@ -560,38 +560,3 @@ enum AVMediaType avfilter_pad_get_type(AVFilterPad *pads, int pad_idx)
{
return pads[pad_idx].type;
}
#if FF_API_DEFAULT_CONFIG_OUTPUT_LINK
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
This diff is collapsed.
......@@ -47,9 +47,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;
}
......
......@@ -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;
......
......@@ -29,7 +29,6 @@
#include "formats.h"
#include "internal.h"
#include "video.h"
#include "vsrc_buffer.h"
#include "avcodec.h"
#include "libavutil/audioconvert.h"
......
......@@ -525,45 +525,6 @@ int ff_parse_channel_layout(int64_t *ret, const char *arg, void *log_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, int64_t 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
#ifdef TEST
#undef printf
......@@ -582,3 +543,4 @@ int main(void)
}
#endif
......@@ -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
......
......@@ -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,17 +391,17 @@ 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 end;
if ((ret = parse_filter(&filter, &filters, graph, index, log_ctx)) < 0)
if ((ret = parse_filter(&filter, &filters, graph, index, graph)) < 0)
goto end;
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 end;
if ((ret = parse_outputs(&filters, &curr_inputs, &open_inputs, &open_outputs,
log_ctx)) < 0)
graph)) < 0)
goto end;
filters += strspn(filters, WHITESPACES);
......@@ -419,7 +413,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_ptr, AVFilterInOut **open_outputs_ptr,
......
......@@ -47,21 +47,6 @@
#ifndef FF_API_OLD_ALL_FORMATS_API
#define FF_API_OLD_ALL_FORMATS_API (LIBAVFILTER_VERSION_MAJOR < 3)
#endif
#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
#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
#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
......
......@@ -326,49 +326,3 @@ void avfilter_default_end_frame(AVFilterLink *inlink)
default_end_frame(inlink);
}
#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_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
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