[vlc-devel] [RFC PATCH 6/9] pulse: log buffer_attr in us
Thomas Guillem
thomas at gllm.fr
Thu Dec 10 18:10:12 CET 2020
---
modules/audio_output/pulse.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/modules/audio_output/pulse.c b/modules/audio_output/pulse.c
index fba8fd6840..73b2c2f696 100644
--- a/modules/audio_output/pulse.c
+++ b/modules/audio_output/pulse.c
@@ -284,9 +284,12 @@ static void stream_buffer_attr_cb(pa_stream *s, void *userdata)
audio_output_t *aout = userdata;
const pa_buffer_attr *pba = pa_stream_get_buffer_attr(s);
- msg_Dbg(aout, "changed buffer metrics: maxlength=%u, tlength=%u, "
- "prebuf=%u, minreq=%u",
- pba->maxlength, pba->tlength, pba->prebuf, pba->minreq);
+ const pa_sample_spec *ss = pa_stream_get_sample_spec(s);
+
+ msg_Dbg(aout, "changed buffer metrics: maxlength=%"PRId64" us, tlength=%"PRId64" us, "
+ "prebuf=%"PRId64" us, minreq=%"PRId64 " us",
+ pa_bytes_to_usec(pba->maxlength, ss), pa_bytes_to_usec(pba->tlength, ss),
+ pa_bytes_to_usec(pba->prebuf, ss), pa_bytes_to_usec(pba->minreq, ss));
}
static void stream_event_cb(pa_stream *s, const char *name, pa_proplist *pl,
--
2.29.2
More information about the vlc-devel
mailing list