77 #define OFFSET(x) offsetof(JoinContext, x)
78 #define A AV_OPT_FLAG_AUDIO_PARAM
81 {
"channel_layout",
"Channel layout of the "
83 {
"map",
"A comma-separated list of channels maps in the format "
84 "'input_stream.input_channel-output_channel.",
103 if (link == ctx->
inputs[i])
117 while (cur && *cur) {
118 char *sep, *next, *p;
119 uint64_t in_channel = 0, out_channel = 0;
120 int input_idx, out_ch_idx, in_ch_idx;
122 next = strchr(cur,
',');
127 if (!(sep = strchr(cur,
'-'))) {
134 #define PARSE_CHANNEL(str, var, inout) \
135 if (!(var = av_get_channel_layout(str))) { \
136 av_log(ctx, AV_LOG_ERROR, "Invalid " inout " channel: %s.\n", str);\
137 return AVERROR(EINVAL); \
139 if (av_get_channel_layout_nb_channels(var) != 1) { \
140 av_log(ctx, AV_LOG_ERROR, "Channel map describes more than one " \
141 inout " channel.\n"); \
142 return AVERROR(EINVAL); \
149 "requested channel layout.\n", sep);
162 input_idx = strtol(cur, &cur, 0);
163 if (input_idx < 0 || input_idx >= s->
inputs) {
172 in_ch_idx = strtol(cur, &p, 0);
226 for (i = 0; i < s->
inputs; i++) {
230 snprintf(name,
sizeof(name),
"input%d", i);
368 "output channel '%s'.\n",
423 int linesize = INT_MAX;
440 for (j = 1; !i && j < ctx->
nb_inputs; j++)
451 perms &= cur_buf->
perms;
456 nb_samples, outlink->
format,
501 "multi-channel output"),
509 .
outputs = avfilter_af_join_outputs,