diff --git a/libavfilter/avfilter.c b/libavfilter/avfilter.c index 843ac98919ec13022eee7a2d18deeef05d14d739..6fc3f3d904419906fcfe722a26a81806dd8621b9 100644 --- a/libavfilter/avfilter.c +++ b/libavfilter/avfilter.c @@ -501,19 +501,10 @@ AVFilter *avfilter_get_by_name(const char *name) int avfilter_register(AVFilter *filter) { AVFilter **f = last_filter; - int i; /* the filter must select generic or internal exclusively */ av_assert0((filter->flags & AVFILTER_FLAG_SUPPORT_TIMELINE) != AVFILTER_FLAG_SUPPORT_TIMELINE); - for(i=0; filter->inputs && filter->inputs[i].name; i++) { - const AVFilterPad *input = &filter->inputs[i]; -#if FF_API_AVFILTERPAD_PUBLIC - av_assert0( !input->filter_frame - || (!input->start_frame && !input->end_frame)); -#endif - } - filter->next = NULL; while(*f || avpriv_atomic_ptr_cas((void * volatile *)f, NULL, filter)) diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index 584623f0b6c6a21311dc42fd56f88168d244b99f..6684ab5aa8bbee2310c279b8874cb2846c5d18e3 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -242,159 +242,6 @@ attribute_deprecated int avfilter_ref_get_channels(AVFilterBufferRef *ref); #endif -#if FF_API_AVFILTERPAD_PUBLIC -/** - * A filter pad used for either input or output. - * - * See doc/filter_design.txt for details on how to implement the methods. - * - * @warning this struct might be removed from public API. - * users should call avfilter_pad_get_name() and avfilter_pad_get_type() - * to access the name and type fields; there should be no need to access - * any other fields from outside of libavfilter. - */ -struct AVFilterPad { - /** - * Pad name. The name is unique among inputs and among outputs, but an - * input may have the same name as an output. This may be NULL if this - * pad has no need to ever be referenced by name. - */ - const char *name; - - /** - * AVFilterPad type. - */ - enum AVMediaType type; - - /** - * Input pads: - * Minimum required permissions on incoming buffers. Any buffer with - * insufficient permissions will be automatically copied by the filter - * system to a new buffer which provides the needed access permissions. - * - * Output pads: - * Guaranteed permissions on outgoing buffers. Any buffer pushed on the - * link must have at least these permissions; this fact is checked by - * asserts. It can be used to optimize buffer allocation. - */ - attribute_deprecated int min_perms; - - /** - * Input pads: - * Permissions which are not accepted on incoming buffers. Any buffer - * which has any of these permissions set will be automatically copied - * by the filter system to a new buffer which does not have those - * permissions. This can be used to easily disallow buffers with - * AV_PERM_REUSE. - * - * Output pads: - * Permissions which are automatically removed on outgoing buffers. It - * can be used to optimize buffer allocation. - */ - attribute_deprecated int rej_perms; - - /** - * @deprecated unused - */ - int (*start_frame)(AVFilterLink *link, AVFilterBufferRef *picref); - - /** - * Callback function to get a video buffer. If NULL, the filter system will - * use ff_default_get_video_buffer(). - * - * Input video pads only. - */ - AVFrame *(*get_video_buffer)(AVFilterLink *link, int w, int h); - - /** - * Callback function to get an audio buffer. If NULL, the filter system will - * use ff_default_get_audio_buffer(). - * - * Input audio pads only. - */ - AVFrame *(*get_audio_buffer)(AVFilterLink *link, int nb_samples); - - /** - * @deprecated unused - */ - int (*end_frame)(AVFilterLink *link); - - /** - * @deprecated unused - */ - int (*draw_slice)(AVFilterLink *link, int y, int height, int slice_dir); - - /** - * Filtering callback. This is where a filter receives a frame with - * audio/video data and should do its processing. - * - * Input pads only. - * - * @return >= 0 on success, a negative AVERROR on error. This function - * must ensure that frame is properly unreferenced on error if it - * hasn't been passed on to another filter. - */ - int (*filter_frame)(AVFilterLink *link, AVFrame *frame); - - /** - * Frame poll callback. This returns the number of immediately available - * samples. It should return a positive value if the next request_frame() - * is guaranteed to return one frame (with no delay). - * - * Defaults to just calling the source poll_frame() method. - * - * Output pads only. - */ - int (*poll_frame)(AVFilterLink *link); - - /** - * Frame request callback. A call to this should result in at least one - * frame being output over the given link. This should return zero on - * success, and another value on error. - * See ff_request_frame() for the error codes with a specific - * meaning. - * - * Output pads only. - */ - int (*request_frame)(AVFilterLink *link); - - /** - * Link configuration callback. - * - * For output pads, this should set the following link properties: - * video: width, height, sample_aspect_ratio, time_base - * audio: sample_rate. - * - * This should NOT set properties such as format, channel_layout, etc which - * are negotiated between filters by the filter system using the - * query_formats() callback before this function is called. - * - * For input pads, this should check the properties of the link, and update - * the filter's internal state as necessary. - * - * For both input and output pads, this should return zero on success, - * and another value on error. - */ - int (*config_props)(AVFilterLink *link); - - /** - * The filter expects a fifo to be inserted on its input link, - * typically because it has a delay. - * - * input pads only. - */ - int needs_fifo; - - /** - * The filter expects writable frames from its input link, - * duplicating data buffers if needed. - * - * input pads only. - */ - int needs_writable; -}; -#endif - /** * Get the number of elements in a NULL-terminated array of AVFilterPads (e.g. * AVFilter.inputs/outputs). diff --git a/libavfilter/internal.h b/libavfilter/internal.h index 7dde2e133496f8f7dc3dc4cc09faf4b49dc0d2fa..75c34360e435c9c6893915bc4e27d1c85913c5f3 100644 --- a/libavfilter/internal.h +++ b/libavfilter/internal.h @@ -56,7 +56,6 @@ typedef struct AVFilterCommand { */ void ff_avfilter_graph_update_heap(AVFilterGraph *graph, AVFilterLink *link); -#if !FF_API_AVFILTERPAD_PUBLIC /** * A filter pad used for either input or output. */ @@ -153,7 +152,6 @@ struct AVFilterPad { */ int needs_writable; }; -#endif struct AVFilterGraphInternal { void *thread; diff --git a/libavfilter/version.h b/libavfilter/version.h index 81450780347eae59ab8934ed083f1857a80778cf..551823bb33fefc6d2e8c6d14e76d269e36f35743 100644 --- a/libavfilter/version.h +++ b/libavfilter/version.h @@ -49,9 +49,6 @@ * the public API and may change, break or disappear at any time. */ -#ifndef FF_API_AVFILTERPAD_PUBLIC -#define FF_API_AVFILTERPAD_PUBLIC (LIBAVFILTER_VERSION_MAJOR < 6) -#endif #ifndef FF_API_FOO_COUNT #define FF_API_FOO_COUNT (LIBAVFILTER_VERSION_MAJOR < 6) #endif