Those functions are only useful inside filters. It is better to not support user filters until the API is more stable.tags/n0.11
@@ -487,18 +487,24 @@ int avfilter_default_query_formats(AVFilterContext *ctx); | |||||
*/ | */ | ||||
void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats); | void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats); | ||||
#if FF_API_FILTERS_PUBLIC | |||||
/** start_frame() handler for filters which simply pass video along */ | /** start_frame() handler for filters which simply pass video along */ | ||||
attribute_deprecated | |||||
void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); | void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); | ||||
/** draw_slice() handler for filters which simply pass video along */ | /** 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); | void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); | ||||
/** end_frame() handler for filters which simply pass video along */ | /** end_frame() handler for filters which simply pass video along */ | ||||
attribute_deprecated | |||||
void avfilter_null_end_frame(AVFilterLink *link); | void avfilter_null_end_frame(AVFilterLink *link); | ||||
/** get_video_buffer() handler for filters which simply pass video along */ | /** get_video_buffer() handler for filters which simply pass video along */ | ||||
attribute_deprecated | |||||
AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, | AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, | ||||
int perms, int w, int h); | int perms, int w, int h); | ||||
#endif | |||||
/** | /** | ||||
* Filter definition. This defines the pads a filter contains, and all the | * Filter definition. This defines the pads a filter contains, and all the | ||||
@@ -25,6 +25,7 @@ | |||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "audio.h" | #include "audio.h" | ||||
#include "video.h" | |||||
static int split_init(AVFilterContext *ctx, const char *args, void *opaque) | static int split_init(AVFilterContext *ctx, const char *args, void *opaque) | ||||
{ | { | ||||
@@ -100,7 +101,7 @@ AVFilter avfilter_vf_split = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer= avfilter_null_get_video_buffer, | |||||
.get_video_buffer= ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = draw_slice, | .draw_slice = draw_slice, | ||||
.end_frame = end_frame, }, | .end_frame = end_frame, }, | ||||
@@ -25,6 +25,7 @@ | |||||
#include "libavutil/mathematics.h" | #include "libavutil/mathematics.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct { | typedef struct { | ||||
AVRational aspect; | AVRational aspect; | ||||
@@ -100,9 +101,9 @@ AVFilter avfilter_vf_setdar = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.config_props = setdar_config_props, | .config_props = setdar_config_props, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.end_frame = avfilter_null_end_frame }, | |||||
.end_frame = ff_null_end_frame }, | |||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
@@ -133,9 +134,9 @@ AVFilter avfilter_vf_setsar = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.config_props = setsar_config_props, | .config_props = setsar_config_props, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.end_frame = avfilter_null_end_frame }, | |||||
.end_frame = ff_null_end_frame }, | |||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
@@ -28,6 +28,7 @@ | |||||
*/ | */ | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct { | typedef struct { | ||||
unsigned int bamount; ///< black amount | unsigned int bamount; ///< black amount | ||||
@@ -118,8 +119,8 @@ AVFilter avfilter_vf_blackframe = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.draw_slice = draw_slice, | .draw_slice = draw_slice, | ||||
.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, | |||||
.end_frame = end_frame, }, | .end_frame = end_frame, }, | ||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
@@ -22,6 +22,7 @@ | |||||
*/ | */ | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
AVFilter avfilter_vf_copy = { | AVFilter avfilter_vf_copy = { | ||||
.name = "copy", | .name = "copy", | ||||
@@ -29,9 +30,9 @@ AVFilter avfilter_vf_copy = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.start_frame = avfilter_null_start_frame, | |||||
.end_frame = avfilter_null_end_frame, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = ff_null_start_frame, | |||||
.end_frame = ff_null_end_frame, | |||||
.rej_perms = ~0 }, | .rej_perms = ~0 }, | ||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
@@ -26,6 +26,7 @@ | |||||
/* #define DEBUG */ | /* #define DEBUG */ | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
#include "libavutil/eval.h" | #include "libavutil/eval.h" | ||||
#include "libavutil/avstring.h" | #include "libavutil/avstring.h" | ||||
#include "libavutil/libm.h" | #include "libavutil/libm.h" | ||||
@@ -333,7 +334,7 @@ AVFilter avfilter_vf_crop = { | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = draw_slice, | .draw_slice = draw_slice, | ||||
.end_frame = end_frame, | .end_frame = end_frame, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.config_props = config_input, }, | .config_props = config_input, }, | ||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
@@ -25,6 +25,7 @@ | |||||
#include "libavutil/imgutils.h" | #include "libavutil/imgutils.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct { | typedef struct { | ||||
int x1, y1, x2, y2; | int x1, y1, x2, y2; | ||||
@@ -203,8 +204,8 @@ AVFilter avfilter_vf_cropdetect = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.config_props = config_input, | .config_props = config_input, | ||||
.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, | |||||
.end_frame = end_frame, }, | .end_frame = end_frame, }, | ||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
@@ -29,6 +29,7 @@ | |||||
#include "libavutil/opt.h" | #include "libavutil/opt.h" | ||||
#include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
/** | /** | ||||
* Apply a simple delogo algorithm to the image in dst and put the | * Apply a simple delogo algorithm to the image in dst and put the | ||||
@@ -271,7 +272,7 @@ AVFilter avfilter_vf_delogo = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = null_draw_slice, | .draw_slice = null_draw_slice, | ||||
.end_frame = end_frame, | .end_frame = end_frame, | ||||
@@ -28,6 +28,7 @@ | |||||
#include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||
#include "libavutil/parseutils.h" | #include "libavutil/parseutils.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
enum { Y, U, V, A }; | enum { Y, U, V, A }; | ||||
@@ -130,10 +131,10 @@ AVFilter avfilter_vf_drawbox = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.config_props = config_input, | .config_props = config_input, | ||||
.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, | .draw_slice = draw_slice, | ||||
.end_frame = avfilter_null_end_frame, | |||||
.end_frame = ff_null_end_frame, | |||||
.min_perms = AV_PERM_WRITE | AV_PERM_READ, | .min_perms = AV_PERM_WRITE | AV_PERM_READ, | ||||
.rej_perms = AV_PERM_PRESERVE }, | .rej_perms = AV_PERM_PRESERVE }, | ||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
@@ -41,6 +41,7 @@ | |||||
#include "libavutil/lfg.h" | #include "libavutil/lfg.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "drawutils.h" | #include "drawutils.h" | ||||
#include "video.h" | |||||
#undef time | #undef time | ||||
@@ -875,7 +876,7 @@ AVFilter avfilter_vf_drawtext = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = null_draw_slice, | .draw_slice = null_draw_slice, | ||||
.end_frame = end_frame, | .end_frame = end_frame, | ||||
@@ -27,6 +27,7 @@ | |||||
#include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct { | typedef struct { | ||||
int factor, fade_per_frame; | int factor, fade_per_frame; | ||||
@@ -157,8 +158,8 @@ AVFilter avfilter_vf_fade = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.config_props = config_props, | .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, | .draw_slice = draw_slice, | ||||
.end_frame = end_frame, | .end_frame = end_frame, | ||||
.min_perms = AV_PERM_READ | AV_PERM_WRITE, | .min_perms = AV_PERM_READ | AV_PERM_WRITE, | ||||
@@ -24,6 +24,7 @@ | |||||
*/ | */ | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct BufPic { | typedef struct BufPic { | ||||
AVFilterBufferRef *picref; | AVFilterBufferRef *picref; | ||||
@@ -106,7 +107,7 @@ AVFilter avfilter_vf_fifo = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer= avfilter_null_get_video_buffer, | |||||
.get_video_buffer= ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = draw_slice, | .draw_slice = draw_slice, | ||||
.end_frame = end_frame, | .end_frame = end_frame, | ||||
@@ -25,6 +25,7 @@ | |||||
#include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct { | typedef struct { | ||||
/** | /** | ||||
@@ -104,10 +105,10 @@ AVFilter avfilter_vf_format = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.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, }, | |||||
.get_video_buffer= ff_null_get_video_buffer, | |||||
.start_frame = ff_null_start_frame, | |||||
.draw_slice = ff_null_draw_slice, | |||||
.end_frame = ff_null_end_frame, }, | |||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO }, | .type = AVMEDIA_TYPE_VIDEO }, | ||||
@@ -134,10 +135,10 @@ AVFilter avfilter_vf_noformat = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.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, }, | |||||
.get_video_buffer= ff_null_get_video_buffer, | |||||
.start_frame = ff_null_start_frame, | |||||
.draw_slice = ff_null_draw_slice, | |||||
.end_frame = ff_null_end_frame, }, | |||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO }, | .type = AVMEDIA_TYPE_VIDEO }, | ||||
@@ -22,6 +22,7 @@ | |||||
*/ | */ | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
AVFilter avfilter_vf_null = { | AVFilter avfilter_vf_null = { | ||||
.name = "null", | .name = "null", | ||||
@@ -31,9 +32,9 @@ AVFilter avfilter_vf_null = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.start_frame = avfilter_null_start_frame, | |||||
.end_frame = avfilter_null_end_frame }, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = ff_null_start_frame, | |||||
.end_frame = ff_null_end_frame }, | |||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
@@ -27,6 +27,7 @@ | |||||
#include "libavutil/fifo.h" | #include "libavutil/fifo.h" | ||||
#include "libavutil/mathematics.h" | #include "libavutil/mathematics.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
static const char *const var_names[] = { | static const char *const var_names[] = { | ||||
"E", ///< Euler number | "E", ///< Euler number | ||||
@@ -339,7 +340,7 @@ AVFilter avfilter_vf_select = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.config_props = config_input, | .config_props = config_input, | ||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = draw_slice, | .draw_slice = draw_slice, | ||||
@@ -29,6 +29,7 @@ | |||||
#include "libavutil/eval.h" | #include "libavutil/eval.h" | ||||
#include "libavutil/mathematics.h" | #include "libavutil/mathematics.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
static const char *const var_names[] = { | static const char *const var_names[] = { | ||||
"E", ///< Euler number | "E", ///< Euler number | ||||
@@ -148,7 +149,7 @@ AVFilter avfilter_vf_setpts = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.config_props = config_input, | .config_props = config_input, | ||||
.start_frame = start_frame, }, | .start_frame = start_frame, }, | ||||
{ .name = NULL }}, | { .name = NULL }}, | ||||
@@ -29,6 +29,7 @@ | |||||
#include "libavutil/rational.h" | #include "libavutil/rational.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "internal.h" | #include "internal.h" | ||||
#include "video.h" | |||||
static const char *const var_names[] = { | static const char *const var_names[] = { | ||||
"E", | "E", | ||||
@@ -130,9 +131,9 @@ AVFilter avfilter_vf_settb = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.end_frame = avfilter_null_end_frame }, | |||||
.end_frame = ff_null_end_frame }, | |||||
{ .name = NULL }}, | { .name = NULL }}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
@@ -26,6 +26,7 @@ | |||||
#include "libavutil/imgutils.h" | #include "libavutil/imgutils.h" | ||||
#include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
typedef struct { | typedef struct { | ||||
unsigned int frame; | unsigned int frame; | ||||
@@ -86,8 +87,8 @@ AVFilter avfilter_vf_showinfo = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.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, | |||||
.end_frame = end_frame, | .end_frame = end_frame, | ||||
.min_perms = AV_PERM_READ, }, | .min_perms = AV_PERM_READ, }, | ||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
@@ -24,6 +24,7 @@ | |||||
*/ | */ | ||||
#include "avfilter.h" | #include "avfilter.h" | ||||
#include "video.h" | |||||
#include "libavutil/pixdesc.h" | #include "libavutil/pixdesc.h" | ||||
typedef struct { | typedef struct { | ||||
@@ -105,11 +106,11 @@ AVFilter avfilter_vf_slicify = { | |||||
.inputs = (AVFilterPad[]) {{ .name = "default", | .inputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, | .type = AVMEDIA_TYPE_VIDEO, | ||||
.get_video_buffer = avfilter_null_get_video_buffer, | |||||
.get_video_buffer = ff_null_get_video_buffer, | |||||
.start_frame = start_frame, | .start_frame = start_frame, | ||||
.draw_slice = draw_slice, | .draw_slice = draw_slice, | ||||
.config_props = config_props, | .config_props = config_props, | ||||
.end_frame = avfilter_null_end_frame, }, | |||||
.end_frame = ff_null_end_frame, }, | |||||
{ .name = NULL}}, | { .name = NULL}}, | ||||
.outputs = (AVFilterPad[]) {{ .name = "default", | .outputs = (AVFilterPad[]) {{ .name = "default", | ||||
.type = AVMEDIA_TYPE_VIDEO, }, | .type = AVMEDIA_TYPE_VIDEO, }, | ||||
@@ -65,7 +65,7 @@ static void ff_dlog_ref(void *ctx, AVFilterBufferRef *ref, int end) | |||||
av_dlog(ctx, "]%s", end ? "\n" : ""); | av_dlog(ctx, "]%s", end ? "\n" : ""); | ||||
} | } | ||||
AVFilterBufferRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h) | |||||
AVFilterBufferRef *ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h) | |||||
{ | { | ||||
return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h); | ||||
} | } | ||||
@@ -160,7 +160,7 @@ AVFilterBufferRef *avfilter_get_video_buffer(AVFilterLink *link, int perms, int | |||||
return ret; | return ret; | ||||
} | } | ||||
void avfilter_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) | |||||
void ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) | |||||
{ | { | ||||
avfilter_start_frame(link->dst->outputs[0], picref); | avfilter_start_frame(link->dst->outputs[0], picref); | ||||
} | } | ||||
@@ -211,7 +211,7 @@ void avfilter_start_frame(AVFilterLink *link, AVFilterBufferRef *picref) | |||||
start_frame(link, link->cur_buf); | start_frame(link, link->cur_buf); | ||||
} | } | ||||
void avfilter_null_end_frame(AVFilterLink *link) | |||||
void ff_null_end_frame(AVFilterLink *link) | |||||
{ | { | ||||
avfilter_end_frame(link->dst->outputs[0]); | avfilter_end_frame(link->dst->outputs[0]); | ||||
} | } | ||||
@@ -252,7 +252,7 @@ void avfilter_end_frame(AVFilterLink *link) | |||||
} | } | ||||
} | } | ||||
void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||
void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir) | |||||
{ | { | ||||
avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir); | avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir); | ||||
} | } | ||||
@@ -326,4 +326,20 @@ void avfilter_default_draw_slice(AVFilterLink *inlink, int y, int h, int slice_d | |||||
{ | { | ||||
default_draw_slice(inlink, y, h, 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); | |||||
} | |||||
#endif | #endif |
@@ -21,4 +21,10 @@ | |||||
AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link, | AVFilterBufferRef *ff_default_get_video_buffer(AVFilterLink *link, | ||||
int perms, int w, int h); | int perms, int w, int h); | ||||
AVFilterBufferRef *ff_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h); | |||||
void ff_null_start_frame(AVFilterLink *link, AVFilterBufferRef *picref); | |||||
void ff_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir); | |||||
void ff_null_end_frame(AVFilterLink *link); | |||||
#endif /* AVFILTER_VIDEO_H */ | #endif /* AVFILTER_VIDEO_H */ |