|
|
|
@ -120,6 +120,7 @@ typedef struct WaveformContext { |
|
|
|
|
float ftint[2]; |
|
|
|
|
int tint[2]; |
|
|
|
|
int fitmode; |
|
|
|
|
int input; |
|
|
|
|
|
|
|
|
|
int (*waveform_slice)(AVFilterContext *ctx, void *arg, |
|
|
|
|
int jobnr, int nb_jobs); |
|
|
|
@ -196,6 +197,9 @@ static const AVOption waveform_options[] = { |
|
|
|
|
{ "fm", "set fit mode", OFFSET(fitmode), AV_OPT_TYPE_INT, {.i64=0}, 0, NB_FITMODES-1, FLAGS, "fitmode" }, |
|
|
|
|
{ "none", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_NONE}, 0, 0, FLAGS, "fitmode" }, |
|
|
|
|
{ "size", NULL, 0, AV_OPT_TYPE_CONST, {.i64=FM_SIZE}, 0, 0, FLAGS, "fitmode" }, |
|
|
|
|
{ "input", "set input formats selection", OFFSET(input), AV_OPT_TYPE_INT, {.i64=1}, 0, 1, FLAGS, "input" }, |
|
|
|
|
{ "all", "try to select from all available formats", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, FLAGS, "input" }, |
|
|
|
|
{ "first", "pick first available format", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, FLAGS, "input" }, |
|
|
|
|
{ NULL } |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
@ -356,7 +360,7 @@ static int query_formats(AVFilterContext *ctx) |
|
|
|
|
depth2 = desc2->comp[0].depth; |
|
|
|
|
if (ncomp != ncomp2 || depth != depth2) |
|
|
|
|
return AVERROR(EAGAIN); |
|
|
|
|
for (i = 1; i < avff->nb_formats; i++) { |
|
|
|
|
for (i = 1; i < avff->nb_formats && !s->input; i++) { |
|
|
|
|
desc = av_pix_fmt_desc_get(avff->formats[i]); |
|
|
|
|
if (rgb != (desc->flags & AV_PIX_FMT_FLAG_RGB) || |
|
|
|
|
depth != desc->comp[0].depth) |
|
|
|
|