diff options
author | Stefano Sabatini <stefasab@gmail.com> | 2013-12-25 20:55:16 +0400 |
---|---|---|
committer | Stefano Sabatini <stefasab@gmail.com> | 2013-12-25 21:26:34 +0400 |
commit | ca0d8e839e4850aca4f421632fcae57bae96fc8f (patch) | |
tree | 5dfd8ac6a1bea4532760a07f02ebf04db1631471 /libavfilter/af_volume.c | |
parent | 97aa554634044b84a498f41ac9bd88b688731c3b (diff) |
lavfi/volume: extend volume logging
Diffstat (limited to 'libavfilter/af_volume.c')
-rw-r--r-- | libavfilter/af_volume.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/libavfilter/af_volume.c b/libavfilter/af_volume.c index 9dc868f91a..454d46245d 100644 --- a/libavfilter/af_volume.c +++ b/libavfilter/af_volume.c @@ -249,16 +249,17 @@ static int set_volume(AVFilterContext *ctx) } vol->var_values[VAR_VOLUME] = vol->volume; + av_log(ctx, AV_LOG_VERBOSE, "n:%f t:%f pts:%f precision:%s ", + vol->var_values[VAR_N], vol->var_values[VAR_T], vol->var_values[VAR_PTS], + precision_str[vol->precision]); + if (vol->precision == PRECISION_FIXED) { vol->volume_i = (int)(vol->volume * 256 + 0.5); vol->volume = vol->volume_i / 256.0; - av_log(ctx, AV_LOG_VERBOSE, "volume:(%d/256)(%f)(%1.2fdB) precision:fixed\n", - vol->volume_i, vol->volume, 20.0*log(vol->volume)/M_LN10); - } else { - av_log(ctx, AV_LOG_VERBOSE, "volume:(%f)(%1.2fdB) precision:%s\n", - vol->volume, 20.0*log(vol->volume)/M_LN10, - precision_str[vol->precision]); + av_log(ctx, AV_LOG_VERBOSE, "volume_i:%d/255 ", vol->volume_i); } + av_log(ctx, AV_LOG_VERBOSE, "volume:%f volume_dB:%f\n", + vol->volume, 20.0*log(vol->volume)/M_LN10); volume_init(vol); return 0; |