summaryrefslogtreecommitdiff
path: root/libavfilter/filters.h
diff options
context:
space:
mode:
authorNicolas George <george@nsup.org>2017-07-17 14:34:41 +0200
committerNicolas George <george@nsup.org>2017-07-30 12:24:00 +0200
commited1c884b9e0d7f63199d5d47350b1fa65374d126 (patch)
tree7e51899efea5dcb401c7a4c96b38f8022362f526 /libavfilter/filters.h
parentb77f041dff5f669d1d297697a34023de1c33a33f (diff)
downloadffmpeg-ed1c884b9e0d7f63199d5d47350b1fa65374d126.tar.gz
lavfi: add outlink helper functions.
These wrappers cost nothing, they make the namespace more consistent and they will be useful if/when locking becomes necessary.
Diffstat (limited to 'libavfilter/filters.h')
-rw-r--r--libavfilter/filters.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/libavfilter/filters.h b/libavfilter/filters.h
index 370d99b38b..1cbc18158f 100644
--- a/libavfilter/filters.h
+++ b/libavfilter/filters.h
@@ -26,6 +26,7 @@
*/
#include "avfilter.h"
+#include "internal.h"
/**
* Special return code when activate() did not do anything.
@@ -139,4 +140,24 @@ int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts
*/
void ff_inlink_request_frame(AVFilterLink *link);
+/**
+ * Test if a frame is wanted on an output link.
+ */
+static inline int ff_outlink_frame_wanted(AVFilterLink *link)
+{
+ return link->frame_wanted_out;
+}
+
+/**
+ * Set the status field of a link from the source filter.
+ * The pts should reflect the timestamp of the status change,
+ * in link time base and relative to the frames timeline.
+ * In particular, for AVERROR_EOF, it should reflect the
+ * end time of the last frame.
+ */
+static inline void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
+{
+ ff_avfilter_link_set_in_status(link, status, pts);
+}
+
#endif /* AVFILTER_FILTERS_H */