aboutsummaryrefslogtreecommitdiffstats
path: root/libavfilter/internal.h
diff options
context:
space:
mode:
authorNicolas George <nicolas.george@normalesup.org>2012-07-19 12:59:38 +0200
committerNicolas George <nicolas.george@normalesup.org>2012-07-20 13:16:24 +0200
commitcb6a20fa5616f707e5249c1e949442a2e51e0765 (patch)
tree49752a26f55b710d05ef3713b7e0d7e1e14ca193 /libavfilter/internal.h
parent461f506f7be0ebec9505e78a42a27a7feaeab63f (diff)
downloadandroid_external_ffmpeg-cb6a20fa5616f707e5249c1e949442a2e51e0765.tar.gz
android_external_ffmpeg-cb6a20fa5616f707e5249c1e949442a2e51e0765.tar.bz2
android_external_ffmpeg-cb6a20fa5616f707e5249c1e949442a2e51e0765.zip
lavfi: add FF_*LINK_IDX convenience macros.
Diffstat (limited to 'libavfilter/internal.h')
-rw-r--r--libavfilter/internal.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/libavfilter/internal.h b/libavfilter/internal.h
index b80a6fe1fa..5f0299cb83 100644
--- a/libavfilter/internal.h
+++ b/libavfilter/internal.h
@@ -350,4 +350,12 @@ int ff_request_frame(AVFilterLink *link);
AVFilterBufferRef *ff_copy_buffer_ref(AVFilterLink *outlink,
AVFilterBufferRef *ref);
+/**
+ * Find the index of a link.
+ *
+ * I.e. find i such that link == ctx->(in|out)puts[i]
+ */
+#define FF_INLINK_IDX(link) ((int)((link)->dstpad - (link)->dst->input_pads))
+#define FF_OUTLINK_IDX(link) ((int)((link)->srcpad - (link)->src->output_pads))
+
#endif /* AVFILTER_INTERNAL_H */