77 #define OFFSET(x) offsetof(JoinContext, x)
78 #define A AV_OPT_FLAG_AUDIO_PARAM
79 #define F AV_OPT_FLAG_FILTERING_PARAM
82 {
"channel_layout",
"Channel layout of the "
84 {
"map",
"A comma-separated list of channels maps in the format "
85 "'input_stream.input_channel-output_channel.",
104 if (link == ctx->
inputs[i])
118 while (cur && *cur) {
119 char *sep, *next, *p;
120 uint64_t in_channel = 0, out_channel = 0;
121 int input_idx, out_ch_idx, in_ch_idx;
123 next = strchr(cur,
',');
128 if (!(sep = strchr(cur,
'-'))) {
135 #define PARSE_CHANNEL(str, var, inout) \
136 if (!(var = av_get_channel_layout(str))) { \
137 av_log(ctx, AV_LOG_ERROR, "Invalid " inout " channel: %s.\n", str);\
138 return AVERROR(EINVAL); \
140 if (av_get_channel_layout_nb_channels(var) != 1) { \
141 av_log(ctx, AV_LOG_ERROR, "Channel map describes more than one " \
142 inout " channel.\n"); \
143 return AVERROR(EINVAL); \
150 "requested channel layout.\n", sep);
163 input_idx = strtol(cur, &cur, 0);
164 if (input_idx < 0 || input_idx >= s->
inputs) {
173 in_ch_idx = strtol(cur, &p, 0);
225 for (i = 0; i < s->
inputs; i++) {
229 snprintf(name,
sizeof(name),
"input%d", i);
367 "output channel '%s'.\n",
422 int linesize = INT_MAX;
439 for (j = 1; !i && j < ctx->
nb_inputs; j++)
450 perms &= cur_buf->
perms;
455 nb_samples, outlink->
format,
500 "multi-channel output"),
508 .
outputs = avfilter_af_join_outputs,
509 .priv_class = &join_class,