diff options
Diffstat (limited to 'libavresample')
-rw-r--r-- | libavresample/audio_convert.c | 4 | ||||
-rw-r--r-- | libavresample/audio_mix.c | 2 | ||||
-rw-r--r-- | libavresample/resample.c | 2 | ||||
-rw-r--r-- | libavresample/utils.c | 76 |
4 files changed, 42 insertions, 42 deletions
diff --git a/libavresample/audio_convert.c b/libavresample/audio_convert.c index 5629034..f2888cd 100644 --- a/libavresample/audio_convert.c +++ b/libavresample/audio_convert.c @@ -319,7 +319,7 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) if (ac->dc) { /* dithered conversion */ - av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (dithered)\n", + av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (dithered)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt)); @@ -337,7 +337,7 @@ int ff_audio_convert(AudioConvert *ac, AudioData *out, AudioData *in) use_generic = 0; } } - av_dlog(ac->avr, "%d samples - audio_convert: %s to %s (%s)\n", len, + av_log(ac->avr, AV_LOG_TRACE, "%d samples - audio_convert: %s to %s (%s)\n", len, av_get_sample_fmt_name(ac->in_fmt), av_get_sample_fmt_name(ac->out_fmt), use_generic ? ac->func_descr_generic : ac->func_descr); diff --git a/libavresample/audio_mix.c b/libavresample/audio_mix.c index 9df1865..7ae0aeb 100644 --- a/libavresample/audio_mix.c +++ b/libavresample/audio_mix.c @@ -441,7 +441,7 @@ int ff_audio_mix(AudioMix *am, AudioData *src) use_generic = 0; } } - av_dlog(am->avr, "audio_mix: %d samples - %d to %d channels (%s)\n", + av_log(am->avr, AV_LOG_TRACE, "audio_mix: %d samples - %d to %d channels (%s)\n", src->nb_samples, am->in_channels, am->out_channels, use_generic ? am->func_descr_generic : am->func_descr); diff --git a/libavresample/resample.c b/libavresample/resample.c index 4ae3075..674336d 100644 --- a/libavresample/resample.c +++ b/libavresample/resample.c @@ -485,7 +485,7 @@ int ff_audio_resample(ResampleContext *c, AudioData *dst, AudioData *src) ff_audio_data_drain(c->buffer, consumed); c->initial_padding_samples = FFMAX(c->initial_padding_samples - consumed, 0); - av_dlog(c->avr, "resampled %d in + %d leftover to %d out + %d leftover\n", + av_log(c->avr, AV_LOG_TRACE, "resampled %d in + %d leftover to %d out + %d leftover\n", in_samples, in_leftover, out_samples, c->buffer->nb_samples); dst->nb_samples = out_samples; diff --git a/libavresample/utils.c b/libavresample/utils.c index e285445..e318587 100644 --- a/libavresample/utils.c +++ b/libavresample/utils.c @@ -127,46 +127,46 @@ int avresample_open(AVAudioResampleContext *avr) if (avr->use_channel_map) { if (avr->in_copy_needed) { avr->remap_point = REMAP_IN_COPY; - av_dlog(avr, "remap channels during in_copy\n"); + av_log(avr, AV_LOG_TRACE, "remap channels during in_copy\n"); } else if (avr->in_convert_needed) { avr->remap_point = REMAP_IN_CONVERT; - av_dlog(avr, "remap channels during in_convert\n"); + av_log(avr, AV_LOG_TRACE, "remap channels during in_convert\n"); } else if (avr->out_convert_needed) { avr->remap_point = REMAP_OUT_CONVERT; - av_dlog(avr, "remap channels during out_convert\n"); + av_log(avr, AV_LOG_TRACE, "remap channels during out_convert\n"); } else { avr->remap_point = REMAP_OUT_COPY; - av_dlog(avr, "remap channels during out_copy\n"); + av_log(avr, AV_LOG_TRACE, "remap channels during out_copy\n"); } #ifdef DEBUG { int ch; - av_dlog(avr, "output map: "); + av_log(avr, AV_LOG_TRACE, "output map: "); if (avr->ch_map_info.do_remap) for (ch = 0; ch < avr->in_channels; ch++) - av_dlog(avr, " % 2d", avr->ch_map_info.channel_map[ch]); + av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_map[ch]); else - av_dlog(avr, "n/a"); - av_dlog(avr, "\n"); - av_dlog(avr, "copy map: "); + av_log(avr, AV_LOG_TRACE, "n/a"); + av_log(avr, AV_LOG_TRACE, "\n"); + av_log(avr, AV_LOG_TRACE, "copy map: "); if (avr->ch_map_info.do_copy) for (ch = 0; ch < avr->in_channels; ch++) - av_dlog(avr, " % 2d", avr->ch_map_info.channel_copy[ch]); + av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_copy[ch]); else - av_dlog(avr, "n/a"); - av_dlog(avr, "\n"); - av_dlog(avr, "zero map: "); + av_log(avr, AV_LOG_TRACE, "n/a"); + av_log(avr, AV_LOG_TRACE, "\n"); + av_log(avr, AV_LOG_TRACE, "zero map: "); if (avr->ch_map_info.do_zero) for (ch = 0; ch < avr->in_channels; ch++) - av_dlog(avr, " % 2d", avr->ch_map_info.channel_zero[ch]); + av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.channel_zero[ch]); else - av_dlog(avr, "n/a"); - av_dlog(avr, "\n"); - av_dlog(avr, "input map: "); + av_log(avr, AV_LOG_TRACE, "n/a"); + av_log(avr, AV_LOG_TRACE, "\n"); + av_log(avr, AV_LOG_TRACE, "input map: "); for (ch = 0; ch < avr->in_channels; ch++) - av_dlog(avr, " % 2d", avr->ch_map_info.input_map[ch]); - av_dlog(avr, "\n"); + av_log(avr, AV_LOG_TRACE, " % 2d", avr->ch_map_info.input_map[ch]); + av_log(avr, AV_LOG_TRACE, "\n"); } #endif } else @@ -295,7 +295,7 @@ static int handle_buffered_output(AVAudioResampleContext *avr, /* if there are any samples in the output FIFO or if the user-supplied output buffer is not large enough for all samples, we add to the output FIFO */ - av_dlog(avr, "[FIFO] add %s to out_fifo\n", converted->name); + av_log(avr, AV_LOG_TRACE, "[FIFO] add %s to out_fifo\n", converted->name); ret = ff_audio_data_add_to_fifo(avr->out_fifo, converted, 0, converted->nb_samples); if (ret < 0) @@ -305,25 +305,25 @@ static int handle_buffered_output(AVAudioResampleContext *avr, /* if the user specified an output buffer, read samples from the output FIFO to the user output */ if (output && output->allocated_samples > 0) { - av_dlog(avr, "[FIFO] read from out_fifo to output\n"); - av_dlog(avr, "[end conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[FIFO] read from out_fifo to output\n"); + av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); return ff_audio_data_read_from_fifo(avr->out_fifo, output, output->allocated_samples); } } else if (converted) { /* copy directly to output if it is large enough or there is not any data in the output FIFO */ - av_dlog(avr, "[copy] %s to output\n", converted->name); + av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", converted->name); output->nb_samples = 0; ret = ff_audio_data_copy(output, converted, avr->remap_point == REMAP_OUT_COPY ? &avr->ch_map_info : NULL); if (ret < 0) return ret; - av_dlog(avr, "[end conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); return output->nb_samples; } - av_dlog(avr, "[end conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); return 0; } @@ -354,7 +354,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, avr->out_buffer->allocated_channels); } - av_dlog(avr, "[start conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[start conversion]\n"); /* initialize output_buffer with output data */ direct_output = output && av_audio_fifo_size(avr->out_fifo) == 0; @@ -380,7 +380,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, !avr->out_convert_needed && direct_output && out_samples >= in_samples) { /* in some rare cases we can copy input to output and upmix directly in the output buffer */ - av_dlog(avr, "[copy] %s to output\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[copy] %s to output\n", current_buffer->name); ret = ff_audio_data_copy(&output_buffer, current_buffer, avr->remap_point == REMAP_OUT_COPY ? &avr->ch_map_info : NULL); @@ -392,7 +392,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, /* if remapping channels during output copy, we may need to * use an intermediate buffer in order to remap before adding * samples to the output fifo */ - av_dlog(avr, "[copy] %s to out_buffer\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[copy] %s to out_buffer\n", current_buffer->name); ret = ff_audio_data_copy(avr->out_buffer, current_buffer, &avr->ch_map_info); if (ret < 0) @@ -406,13 +406,13 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, current_buffer->nb_samples); if (ret < 0) return ret; - av_dlog(avr, "[convert] %s to in_buffer\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[convert] %s to in_buffer\n", current_buffer->name); ret = ff_audio_convert(avr->ac_in, avr->in_buffer, current_buffer); if (ret < 0) return ret; } else { - av_dlog(avr, "[copy] %s to in_buffer\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[copy] %s to in_buffer\n", current_buffer->name); ret = ff_audio_data_copy(avr->in_buffer, current_buffer, avr->remap_point == REMAP_IN_COPY ? &avr->ch_map_info : NULL); @@ -421,7 +421,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, } ff_audio_data_set_channels(avr->in_buffer, avr->in_channels); if (avr->downmix_needed) { - av_dlog(avr, "[downmix] in_buffer\n"); + av_log(avr, AV_LOG_TRACE, "[downmix] in_buffer\n"); ret = ff_audio_mix(avr->am, avr->in_buffer); if (ret < 0) return ret; @@ -443,7 +443,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, resample_out = &output_buffer; else resample_out = avr->resample_out_buffer; - av_dlog(avr, "[resample] %s to %s\n", + av_log(avr, AV_LOG_TRACE, "[resample] %s to %s\n", current_buffer ? current_buffer->name : "null", resample_out->name); ret = ff_audio_resample(avr->resample, resample_out, @@ -453,7 +453,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, /* if resampling did not produce any samples, just return 0 */ if (resample_out->nb_samples == 0) { - av_dlog(avr, "[end conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); return 0; } @@ -461,7 +461,7 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, } if (avr->upmix_needed) { - av_dlog(avr, "[upmix] %s\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[upmix] %s\n", current_buffer->name); ret = ff_audio_mix(avr->am, current_buffer); if (ret < 0) return ret; @@ -469,26 +469,26 @@ int attribute_align_arg avresample_convert(AVAudioResampleContext *avr, /* if we resampled or upmixed directly to output, return here */ if (current_buffer == &output_buffer) { - av_dlog(avr, "[end conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); return current_buffer->nb_samples; } if (avr->out_convert_needed) { if (direct_output && out_samples >= current_buffer->nb_samples) { /* convert directly to output */ - av_dlog(avr, "[convert] %s to output\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[convert] %s to output\n", current_buffer->name); ret = ff_audio_convert(avr->ac_out, &output_buffer, current_buffer); if (ret < 0) return ret; - av_dlog(avr, "[end conversion]\n"); + av_log(avr, AV_LOG_TRACE, "[end conversion]\n"); return output_buffer.nb_samples; } else { ret = ff_audio_data_realloc(avr->out_buffer, current_buffer->nb_samples); if (ret < 0) return ret; - av_dlog(avr, "[convert] %s to out_buffer\n", current_buffer->name); + av_log(avr, AV_LOG_TRACE, "[convert] %s to out_buffer\n", current_buffer->name); ret = ff_audio_convert(avr->ac_out, avr->out_buffer, current_buffer); if (ret < 0) |