diff options
author | Anton Khirnov <anton@khirnov.net> | 2012-11-28 08:41:07 +0100 |
---|---|---|
committer | Anton Khirnov <anton@khirnov.net> | 2013-03-08 07:37:18 +0100 |
commit | 7e350379f87e7f74420b4813170fe808e2313911 (patch) | |
tree | 031201839361d40af8b4c829f9c9f179e7d9f58d /libavfilter/avfilter.h | |
parent | 77b2cd7b41d7ec8008b6fac753c04f77824c514c (diff) | |
download | ffmpeg-7e350379f87e7f74420b4813170fe808e2313911.tar.gz |
lavfi: switch to AVFrame.
Deprecate AVFilterBuffer/AVFilterBufferRef and everything related to it
and use AVFrame instead.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r-- | libavfilter/avfilter.h | 28 |
1 files changed, 22 insertions, 6 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h index c5f8d56297..b3522f87d3 100644 --- a/libavfilter/avfilter.h +++ b/libavfilter/avfilter.h @@ -23,6 +23,7 @@ #define AVFILTER_AVFILTER_H #include "libavutil/avutil.h" +#include "libavutil/frame.h" #include "libavutil/log.h" #include "libavutil/samplefmt.h" #include "libavutil/pixfmt.h" @@ -54,6 +55,7 @@ typedef struct AVFilterLink AVFilterLink; typedef struct AVFilterPad AVFilterPad; typedef struct AVFilterFormats AVFilterFormats; +#if FF_API_AVFILTERBUFFER /** * A reference-counted buffer data type used by the filter system. Filters * should not store pointers to this structure directly, but instead use the @@ -177,6 +179,7 @@ typedef struct AVFilterBufferRef { /** * Copy properties of src to dst, without copying the actual data */ +attribute_deprecated void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *src); /** @@ -188,6 +191,7 @@ void avfilter_copy_buffer_ref_props(AVFilterBufferRef *dst, AVFilterBufferRef *s * @return a new reference to the buffer with the same properties as the * old, excluding any permissions denied by pmask */ +attribute_deprecated AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask); /** @@ -199,6 +203,7 @@ AVFilterBufferRef *avfilter_ref_buffer(AVFilterBufferRef *ref, int pmask); * @note it is recommended to use avfilter_unref_bufferp() instead of this * function */ +attribute_deprecated void avfilter_unref_buffer(AVFilterBufferRef *ref); /** @@ -208,7 +213,9 @@ void avfilter_unref_buffer(AVFilterBufferRef *ref); * * @param ref pointer to the buffer reference */ +attribute_deprecated void avfilter_unref_bufferp(AVFilterBufferRef **ref); +#endif #if FF_API_AVFILTERPAD_PUBLIC /** @@ -239,7 +246,7 @@ struct AVFilterPad { * * Input pads only. */ - int min_perms; + attribute_deprecated int min_perms; /** * Permissions which are not accepted on incoming buffers. Any buffer @@ -250,7 +257,7 @@ struct AVFilterPad { * * Input pads only. */ - int rej_perms; + attribute_deprecated int rej_perms; /** * @deprecated unused @@ -263,7 +270,7 @@ struct AVFilterPad { * * Input video pads only. */ - AVFilterBufferRef *(*get_video_buffer)(AVFilterLink *link, int perms, int w, int h); + AVFrame *(*get_video_buffer)(AVFilterLink *link, int w, int h); /** * Callback function to get an audio buffer. If NULL, the filter system will @@ -271,8 +278,7 @@ struct AVFilterPad { * * Input audio pads only. */ - AVFilterBufferRef *(*get_audio_buffer)(AVFilterLink *link, int perms, - int nb_samples); + AVFrame *(*get_audio_buffer)(AVFilterLink *link, int nb_samples); /** * @deprecated unused @@ -294,7 +300,7 @@ struct AVFilterPad { * must ensure that samplesref is properly unreferenced on error if it * hasn't been passed on to another filter. */ - int (*filter_frame)(AVFilterLink *link, AVFilterBufferRef *frame); + int (*filter_frame)(AVFilterLink *link, AVFrame *frame); /** * Frame poll callback. This returns the number of immediately available @@ -339,6 +345,8 @@ struct AVFilterPad { * input pads only. */ int needs_fifo; + + int needs_writable; }; #endif @@ -535,6 +543,7 @@ int avfilter_link(AVFilterContext *src, unsigned srcpad, */ int avfilter_config_links(AVFilterContext *filter); +#if FF_API_AVFILTERBUFFER /** * Create a buffer reference wrapped around an already allocated image * buffer. @@ -546,6 +555,7 @@ int avfilter_config_links(AVFilterContext *filter); * @param h the height of the image specified by the data and linesize arrays * @param format the pixel format of the image specified by the data and linesize arrays */ +attribute_deprecated AVFilterBufferRef * avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int perms, int w, int h, enum AVPixelFormat format); @@ -561,12 +571,14 @@ avfilter_get_video_buffer_ref_from_arrays(uint8_t *data[4], int linesize[4], int * @param sample_fmt the format of each sample in the buffer to allocate * @param channel_layout the channel layout of the buffer */ +attribute_deprecated AVFilterBufferRef *avfilter_get_audio_buffer_ref_from_arrays(uint8_t **data, int linesize, int perms, int nb_samples, enum AVSampleFormat sample_fmt, uint64_t channel_layout); +#endif /** Initialize the filter system. Register all builtin filters. */ void avfilter_register_all(void); @@ -645,12 +657,14 @@ void avfilter_free(AVFilterContext *filter); int avfilter_insert_filter(AVFilterLink *link, AVFilterContext *filt, unsigned filt_srcpad_idx, unsigned filt_dstpad_idx); +#if FF_API_AVFILTERBUFFER /** * Copy the frame properties of src to dst, without copying the actual * image data. * * @return 0 on success, a negative number on error. */ +attribute_deprecated int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src); /** @@ -659,6 +673,8 @@ int avfilter_copy_frame_props(AVFilterBufferRef *dst, const AVFrame *src); * * @return 0 on success, a negative number on error. */ +attribute_deprecated int avfilter_copy_buf_props(AVFrame *dst, const AVFilterBufferRef *src); +#endif #endif /* AVFILTER_AVFILTER_H */ |