48 #define INPUT_INACTIVE 2
50 #define DURATION_LONGEST 0
51 #define DURATION_SHORTEST 1
52 #define DURATION_FIRST 2
79 while (frame_list->
list) {
92 if (!frame_list->
list)
99 if (!frame_list->
list)
110 while (samples > 0) {
116 if (!frame_list->
list)
140 if (!frame_list->
list) {
141 frame_list->
list = info;
142 frame_list->
end = info;
146 frame_list->
end = info;
175 #define OFFSET(x) offsetof(MixContext, x)
176 #define A AV_OPT_FLAG_AUDIO_PARAM
177 #define F AV_OPT_FLAG_FILTERING_PARAM
179 {
"inputs",
"Number of inputs.",
181 {
"duration",
"How to determine the end-of-stream.",
186 {
"dropout_transition",
"Transition time, in seconds, for volume "
187 "renormalization when an input stream ends.",
260 "inputs:%d fmt:%s srate:%d cl:%s\n", s->
nb_inputs,
290 int planes, plane_size, p;
297 plane_size =
FFALIGN(plane_size, 16);
299 for (p = 0; p < planes; p++) {
322 int available_samples = INT_MAX;
331 available_samples =
FFMIN(available_samples, nb_samples);
333 if (available_samples == INT_MAX)
335 return available_samples;
374 int active_inputs = 0;
379 if (!active_inputs ||
391 int wanted_samples, available_samples;
407 if (!available_samples)
440 if (!available_samples)
442 available_samples =
FFMIN(available_samples, wanted_samples);
444 available_samples = wanted_samples;
461 if (ctx->
inputs[i] == inlink)
491 s->
class = &amix_class;
502 snprintf(name,
sizeof(name),
"input%d", i);
565 .
outputs = avfilter_af_amix_outputs,
566 .priv_class = &amix_class,