History

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

Vitor Sessak committed 18 years ago

Commit d3e57c11 parent 4d96a911 file · +17 −4Browse files

Unified · Split

libavfilter/avfilter.h+17−4
@@ -98,6 +98,13 @@ struct AVFilterPad · 97 unmodified lines
9898 int type;
9999 #define AV_PAD_VIDEO 0
100100
101+ /**
102+ * Callback to get a list of supported formats. The returned list should
103+ * be terminated by -1. This is used for both input and output pads and
104+ * is required for both.
105+ */
106+ int *(*query_formats)(AVFilterLink *link);
107+
101108 /**
102109 * Callback called before passing the first slice of a new frame. If
103110 * NULL, the filter layer will default to storing a reference to the
@@ -131,11 +138,15 @@ struct AVFilterPad · 27 unmodified lines
131138 void (*request_frame)(AVFilterLink *link);
132139
133140 /**
134− * Callback to set properties of the link. Only for video output pads.
135− * XXX: this is not acceptable as is. it needs reworked to allow for
136− * negotiation of colorspace, etc.
141+ * Link configuration callback. For output pads, this should set the link
142+ * properties such as width/height. NOTE: this should not set the format
143+ * property - that is negotiated between filters by the filter system using
144+ * the query_formats() callback.
145+ *
146+ * For input pads, this should check the properties of the link, and update
147+ * the filter's internal state as necessary.
137148 */
138− int (*set_video_props)(AVFilterLink *link);
149+ int (*config_props)(AVFilterLink *link);
139150 };
140151
141152 /* the default implementations of start_frame() and end_frame() */
@@ -206,4 +217,6 @@ AVFilterContext *avfilter_create_by_name(char *name); · 64 unmodified lines
206217 int avfilter_init_filter(AVFilterContext *filter, const char *args);
207218 void avfilter_destroy(AVFilterContext *filter);
208219
220+int *avfilter_make_format_list(int len, ...);
221+
209222 #endif /* FFMPEG_AVFILTER_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t