* commit 'dd7fc37c71955b78a2687f29e871f714d18de386':
af_join: switch to an AVOptions-based system.
Conflicts:
doc/filters.texi
libavfilter/af_join.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
... | ... |
@@ -1245,7 +1245,7 @@ Number of input streams. Defaults to 2. |
1245 | 1245 |
Desired output channel layout. Defaults to stereo. |
1246 | 1246 |
|
1247 | 1247 |
@item map |
1248 |
-Map channels from inputs to output. The argument is a comma-separated list of |
|
1248 |
+Map channels from inputs to output. The argument is a '|'-separated list of |
|
1249 | 1249 |
mappings, each in the @code{@var{input_idx}.@var{in_channel}-@var{out_channel}} |
1250 | 1250 |
form. @var{input_idx} is the 0-based index of the input stream. @var{in_channel} |
1251 | 1251 |
can be either the name of the input channel (e.g. FL for front left) or its |
... | ... |
@@ -1265,7 +1265,7 @@ ffmpeg -i INPUT1 -i INPUT2 -i INPUT3 -filter_complex join=inputs=3 OUTPUT |
1265 | 1265 |
To build a 5.1 output from 6 single-channel streams: |
1266 | 1266 |
@example |
1267 | 1267 |
ffmpeg -i fl -i fr -i fc -i sl -i sr -i lfe -filter_complex |
1268 |
-'join=inputs=6:channel_layout=5.1:map=0.0-FL\,1.0-FR\,2.0-FC\,3.0-SL\,4.0-SR\,5.0-LFE' |
|
1268 |
+'join=inputs=6:channel_layout=5.1:map=0.0-FL|1.0-FR|2.0-FC|3.0-SL|4.0-SR|5.0-LFE' |
|
1269 | 1269 |
out |
1270 | 1270 |
@end example |
1271 | 1271 |
|
... | ... |
@@ -103,14 +103,23 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame) |
103 | 103 |
static int parse_maps(AVFilterContext *ctx) |
104 | 104 |
{ |
105 | 105 |
JoinContext *s = ctx->priv; |
106 |
+ char separator = '|'; |
|
106 | 107 |
char *cur = s->map; |
107 | 108 |
|
109 |
+#if FF_API_OLD_FILTER_OPTS |
|
110 |
+ if (cur && strchr(cur, ',')) { |
|
111 |
+ av_log(ctx, AV_LOG_WARNING, "This syntax is deprecated, use '|' to " |
|
112 |
+ "separate the mappings.\n"); |
|
113 |
+ separator = ','; |
|
114 |
+ } |
|
115 |
+#endif |
|
116 |
+ |
|
108 | 117 |
while (cur && *cur) { |
109 | 118 |
char *sep, *next, *p; |
110 | 119 |
uint64_t in_channel = 0, out_channel = 0; |
111 | 120 |
int input_idx, out_ch_idx, in_ch_idx; |
112 | 121 |
|
113 |
- next = strchr(cur, ','); |
|
122 |
+ next = strchr(cur, separator); |
|
114 | 123 |
if (next) |
115 | 124 |
*next++ = 0; |
116 | 125 |
|
... | ... |
@@ -183,11 +192,6 @@ static int join_init(AVFilterContext *ctx, const char *args) |
183 | 183 |
JoinContext *s = ctx->priv; |
184 | 184 |
int ret, i; |
185 | 185 |
|
186 |
- s->class = &join_class; |
|
187 |
- av_opt_set_defaults(s); |
|
188 |
- if ((ret = av_set_options_string(s, args, "=", ":")) < 0) |
|
189 |
- return ret; |
|
190 |
- |
|
191 | 186 |
if (!(s->channel_layout = av_get_channel_layout(s->channel_layout_str))) { |
192 | 187 |
av_log(ctx, AV_LOG_ERROR, "Error parsing channel layout '%s'.\n", |
193 | 188 |
s->channel_layout_str); |
... | ... |
@@ -513,6 +517,7 @@ AVFilter avfilter_af_join = { |
513 | 513 |
.description = NULL_IF_CONFIG_SMALL("Join multiple audio streams into " |
514 | 514 |
"multi-channel output"), |
515 | 515 |
.priv_size = sizeof(JoinContext), |
516 |
+ .priv_class = &join_class, |
|
516 | 517 |
|
517 | 518 |
.init = join_init, |
518 | 519 |
.uninit = join_uninit, |
... | ... |
@@ -520,5 +525,4 @@ AVFilter avfilter_af_join = { |
520 | 520 |
|
521 | 521 |
.inputs = NULL, |
522 | 522 |
.outputs = avfilter_af_join_outputs, |
523 |
- .priv_class = &join_class, |
|
524 | 523 |
}; |
... | ... |
@@ -693,6 +693,7 @@ int avfilter_init_filter(AVFilterContext *filter, const char *args, void *opaque |
693 | 693 |
!strcmp(filter->filter->name, "hqdn3d" ) || |
694 | 694 |
!strcmp(filter->filter->name, "idet" ) || |
695 | 695 |
!strcmp(filter->filter->name, "il" ) || |
696 |
+ !strcmp(filter->filter->name, "join" ) || |
|
696 | 697 |
!strcmp(filter->filter->name, "kerndeint" ) || |
697 | 698 |
!strcmp(filter->filter->name, "ocv" ) || |
698 | 699 |
!strcmp(filter->filter->name, "life" ) || |