Commit 2f6af636 authored by koorogi's avatar koorogi

Create a set of null callback functions.

These are useful for filters which don't modify the image data.

git-svn-id: file:///var/local/repositories/ffmpeg/trunk@22594 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 826b250d
...@@ -395,6 +395,19 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats) ...@@ -395,6 +395,19 @@ void avfilter_set_common_formats(AVFilterContext *ctx, AVFilterFormats *formats)
/** Default handler for query_formats() */ /** Default handler for query_formats() */
int avfilter_default_query_formats(AVFilterContext *ctx); int avfilter_default_query_formats(AVFilterContext *ctx);
/** start_frame() handler for filters which simply pass video along */
void avfilter_null_start_frame(AVFilterLink *link, AVFilterPicRef *picref);
/** draw_slice() handler for filters which simply pass video along */
void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir);
/** end_frame() handler for filters which simply pass video along */
void avfilter_null_end_frame(AVFilterLink *link);
/** get_video_buffer() handler for filters which simply pass video along */
AVFilterPicRef *avfilter_null_get_video_buffer(AVFilterLink *link,
int perms, int w, int h);
/** /**
* Filter definition. This defines the pads a filter contains, and all the * Filter definition. This defines the pads a filter contains, and all the
* callback functions used to interact with the filter. * callback functions used to interact with the filter.
......
...@@ -165,3 +165,23 @@ int avfilter_default_query_formats(AVFilterContext *ctx) ...@@ -165,3 +165,23 @@ int avfilter_default_query_formats(AVFilterContext *ctx)
return 0; return 0;
} }
void avfilter_null_start_frame(AVFilterLink *link, AVFilterPicRef *picref)
{
avfilter_start_frame(link->dst->outputs[0], picref);
}
void avfilter_null_draw_slice(AVFilterLink *link, int y, int h, int slice_dir)
{
avfilter_draw_slice(link->dst->outputs[0], y, h, slice_dir);
}
void avfilter_null_end_frame(AVFilterLink *link)
{
avfilter_end_frame(link->dst->outputs[0]);
}
AVFilterPicRef *avfilter_null_get_video_buffer(AVFilterLink *link, int perms, int w, int h)
{
return avfilter_get_video_buffer(link->dst->outputs[0], perms, w, h);
}
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