summaryrefslogtreecommitdiffstats
path: root/libavfilter
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2013-03-28 08:51:36 +0100
committerAnton Khirnov <anton@khirnov.net>2013-04-11 20:42:41 +0200
commit7cdd737ba81b5c2c9521c4509edf0ac315fabc65 (patch)
treed8947361ed1e2ca37eeca1bd86836769a66fa82c /libavfilter
parent1ba95a9cca57b023b9b9de071a5671fc05b05e58 (diff)
downloadffmpeg-streaming-7cdd737ba81b5c2c9521c4509edf0ac315fabc65.zip
ffmpeg-streaming-7cdd737ba81b5c2c9521c4509edf0ac315fabc65.tar.gz
lavfi: mark filters with dynamic number of inputs or outputs with special flags
This will be useful in avtools in the following commits. Any other caller might also want to know this information.
Diffstat (limited to 'libavfilter')
-rw-r--r--libavfilter/af_amix.c2
-rw-r--r--libavfilter/af_channelsplit.c2
-rw-r--r--libavfilter/af_join.c2
-rw-r--r--libavfilter/avfilter.h18
-rw-r--r--libavfilter/split.c4
5 files changed, 28 insertions, 0 deletions
diff --git a/libavfilter/af_amix.c b/libavfilter/af_amix.c
index f7f003b..6bc7458 100644
--- a/libavfilter/af_amix.c
+++ b/libavfilter/af_amix.c
@@ -562,4 +562,6 @@ AVFilter avfilter_af_amix = {
.inputs = NULL,
.outputs = avfilter_af_amix_outputs,
+
+ .flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
};
diff --git a/libavfilter/af_channelsplit.c b/libavfilter/af_channelsplit.c
index fcdc34e..fde5985 100644
--- a/libavfilter/af_channelsplit.c
+++ b/libavfilter/af_channelsplit.c
@@ -149,4 +149,6 @@ AVFilter avfilter_af_channelsplit = {
.inputs = avfilter_af_channelsplit_inputs,
.outputs = NULL,
+
+ .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
};
diff --git a/libavfilter/af_join.c b/libavfilter/af_join.c
index a06812e..02bc8c8 100644
--- a/libavfilter/af_join.c
+++ b/libavfilter/af_join.c
@@ -522,4 +522,6 @@ AVFilter avfilter_af_join = {
.inputs = NULL,
.outputs = avfilter_af_join_outputs,
+
+ .flags = AVFILTER_FLAG_DYNAMIC_INPUTS,
};
diff --git a/libavfilter/avfilter.h b/libavfilter/avfilter.h
index dffb2e5..dd29ec0 100644
--- a/libavfilter/avfilter.h
+++ b/libavfilter/avfilter.h
@@ -373,6 +373,19 @@ const char *avfilter_pad_get_name(const AVFilterPad *pads, int pad_idx);
enum AVMediaType avfilter_pad_get_type(const AVFilterPad *pads, int pad_idx);
/**
+ * The number of the filter inputs is not determined just by AVFilter.inputs.
+ * The filter might add additional inputs during initialization depending on the
+ * options supplied to it.
+ */
+#define AVFILTER_FLAG_DYNAMIC_INPUTS (1 << 0)
+/**
+ * The number of the filter outputs is not determined just by AVFilter.outputs.
+ * The filter might add additional outputs during initialization depending on
+ * the options supplied to it.
+ */
+#define AVFILTER_FLAG_DYNAMIC_OUTPUTS (1 << 1)
+
+/**
* Filter definition. This defines the pads a filter contains, and all the
* callback functions used to interact with the filter.
*/
@@ -394,6 +407,11 @@ typedef struct AVFilter {
*/
const AVClass *priv_class;
+ /**
+ * A combination of AVFILTER_FLAG_*
+ */
+ int flags;
+
/*****************************************************************
* All fields below this line are not part of the public API. They
* may not be used outside of libavfilter and can be changed and
diff --git a/libavfilter/split.c b/libavfilter/split.c
index 7e8b4cc..8c03de5 100644
--- a/libavfilter/split.c
+++ b/libavfilter/split.c
@@ -129,6 +129,8 @@ AVFilter avfilter_vf_split = {
.inputs = avfilter_vf_split_inputs,
.outputs = NULL,
+
+ .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
};
static const AVFilterPad avfilter_af_asplit_inputs[] = {
@@ -153,4 +155,6 @@ AVFilter avfilter_af_asplit = {
.inputs = avfilter_af_asplit_inputs,
.outputs = NULL,
+
+ .flags = AVFILTER_FLAG_DYNAMIC_OUTPUTS,
};
OpenPOWER on IntegriCloud