summaryrefslogtreecommitdiffstats
path: root/libavfilter/avfilter.h
diff options
context:
space:
mode:
authorClément Bœsch <ubitux@gmail.com>2013-05-09 01:04:41 +0200
committerClément Bœsch <ubitux@gmail.com>2013-05-12 13:07:47 +0200
commit1776177b7f1ae67ad3b42d99464b141ee4082310 (patch)
tree1044d44ef5459e4706b639eea2923472420dcbd7 /libavfilter/avfilter.h
parent60f0e304312d0fe1d26f7344cb86dc4cdab52b15 (diff)
downloadffmpeg-streaming-1776177b7f1ae67ad3b42d99464b141ee4082310.zip
ffmpeg-streaming-1776177b7f1ae67ad3b42d99464b141ee4082310.tar.gz
lavfi: replace passthrough_filter_frame with a flag.
With the introduction of AVFilterContext->is_disabled, we can simplify the custom passthrough mode in filters. This commit is technically a small compat break, but the timeline was introduced very recently. Doxy by Stefano Sabatini.
Diffstat (limited to 'libavfilter/avfilter.h')
-rw-r--r--libavfilter/avfilter.h33
1 files changed, 18 insertions, 15 deletions
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index a79c86c..822eca7 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -385,19 +385,6 @@ struct AVFilterPad {
int needs_fifo;
int needs_writable;
-
- /**
- * Passthrough filtering callback.
- *
- * If a filter supports timeline editing (in case
- * AVFILTER_FLAG_SUPPORT_TIMELINE is enabled) then it can implement a
- * custom passthrough callback to update its local context (for example to
- * keep a frame reference, or simply send the filter to a custom outlink).
- * The filter must not do any change to the frame in this callback.
- *
- * Input pads only.
- */
- int (*passthrough_filter_frame)(AVFilterLink *link, AVFrame *frame);
};
#endif
@@ -444,9 +431,25 @@ enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
/**
* Some filters support a generic "enable" expression option that can be used
* to enable or disable a filter in the timeline. Filters supporting this
- * option have this flag set.
+ * option have this flag set. When the enable expression is false, the default
+ * no-op filter_frame() function is called in place of the filter_frame()
+ * callback defined on each input pad, thus the frame is passed unchanged to
+ * the next filters.
+ */
+#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC (1 << 16)
+/**
+ * Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will
+ * have its filter_frame() callback(s) called as usual even when the enable
+ * expression is false. The filter will disable filtering within the
+ * filter_frame() callback(s) itself, for example executing code depending on
+ * the AVFilterContext->is_disabled value.
+ */
+#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL (1 << 17)
+/**
+ * Handy mask to test whether the filter supports or no the timeline feature
+ * (internally or generically).
*/
-#define AVFILTER_FLAG_SUPPORT_TIMELINE (1 << 16)
+#define AVFILTER_FLAG_SUPPORT_TIMELINE (AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC | AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL)
/**
* Filter definition. This defines the pads a filter contains, and all the
OpenPOWER on IntegriCloud