return 0;
}
-
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
- int w, int h)
-{
- return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
AspectContext *aspect = link->dst->priv;
avfilter_start_frame(link->dst->outputs[0], picref);
}
-static void end_frame(AVFilterLink *link)
-{
- avfilter_end_frame(link->dst->outputs[0]);
-}
-
#if CONFIG_ASPECT_FILTER
/* for aspect filter, convert from frame aspect ratio to pixel aspect ratio */
static int frameaspect_config_props(AVFilterLink *inlink)
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO,
.config_props = frameaspect_config_props,
- .get_video_buffer = get_video_buffer,
+ .get_video_buffer = avfilter_null_get_video_buffer,
.start_frame = start_frame,
- .end_frame = end_frame },
+ .end_frame = avfilter_null_end_frame },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO,
- .get_video_buffer = get_video_buffer,
+ .get_video_buffer = avfilter_null_get_video_buffer,
.start_frame = start_frame,
- .end_frame = end_frame },
+ .end_frame = avfilter_null_end_frame },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
return 0;
}
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
- int w, int h)
-{
- return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
CropContext *crop = link->dst->priv;
.type = CODEC_TYPE_VIDEO,
.start_frame = start_frame,
.draw_slice = draw_slice,
- .get_video_buffer = get_video_buffer,
+ .get_video_buffer = avfilter_null_get_video_buffer,
.config_props = config_input, },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
return formats;
}
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
- int w, int h)
-{
- return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
-{
- avfilter_start_frame(link->dst->outputs[0], picref);
-}
-
-static void end_frame(AVFilterLink *link)
-{
- avfilter_end_frame(link->dst->outputs[0]);
-}
-
-static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
-{
- avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir);
-}
-
#if CONFIG_FORMAT_FILTER
static int query_formats_format(AVFilterContext *ctx)
{
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO,
- .get_video_buffer= get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame, },
+ .get_video_buffer= avfilter_null_get_video_buffer,
+ .start_frame = avfilter_null_start_frame,
+ .draw_slice = avfilter_null_draw_slice,
+ .end_frame = avfilter_null_end_frame, },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO },
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO,
- .get_video_buffer= get_video_buffer,
- .start_frame = start_frame,
- .draw_slice = draw_slice,
- .end_frame = end_frame, },
+ .get_video_buffer= avfilter_null_get_video_buffer,
+ .start_frame = avfilter_null_start_frame,
+ .draw_slice = avfilter_null_draw_slice,
+ .end_frame = avfilter_null_end_frame, },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO },
#include "avfilter.h"
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
- int w, int h)
-{
- return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
-static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
-{
- avfilter_start_frame(link->dst->outputs[0], picref);
-}
-
-static void end_frame(AVFilterLink *link)
-{
- avfilter_end_frame(link->dst->outputs[0]);
-}
-
AVFilter avfilter_vf_null = {
.name = "null",
.description = NULL_IF_CONFIG_SMALL("Pass the source unchanged to the output."),
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO,
- .get_video_buffer = get_video_buffer,
- .start_frame = start_frame,
- .end_frame = end_frame },
+ .get_video_buffer = avfilter_null_get_video_buffer,
+ .start_frame = avfilter_null_start_frame,
+ .end_frame = avfilter_null_end_frame },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
return 0;
}
-static AVFilterPicRef *get_video_buffer(AVFilterLink *link, int perms,
- int w, int h)
-{
- return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
-}
-
static void start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
SliceContext *slice = link->dst->priv;
avfilter_start_frame(link->dst->outputs[0], picref);
}
-static void end_frame(AVFilterLink *link)
-{
- avfilter_end_frame(link->dst->outputs[0]);
-}
-
static void draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
{
SliceContext *slice = link->dst->priv;
.inputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO,
- .get_video_buffer = get_video_buffer,
+ .get_video_buffer = avfilter_null_get_video_buffer,
.start_frame = start_frame,
.draw_slice = draw_slice,
.config_props = config_props,
- .end_frame = end_frame, },
+ .end_frame = avfilter_null_end_frame, },
{ .name = NULL}},
.outputs = (AVFilterPad[]) {{ .name = "default",
.type = CODEC_TYPE_VIDEO, },