Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefano Sabatini <stefano.sabatini-lala@poste.it>2009-10-18 12:16:18 +0400
committerStefano Sabatini <stefano.sabatini-lala@poste.it>2009-10-18 12:16:18 +0400
commit0eb4ff9e37f2b44bcf143c9b503609cea5db13cb (patch)
tree9d4e1147fb92cb99fe7828d562c2990b5183ccce /libavfilter/avfilter.h
parent1f09ab5e6665d0cae34fe4b378f16268e712e748 (diff)
Make avfilter_get_video_buffer() recursive.
When called on a link with a filter whose destination pad has not a get_video_buffer callback defined, it will call avfilter_get_video_buffer() on the first output link of the destination filer, rather than use avfilter_default_get_buffer(), so the video buffer can be allocated forward in the filterchain. Also add the w and h parameters to avfilter_get_video_buffer(), as the minimum width and height requested by each filter in the filterchain may change, this allows for example a memcpy-less pad filter. This change breaks API / ABI backward compatibility. See the thread: "[PATCH] Implement recusive avfilter_get_video_buffer()". Originally committed as revision 20272 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 9c282e278c..2b17dea2a6 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -22,9 +22,9 @@
#ifndef AVFILTER_AVFILTER_H
#define AVFILTER_AVFILTER_H
-#define LIBAVFILTER_VERSION_MAJOR 0
-#define LIBAVFILTER_VERSION_MINOR 5
-#define LIBAVFILTER_VERSION_MICRO 1
+#define LIBAVFILTER_VERSION_MAJOR 1
+#define LIBAVFILTER_VERSION_MINOR 0
+#define LIBAVFILTER_VERSION_MICRO 0
#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \
LIBAVFILTER_VERSION_MINOR, \
@@ -293,7 +293,7 @@ struct AVFilterPad
*
* Input video pads only.
*/
- AVFilterPicRef *(*get_video_buffer)(AVFilterLink *link, int perms);
+ AVFilterPicRef *(*get_video_buffer)(AVFilterLink *link, int perms, int w, int h);
/**
* Callback called after the slices of a frame are completely sent. If
@@ -361,7 +361,7 @@ int avfilter_default_config_output_link(AVFilterLink *link);
int avfilter_default_config_input_link (AVFilterLink *link);
/** default handler for get_video_buffer() for video inputs */
AVFilterPicRef *avfilter_default_get_video_buffer(AVFilterLink *link,
- int perms);
+ int perms, int w, int h);
/**
* A helper for query_formats() which sets all links to the same list of
* formats. If there are no links hooked to this filter, the list of formats is
@@ -499,10 +499,13 @@ int avfilter_config_links(AVFilterContext *filter);
* @param link the output link to the filter from which the picture will
* be requested
* @param perms the required access permissions
+ * @param w the minimum width of the buffer to allocate
+ * @param h the minimum height of the buffer to allocate
* @return A reference to the picture. This must be unreferenced with
* avfilter_unref_pic when you are finished with it.
*/
-AVFilterPicRef *avfilter_get_video_buffer(AVFilterLink *link, int perms);
+AVFilterPicRef *avfilter_get_video_buffer(AVFilterLink *link, int perms,
+ int w, int h);
/**
* Requests an input frame from the filter at the other end of the link.