wasapisrc: Try harder to avoid debug output in the hot loop
authorNirbheek Chauhan <nirbheek@centricular.com>
Mon, 25 Nov 2019 15:55:43 +0000 (21:25 +0530)
committerTim-Philipp Müller <tim@centricular.com>
Thu, 28 Nov 2019 10:43:28 +0000 (10:43 +0000)
commit5f92188a1ed42c8cf0b41f7f7e83bceb88803a6e
tree1cc933ac536f43699c70f834d59c6d1ceb266b6f
parent6a2dcdb71841d609ef6bdeef992cbd76c3dbc05c
wasapisrc: Try harder to avoid debug output in the hot loop

The whole `src_read()` function is a hot loop since the ringbuffer
thread is waiting on us, and printing to the console from inside it
can easily cause us to miss our deadline.

F.ex., if you had GST_DEBUG=3 and we accidentally missed a device
period, we'd trigger the "reported glitch" warning, which would cause
us to miss another device period, and so on. Let's reduce the log
level so that GST_DEBUG=3 is more usable, and only print buffer flag
info when it's actually relevant.
sys/wasapi/gstwasapisrc.c