49 #define INPUT_INACTIVE 2
51 #define DURATION_LONGEST 0
52 #define DURATION_SHORTEST 1
53 #define DURATION_FIRST 2
80 while (frame_list->
list) {
87 frame_list->
end = NULL;
93 if (!frame_list->
list)
100 if (!frame_list->
list)
110 int samples = nb_samples;
111 while (samples > 0) {
117 if (!frame_list->
list)
118 frame_list->
end = NULL;
124 info->
pts += samples;
141 if (!frame_list->
list) {
142 frame_list->
list = info;
143 frame_list->
end = info;
147 frame_list->
end = info;
176 #define OFFSET(x) offsetof(MixContext, x)
177 #define A AV_OPT_FLAG_AUDIO_PARAM
178 #define F AV_OPT_FLAG_FILTERING_PARAM
180 {
"inputs",
"Number of inputs.",
182 {
"duration",
"How to determine the end-of-stream.",
187 {
"dropout_transition",
"Transition time, in seconds, for volume "
188 "renormalization when an input stream ends.",
261 "inputs:%d fmt:%s srate:%d cl:%s\n", s->
nb_inputs,
291 int planes, plane_size, p;
298 plane_size =
FFALIGN(plane_size, 16);
300 for (p = 0; p < planes; p++) {
323 int available_samples = INT_MAX;
332 available_samples =
FFMIN(available_samples, nb_samples);
334 if (available_samples == INT_MAX)
336 return available_samples;
375 int active_inputs = 0;
380 if (!active_inputs ||
392 int wanted_samples, available_samples;
408 if (!available_samples)
441 if (!available_samples)
443 available_samples =
FFMIN(available_samples, wanted_samples);
445 available_samples = wanted_samples;
462 if (ctx->
inputs[i] == inlink)
496 snprintf(name,
sizeof(name),
"input%d", i);
553 .priv_class = &amix_class,
558 .
outputs = avfilter_af_amix_outputs,