From 565e4993c63f797e2d50ad2f1e8f62fdbe299666 Mon Sep 17 00:00:00 2001 From: Anton Khirnov Date: Tue, 27 Nov 2012 07:49:45 +0100 Subject: lavfi: merge start_frame/draw_slice/end_frame Any alleged performance benefits gained from the split are purely mythological and do not justify added code complexity. --- libavfilter/avfilter.h | 44 +++++++------------------------------------- 1 file changed, 7 insertions(+), 37 deletions(-) (limited to 'libavfilter/avfilter.h') diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 01d39b6c0b..c5f8d56297 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -253,14 +253,7 @@ struct AVFilterPad { int rej_perms; /** - * Callback called before passing the first slice of a new frame. If - * NULL, the filter layer will default to storing a reference to the - * picture inside the link structure. - * - * Input video pads only. - * - * @return >= 0 on success, a negative AVERROR on error. picref will be - * unreferenced by the caller in case of error. + * @deprecated unused */ int (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref); @@ -282,37 +275,26 @@ struct AVFilterPad { int nb_samples); /** - * Callback called after the slices of a frame are completely sent. If - * NULL, the filter layer will default to releasing the reference stored - * in the link structure during start_frame(). - * - * Input video pads only. - * - * @return >= 0 on success, a negative AVERROR on error. + * @deprecated unused */ int (*end_frame)(AVFilterLink *link); /** - * Slice drawing callback. This is where a filter receives video data - * and should do its processing. - * - * Input video pads only. - * - * @return >= 0 on success, a negative AVERROR on error. + * @deprecated unused */ int (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir); /** - * Samples filtering callback. This is where a filter receives audio data - * and should do its processing. + * Filtering callback. This is where a filter receives a frame with + * audio/video data and should do its processing. * - * Input audio pads only. + * Input pads only. * * @return >= 0 on success, a negative AVERROR on error. This function * must ensure that samplesref is properly unreferenced on error if it * hasn't been passed on to another filter. */ - int (*filter_samples)(AVFilterLink *link, AVFilterBufferRef *samplesref); + int (*filter_frame)(AVFilterLink *link, AVFilterBufferRef *frame); /** * Frame poll callback. This returns the number of immediately available @@ -531,18 +513,6 @@ struct AVFilterLink { AVLINK_STARTINIT, ///< started, but incomplete AVLINK_INIT ///< complete } init_state; - - /** - * The buffer reference currently being sent across the link by the source - * filter. This is used internally by the filter system to allow - * automatic copying of buffers which do not have sufficient permissions - * for the destination. This should not be accessed directly by the - * filters. - */ - AVFilterBufferRef *src_buf; - - AVFilterBufferRef *cur_buf; - AVFilterBufferRef *out_buf; }; /** -- cgit v1.2.3