summaryrefslogtreecommitdiff
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorVitor Sessak <vitor1001@gmail.com>2008-02-15 22:12:41 +0000
committerVitor Sessak <vitor1001@gmail.com>2008-02-15 22:12:41 +0000
commitd3e57c15cfbaa1bbabb0c718c4e5c969c18f4181 (patch)
tree4b5f06ed6087de229f7f5bee4a30f5f113118e25 /libavfilter/avfilter.h
parent4d96a914f9efab2650811932ccf3d213bd8e0729 (diff)
Rework filter initialization sequence. Now supports passing user parameters,
querying supported colorspaces, etc. Commited in SoC by Bobby Bingham on 2007-07-05 20:48:48 Originally committed as revision 12080 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index 2e50467633..ed445dae84 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -99,6 +99,13 @@ struct AVFilterPad
#define AV_PAD_VIDEO 0
/**
+ * Callback to get a list of supported formats. The returned list should
+ * be terminated by -1. This is used for both input and output pads and
+ * is required for both.
+ */
+ int *(*query_formats)(AVFilterLink *link);
+
+ /**
* 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.
@@ -131,11 +138,15 @@ struct AVFilterPad
void (*request_frame)(AVFilterLink *link);
/**
- * Callback to set properties of the link. Only for video output pads.
- * XXX: this is not acceptable as is. it needs reworked to allow for
- * negotiation of colorspace, etc.
+ * Link configuration callback. For output pads, this should set the link
+ * properties such as width/height. NOTE: this should not set the format
+ * property - that is negotiated between filters by the filter system using
+ * the query_formats() callback.
+ *
+ * For input pads, this should check the properties of the link, and update
+ * the filter's internal state as necessary.
*/
- int (*set_video_props)(AVFilterLink *link);
+ int (*config_props)(AVFilterLink *link);
};
/* the default implementations of start_frame() and end_frame() */
@@ -206,4 +217,6 @@ AVFilterContext *avfilter_create_by_name(char *name);
int avfilter_init_filter(AVFilterContext *filter, const char *args);
void avfilter_destroy(AVFilterContext *filter);
+int *avfilter_make_format_list(int len, ...);
+
#endif /* FFMPEG_AVFILTER_H */