1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-28 20:53:54 +02:00

lavfi: remove now unused args parameter from AVFilter.init and init_opaque

This is mostly automated global search and replace

The deprecated aconvert filter is disabled, if it still has users
it should be updated

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
Michael Niedermayer 2013-04-12 11:13:33 +02:00
parent d69a4177b9
commit fd6228e657
50 changed files with 71 additions and 70 deletions

View File

@ -38,12 +38,12 @@ typedef struct {
struct SwrContext *swr;
} AConvertContext;
static av_cold int init(AVFilterContext *ctx, const char *args0)
static av_cold int init(AVFilterContext *ctx)
{
AConvertContext *aconvert = ctx->priv;
char *arg, *ptr = NULL;
int ret = 0;
char *args = av_strdup(args0);
char *args = av_strdup(NULL);
av_log(ctx, AV_LOG_WARNING, "This filter is deprecated, use aformat instead\n");

View File

@ -77,7 +77,7 @@ static const AVOption afade_options[] = {
AVFILTER_DEFINE_CLASS(afade);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
AudioFadeContext *afade = ctx->priv;

View File

@ -303,7 +303,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *insamples)
return ff_filter_frame(ctx->outputs[0], outbuf);
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
AMergeContext *am = ctx->priv;
int i;

View File

@ -56,7 +56,7 @@ static const AVOption apad_options[] = {
AVFILTER_DEFINE_CLASS(apad);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
APadContext *apad = ctx->priv;

View File

@ -76,7 +76,7 @@ static const AVOption aphaser_options[] = {
AVFILTER_DEFINE_CLASS(aphaser);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
AudioPhaserContext *p = ctx->priv;

View File

@ -54,7 +54,7 @@ static const AVOption asetnsamples_options[] = {
AVFILTER_DEFINE_CLASS(asetnsamples);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
ASNSContext *asns = ctx->priv;

View File

@ -71,7 +71,7 @@ static const AVOption astreamsync_options[] = {
AVFILTER_DEFINE_CLASS(astreamsync);
static av_cold int init(AVFilterContext *ctx, const char *args0)
static av_cold int init(AVFilterContext *ctx)
{
AStreamSyncContext *as = ctx->priv;
int r, i;

View File

@ -960,7 +960,7 @@ static int yae_flush(ATempoContext *atempo,
return atempo->position[1] == stop_here ? 0 : AVERROR(EAGAIN);
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
ATempoContext *atempo = ctx->priv;
atempo->format = AV_SAMPLE_FMT_NONE;

View File

@ -116,7 +116,7 @@ typedef struct {
double b0, double b1, double b2, double a1, double a2);
} BiquadsContext;
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
BiquadsContext *p = ctx->priv;
@ -446,12 +446,12 @@ static const AVFilterPad outputs[] = {
#define DEFINE_BIQUAD_FILTER(name_, description_) \
AVFILTER_DEFINE_CLASS(name_); \
static av_cold int name_##_init(AVFilterContext *ctx, const char *args) \
static av_cold int name_##_init(AVFilterContext *ctx) \
{ \
BiquadsContext *p = ctx->priv; \
p->class = &name_##_class; \
p->filter_type = name_; \
return init(ctx, args); \
return init(ctx); \
} \
\
AVFilter avfilter_af_##name_ = { \

View File

@ -99,7 +99,7 @@ static int parse_channel_name(char **arg, int *rchannel, int *rnamed)
return AVERROR(EINVAL);
}
static av_cold int init(AVFilterContext *ctx, const char *args0)
static av_cold int init(AVFilterContext *ctx)
{
PanContext *const pan = ctx->priv;
char *arg, *arg0, *tokenizer, *args = av_strdup(pan->args);

View File

@ -82,7 +82,7 @@ static const AVOption aevalsrc_options[]= {
AVFILTER_DEFINE_CLASS(aevalsrc);
static int init(AVFilterContext *ctx, const char *args)
static int init(AVFilterContext *ctx)
{
EvalContext *eval = ctx->priv;
char *args1 = av_strdup(eval->exprs);

View File

@ -59,7 +59,7 @@ static const AVOption anullsrc_options[]= {
AVFILTER_DEFINE_CLASS(anullsrc);
static int init(AVFilterContext *ctx, const char *args)
static int init(AVFilterContext *ctx)
{
ANullContext *null = ctx->priv;
int ret;

View File

@ -131,7 +131,7 @@ static int select_voice(struct voice_entry **entry_ret, const char *voice_name,
return AVERROR(EINVAL);
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
FliteContext *flite = ctx->priv;
int ret = 0;

View File

@ -120,7 +120,7 @@ static void make_sin_table(int16_t *sin)
sin[i + 2 * half_pi] = -sin[i];
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
SineContext *sine = ctx->priv;

View File

@ -355,7 +355,7 @@ static int request_frame(AVFilterLink *outlink)
}
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
ConcatContext *cat = ctx->priv;
unsigned seg, type, str;

View File

@ -491,7 +491,7 @@ typedef struct AVFilter {
* callback. Args contains the user-supplied parameters, opaque is
* used for providing binary data.
*/
int (*init_opaque)(AVFilterContext *ctx, const char *args, void *opaque);
int (*init_opaque)(AVFilterContext *ctx, void *opaque);
/**
* Shorthand syntax for init arguments.

View File

@ -362,7 +362,7 @@ int attribute_align_arg av_buffersink_poll_frame(AVFilterContext *ctx)
return av_fifo_size(buf->fifo)/sizeof(AVFilterBufferRef *) + ff_poll_frame(inlink);
}
static av_cold int vsink_init(AVFilterContext *ctx, const char *args, void *opaque)
static av_cold int vsink_init(AVFilterContext *ctx, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
AVBufferSinkParams *params = opaque;
@ -411,7 +411,7 @@ static int64_t *concat_channels_lists(const int64_t *layouts, const int *counts)
return list;
}
static av_cold int asink_init(AVFilterContext *ctx, const char *args, void *opaque)
static av_cold int asink_init(AVFilterContext *ctx, void *opaque)
{
BufferSinkContext *buf = ctx->priv;
AVABufferSinkParams *params = opaque;

View File

@ -403,7 +403,7 @@ static struct hist_entry *get_histogram(void)
return h;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
EBUR128Context *ebur128 = ctx->priv;
AVFilterPad pad;

View File

@ -54,7 +54,7 @@ static const AVOption options[] = {
{ NULL }
};
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
PermsContext *perms = ctx->priv;

View File

@ -139,7 +139,7 @@ typedef struct {
} SelectContext;
static av_cold int init(AVFilterContext *ctx, const char *args, const AVClass *class)
static av_cold int init(AVFilterContext *ctx)
{
SelectContext *select = ctx->priv;
int ret;
@ -399,12 +399,12 @@ static const AVOption aselect_options[] = {
};
AVFILTER_DEFINE_CLASS(aselect);
static av_cold int aselect_init(AVFilterContext *ctx, const char *args)
static av_cold int aselect_init(AVFilterContext *ctx)
{
SelectContext *select = ctx->priv;
int ret;
if ((ret = init(ctx, args, &aselect_class)) < 0)
if ((ret = init(ctx)) < 0)
return ret;
if (select->do_scene_detect) {
@ -458,12 +458,12 @@ static const AVOption select_options[] = {
AVFILTER_DEFINE_CLASS(select);
static av_cold int select_init(AVFilterContext *ctx, const char *args)
static av_cold int select_init(AVFilterContext *ctx)
{
SelectContext *select = ctx->priv;
int ret;
if ((ret = init(ctx, args, &select_class)) < 0)
if ((ret = init(ctx)) < 0)
return ret;
if (select->do_scene_detect && !CONFIG_AVCODEC) {

View File

@ -510,7 +510,7 @@ end:
#define sendcmd_options options
AVFILTER_DEFINE_CLASS(sendcmd);
static av_cold int sendcmd_init(AVFilterContext *ctx, const char *args)
static av_cold int sendcmd_init(AVFilterContext *ctx)
{
return init(ctx);
}
@ -552,7 +552,7 @@ AVFilter avfilter_vf_sendcmd = {
#define asendcmd_options options
AVFILTER_DEFINE_CLASS(asendcmd);
static av_cold int asendcmd_init(AVFilterContext *ctx, const char *args)
static av_cold int asendcmd_init(AVFilterContext *ctx)
{
return init(ctx);
}

View File

@ -86,7 +86,7 @@ typedef struct {
enum AVMediaType type;
} SetPTSContext;
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
SetPTSContext *setpts = ctx->priv;
int ret;

View File

@ -563,7 +563,7 @@ static int movie_request_frame(AVFilterLink *outlink)
AVFILTER_DEFINE_CLASS(movie);
static av_cold int movie_init(AVFilterContext *ctx, const char *args)
static av_cold int movie_init(AVFilterContext *ctx)
{
return movie_common_init(ctx);
}
@ -588,7 +588,7 @@ AVFilter avfilter_avsrc_movie = {
#define amovie_options movie_options
AVFILTER_DEFINE_CLASS(amovie);
static av_cold int amovie_init(AVFilterContext *ctx, const char *args)
static av_cold int amovie_init(AVFilterContext *ctx)
{
return movie_common_init(ctx);
}

View File

@ -220,7 +220,7 @@ static void blend_expr(const uint8_t *top, int top_linesize,
}
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
BlendContext *b = ctx->priv;
int ret, plane;

View File

@ -160,7 +160,7 @@ static void calc_coefficients(AVFilterContext *ctx)
static const char *color_modes[] = {"bt709", "fcc", "bt601", "smpte240m"};
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
ColorMatrixContext *color = ctx->priv;

View File

@ -295,7 +295,7 @@ end:
return ret;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
int i, j, ret;
CurvesContext *curves = ctx->priv;

View File

@ -129,7 +129,7 @@ static int decimate_frame(AVFilterContext *ctx,
return 1;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
DecimateContext *decimate = ctx->priv;

View File

@ -344,7 +344,7 @@ static int deshake_transform_c(AVFilterContext *ctx,
return ret;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
int ret;
DeshakeContext *deshake = ctx->priv;

View File

@ -601,7 +601,7 @@ static int command(AVFilterContext *ctx, const char *cmd, const char *arg, char
int ret;
uninit(ctx);
dtext->reinit = 1;
if ((ret = init(ctx, arg)) < 0)
if ((ret = init(ctx)) < 0)
return ret;
return config_input(ctx->inputs[0]);
}

View File

@ -50,7 +50,7 @@ static const AVOption edgedetect_options[] = {
AVFILTER_DEFINE_CLASS(edgedetect);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
EdgeDetectContext *edgedetect = ctx->priv;

View File

@ -88,7 +88,7 @@ static double alpha(void *priv, double x, double y) { return getpix(priv, x, y,
static const char *const var_names[] = { "X", "Y", "W", "H", "N", "SW", "SH", "T", NULL };
enum { VAR_X, VAR_Y, VAR_W, VAR_H, VAR_N, VAR_SW, VAR_SH, VAR_T, VAR_VARS_NB };
static av_cold int geq_init(AVFilterContext *ctx, const char *args)
static av_cold int geq_init(AVFilterContext *ctx)
{
GEQContext *geq = ctx->priv;
int plane, ret = 0;

View File

@ -82,7 +82,7 @@ static const AVOption histeq_options[] = {
AVFILTER_DEFINE_CLASS(histeq);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
HisteqContext *histeq = ctx->priv;

View File

@ -120,7 +120,7 @@ static int set_expr(AVExpr **pexpr, const char *expr, const char *option, void *
return 0;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
HueContext *hue = ctx->priv;
int ret;

View File

@ -273,7 +273,7 @@ static int query_formats(AVFilterContext *ctx)
return 0;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
IDETContext *idet = ctx->priv;

View File

@ -74,7 +74,7 @@ typedef struct {
const AVClass *class;
char *name;
char *params;
int (*init)(AVFilterContext *ctx, const char *args);
int (*init)(AVFilterContext *ctx);
void (*uninit)(AVFilterContext *ctx);
void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg);
void *priv;
@ -86,7 +86,7 @@ typedef struct {
double param3, param4;
} SmoothContext;
static av_cold int smooth_init(AVFilterContext *ctx, const char *args)
static av_cold int smooth_init(AVFilterContext *ctx)
{
OCVContext *ocv = ctx->priv;
SmoothContext *smooth = ocv->priv;
@ -252,7 +252,7 @@ typedef struct {
IplConvKernel *kernel;
} DilateContext;
static av_cold int dilate_init(AVFilterContext *ctx, const char *args)
static av_cold int dilate_init(AVFilterContext *ctx)
{
OCVContext *ocv = ctx->priv;
DilateContext *dilate = ocv->priv;
@ -306,7 +306,7 @@ static void erode_end_frame_filter(AVFilterContext *ctx, IplImage *inimg, IplIma
typedef struct {
const char *name;
size_t priv_size;
int (*init)(AVFilterContext *ctx, const char *args);
int (*init)(AVFilterContext *ctx);
void (*uninit)(AVFilterContext *ctx);
void (*end_frame_filter)(AVFilterContext *ctx, IplImage *inimg, IplImage *outimg);
} OCVFilterEntry;
@ -331,7 +331,7 @@ static av_cold int init(AVFilterContext *ctx)
if (!(ocv->priv = av_mallocz(entry->priv_size)))
return AVERROR(ENOMEM);
return ocv->init(ctx, ocv->params);
return ocv->init(ctx);
}
}

View File

@ -635,11 +635,12 @@ static int vf_default_query_format(struct vf_instance *vf, unsigned int fmt){
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
MPContext *m = ctx->priv;
int cpu_flags = av_get_cpu_flags();
char name[256];
const char *args;
int i;
ff_gCpuCaps.hasMMX = cpu_flags & AV_CPU_FLAG_MMX;

View File

@ -400,7 +400,7 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *inpicref)
return ret;
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
NoiseContext *n = ctx->priv;
int ret, i;

View File

@ -118,7 +118,7 @@ typedef struct {
AVExpr *x_pexpr, *y_pexpr, *enable_pexpr;
} OverlayContext;
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
OverlayContext *over = ctx->priv;

View File

@ -47,7 +47,7 @@ static const AVOption pp_options[] = {
AVFILTER_DEFINE_CLASS(pp);
static av_cold int pp_init(AVFilterContext *ctx, const char *args)
static av_cold int pp_init(AVFilterContext *ctx)
{
int i;
PPFilterContext *pp = ctx->priv;

View File

@ -277,7 +277,7 @@ static void generate_half_size_image(const uint8_t *src_data, int src_linesize,
src_w/2, src_h/2, 0, max_mask_size);
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
RemovelogoContext *removelogo = ctx->priv;
int ***mask;

View File

@ -82,7 +82,7 @@ static const AVOption smartblur_options[] = {
AVFILTER_DEFINE_CLASS(smartblur);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
SmartblurContext *sblur = ctx->priv;

View File

@ -85,7 +85,7 @@ static void ass_log(int ass_level, const char *fmt, va_list args, void *ctx)
av_log(ctx, level, "\n");
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
AssContext *ass = ctx->priv;
@ -210,10 +210,10 @@ static const AVOption ass_options[] = {
AVFILTER_DEFINE_CLASS(ass);
static av_cold int init_ass(AVFilterContext *ctx, const char *args)
static av_cold int init_ass(AVFilterContext *ctx)
{
AssContext *ass = ctx->priv;
int ret = init(ctx, args);
int ret = init(ctx);
if (ret < 0)
return ret;
@ -251,7 +251,7 @@ static const AVOption subtitles_options[] = {
AVFILTER_DEFINE_CLASS(subtitles);
static av_cold int init_subtitles(AVFilterContext *ctx, const char *args)
static av_cold int init_subtitles(AVFilterContext *ctx)
{
int ret, sid;
AVDictionary *codec_opts = NULL;
@ -264,7 +264,7 @@ static av_cold int init_subtitles(AVFilterContext *ctx, const char *args)
AssContext *ass = ctx->priv;
/* Init libass */
ret = init(ctx, args);
ret = init(ctx);
if (ret < 0)
return ret;
ass->track = ass_new_track(ass->library);

View File

@ -68,7 +68,7 @@ static const AVOption telecine_options[] = {
AVFILTER_DEFINE_CLASS(telecine);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
TelecineContext *tc = ctx->priv;
const char *p;

View File

@ -56,7 +56,7 @@ static const AVOption thumbnail_options[] = {
AVFILTER_DEFINE_CLASS(thumbnail);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
ThumbContext *thumb = ctx->priv;

View File

@ -62,7 +62,7 @@ static const AVOption tile_options[] = {
AVFILTER_DEFINE_CLASS(tile);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
TileContext *tile = ctx->priv;

View File

@ -159,7 +159,7 @@ static int init_pattern_from_file(AVFilterContext *ctx)
return init_pattern_from_string(ctx);
}
static int init(AVFilterContext *ctx, const char *args)
static int init(AVFilterContext *ctx)
{
CellAutoContext *cellauto = ctx->priv;
int ret;

View File

@ -220,7 +220,7 @@ static int init_pattern_from_file(AVFilterContext *ctx)
return 0;
}
static int init(AVFilterContext *ctx, const char *args)
static int init(AVFilterContext *ctx)
{
LifeContext *life = ctx->priv;
int ret;

View File

@ -119,7 +119,7 @@ static const AVOption mandelbrot_options[] = {
AVFILTER_DEFINE_CLASS(mandelbrot);
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
MBContext *mb = ctx->priv;

View File

@ -256,7 +256,7 @@ static void ring2_test(uint8_t *dst, int dst_linesize, int off)
}
}
static av_cold int init(AVFilterContext *ctx, const char *args)
static av_cold int init(AVFilterContext *ctx)
{
MPTestContext *test = ctx->priv;
int64_t duration = -1;

View File

@ -213,7 +213,7 @@ static void color_fill_picture(AVFilterContext *ctx, AVFrame *picref)
0, 0, test->w, test->h);
}
static av_cold int color_init(AVFilterContext *ctx, const char *args)
static av_cold int color_init(AVFilterContext *ctx)
{
TestSourceContext *test = ctx->priv;
test->fill_picture_fn = color_fill_picture;
@ -282,7 +282,7 @@ AVFILTER_DEFINE_CLASS(nullsrc);
static void nullsrc_fill_picture(AVFilterContext *ctx, AVFrame *picref) { }
static av_cold int nullsrc_init(AVFilterContext *ctx, const char *args)
static av_cold int nullsrc_init(AVFilterContext *ctx)
{
TestSourceContext *test = ctx->priv;
@ -754,7 +754,7 @@ static void smptebars_fill_picture(AVFilterContext *ctx, AVFrame *picref)
draw_bar(test, black, x, r_h + w_h, test->w - x, p_h, picref);
}
static av_cold int smptebars_init(AVFilterContext *ctx, const char *args)
static av_cold int smptebars_init(AVFilterContext *ctx)
{
TestSourceContext *test = ctx->priv;