summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2020-08-23 11:17:14 +0200
committerwm4 <wm4@nowhere>2020-08-23 11:49:11 +0200
commitc9c01a07f8e5846379b0fe01eb9320f4e8519bb5 (patch)
tree8089ac99ab18fb66f72a803c6f1100b9e92f40d3
parentb0f0be76783c443413115fe33cc7137ef21e98a8 (diff)
downloadmpv-c9c01a07f8e5846379b0fe01eb9320f4e8519bb5.tar.bz2
mpv-c9c01a07f8e5846379b0fe01eb9320f4e8519bb5.tar.xz
audio: remove delay debug logging
Some absurd useless stuff.
-rw-r--r--player/audio.c25
-rw-r--r--player/core.h3
2 files changed, 0 insertions, 28 deletions
diff --git a/player/audio.c b/player/audio.c
index e541506778..924b5c1ee5 100644
--- a/player/audio.c
+++ b/player/audio.c
@@ -200,7 +200,6 @@ void reset_audio_state(struct MPContext *mpctx)
}
mpctx->audio_status = mpctx->ao_chain ? STATUS_SYNCING : STATUS_EOF;
mpctx->delay = 0;
- mpctx->audio_stat_start = 0;
}
void uninit_audio_out(struct MPContext *mpctx)
@@ -573,31 +572,11 @@ static int write_to_ao(struct MPContext *mpctx, uint8_t **planes, int samples,
if (played > 0) {
mpctx->shown_aframes += played;
mpctx->delay += played / real_samplerate;
- mpctx->written_audio += played / (double)samplerate;
return played;
}
return 0;
}
-static void dump_audio_stats(struct MPContext *mpctx)
-{
- if (!mp_msg_test(mpctx->log, MSGL_STATS))
- return;
- if (mpctx->audio_status != STATUS_PLAYING || !mpctx->ao || mpctx->paused) {
- mpctx->audio_stat_start = 0;
- return;
- }
-
- double delay = ao_get_delay(mpctx->ao);
- if (!mpctx->audio_stat_start) {
- mpctx->audio_stat_start = mp_time_us();
- mpctx->written_audio = delay;
- }
- double current_audio = mpctx->written_audio - delay;
- double current_time = (mp_time_us() - mpctx->audio_stat_start) / 1e6;
- MP_STATS(mpctx, "value %f ao-dev", current_audio - current_time);
-}
-
// Return the number of samples that must be skipped or prepended to reach the
// target audio pts after a seek (for A/V sync or hr-seek).
// Return value (*skip):
@@ -797,8 +776,6 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
struct MPOpts *opts = mpctx->opts;
bool was_eof = mpctx->audio_status == STATUS_EOF;
- dump_audio_stats(mpctx);
-
if (mpctx->ao && ao_query_and_reset_events(mpctx->ao, AO_EVENT_RELOAD))
reload_audio_output(mpctx);
@@ -983,8 +960,6 @@ void fill_audio_out_buffers(struct MPContext *mpctx)
assert(played >= 0 && played <= samples);
mp_audio_buffer_skip(ao_c->ao_buffer, played);
- dump_audio_stats(mpctx);
-
mpctx->audio_status = STATUS_PLAYING;
if (audio_eof && !playsize) {
mpctx->audio_status = STATUS_DRAINING;
diff --git a/player/core.h b/player/core.h
index 9b468492bf..810c192885 100644
--- a/player/core.h
+++ b/player/core.h
@@ -379,9 +379,6 @@ typedef struct MPContext {
double last_frame_duration;
// Video PTS, or audio PTS if video has ended.
double playback_pts;
- // audio stats only
- int64_t audio_stat_start;
- double written_audio;
int last_chapter;