aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/FlacInput.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-09-27 22:31:24 +0200
committerMax Kellermann <max@duempel.org>2013-10-02 08:57:55 +0200
commit060814daa83f6a94f5934464ae42a406c5c7e947 (patch)
treef636ec6cdbb8e52fda6db987d2a28fc73c7b94b4 /src/decoder/FlacInput.cxx
parentc53492a76a8a05825e1c7f699c05645eee891199 (diff)
downloadmpd-060814daa83f6a94f5934464ae42a406c5c7e947.tar.gz
mpd-060814daa83f6a94f5934464ae42a406c5c7e947.tar.xz
mpd-060814daa83f6a94f5934464ae42a406c5c7e947.zip
Log: new logging library API
Prepare to migrate away from GLib. Currently, we're still using GLib as a backend.
Diffstat (limited to '')
-rw-r--r--src/decoder/FlacInput.cxx9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/decoder/FlacInput.cxx b/src/decoder/FlacInput.cxx
index 19abfca81..88b942971 100644
--- a/src/decoder/FlacInput.cxx
+++ b/src/decoder/FlacInput.cxx
@@ -19,9 +19,11 @@
#include "config.h"
#include "FlacInput.hxx"
+#include "FlacDomain.hxx"
#include "DecoderAPI.hxx"
#include "InputStream.hxx"
#include "util/Error.hxx"
+#include "Log.hxx"
#include "gcc.h"
FLAC__StreamDecoderReadStatus
@@ -49,8 +51,10 @@ FlacInput::Seek(FLAC__uint64 absolute_byte_offset)
return FLAC__STREAM_DECODER_SEEK_STATUS_UNSUPPORTED;
::Error error;
- if (!input_stream->LockSeek(absolute_byte_offset, SEEK_SET, error))
+ if (!input_stream->LockSeek(absolute_byte_offset, SEEK_SET, error)) {
+ LogError(error);
return FLAC__STREAM_DECODER_SEEK_STATUS_ERROR;
+ }
return FLAC__STREAM_DECODER_SEEK_STATUS_OK;
}
@@ -89,7 +93,8 @@ FlacInput::Error(FLAC__StreamDecoderErrorStatus status)
{
if (decoder == nullptr ||
decoder_get_command(decoder) != DecoderCommand::STOP)
- g_warning("%s", FLAC__StreamDecoderErrorStatusString[status]);
+ LogWarning(flac_domain,
+ FLAC__StreamDecoderErrorStatusString[status]);
}
FLAC__StreamDecoderReadStatus