#include "avfilter.h"
#include "drawutils.h"
#include "internal.h"
+#include "formats.h"
+#include "internal.h"
+#include "video.h"
#define R 0
#define G 1
{NULL},
};
-static const char *fade_get_name(void *ctx)
-{
- return "fade";
-}
-
-static const AVClass fade_class = {
- "FadeContext",
- fade_get_name,
- fade_options
-};
+AVFILTER_DEFINE_CLASS(fade);
-static av_cold int init(AVFilterContext *ctx, const char *args, void *opaque)
+static av_cold int init(AVFilterContext *ctx, const char *args)
{
FadeContext *fade = ctx->priv;
int ret = 0;
}
fade->stop_frame = fade->start_frame + fade->nb_frames;
- av_log(ctx, AV_LOG_INFO,
+ av_log(ctx, AV_LOG_VERBOSE,
"type:%s start_frame:%d nb_frames:%d alpha:%d\n",
fade->type, fade->start_frame, fade->nb_frames, fade->alpha);
PIX_FMT_NONE
};
- avfilter_set_common_pixel_formats(ctx, avfilter_make_format_list(pix_fmts));
+ ff_set_common_formats(ctx, ff_make_format_list(pix_fmts));
return 0;
}
}
}
- avfilter_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
+ ff_draw_slice(inlink->dst->outputs[0], y, h, slice_dir);
}
static void end_frame(AVFilterLink *inlink)
{
FadeContext *fade = inlink->dst->priv;
- avfilter_end_frame(inlink->dst->outputs[0]);
+ ff_end_frame(inlink->dst->outputs[0]);
if (fade->frame_index >= fade->start_frame &&
fade->frame_index <= fade->stop_frame)
.inputs = (const AVFilterPad[]) {{ .name = "default",
.type = AVMEDIA_TYPE_VIDEO,
.config_props = config_props,
- .get_video_buffer = avfilter_null_get_video_buffer,
- .start_frame = avfilter_null_start_frame,
+ .get_video_buffer = ff_null_get_video_buffer,
+ .start_frame = ff_null_start_frame,
.draw_slice = draw_slice,
.end_frame = end_frame,
.min_perms = AV_PERM_READ | AV_PERM_WRITE,