aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2009-03-01 10:31:47 +0100
committerMax Kellermann <max@duempel.org>2009-03-01 10:31:47 +0100
commita81a84eaa45235c4a3343b3aacaf132c521a0b0e (patch)
tree661d31244e977d4d571ba906037f9ebf4eaaf1d7
parentc0e61687b60583dc75bb5a0acd718772a6984844 (diff)
downloadmpd-a81a84eaa45235c4a3343b3aacaf132c521a0b0e.tar.gz
mpd-a81a84eaa45235c4a3343b3aacaf132c521a0b0e.tar.xz
mpd-a81a84eaa45235c4a3343b3aacaf132c521a0b0e.zip
decoder_api: log audio format in a debug message
To aid debugging, print the audio format of the decoder plugin in a debug message, and print information about PCM conversion.
Diffstat (limited to '')
-rw-r--r--src/decoder_api.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/decoder_api.c b/src/decoder_api.c
index ccb04a2ec..e6ea44088 100644
--- a/src/decoder_api.c
+++ b/src/decoder_api.c
@@ -32,6 +32,9 @@
#include <assert.h>
#include <stdlib.h>
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "decoder"
+
void decoder_initialized(G_GNUC_UNUSED struct decoder * decoder,
const struct audio_format *audio_format,
bool seekable, float total_time)
@@ -53,6 +56,17 @@ void decoder_initialized(G_GNUC_UNUSED struct decoder * decoder,
dc.state = DECODE_STATE_DECODE;
notify_signal(&pc.notify);
+
+ g_debug("audio_format=%u:%u:%u, seekable=%s",
+ dc.in_audio_format.sample_rate, dc.in_audio_format.bits,
+ dc.in_audio_format.channels,
+ seekable ? "true" : "false");
+
+ if (!audio_format_equals(&dc.in_audio_format, &dc.out_audio_format))
+ g_debug("converting to %u:%u:%u",
+ dc.out_audio_format.sample_rate,
+ dc.out_audio_format.bits,
+ dc.out_audio_format.channels);
}
char *decoder_get_uri(G_GNUC_UNUSED struct decoder *decoder)