aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder/mpc_plugin.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-11-12 07:02:29 +0100
committerMax Kellermann <max@duempel.org>2008-11-12 07:02:29 +0100
commit865757835ec586963847c630790d636c35914fa8 (patch)
treef83d08beeb4a6515fa91fb519145fb3e3c50cf07 /src/decoder/mpc_plugin.c
parent1414a3de4c67a1295a2149554c1759bc213d901e (diff)
downloadmpd-865757835ec586963847c630790d636c35914fa8.tar.gz
mpd-865757835ec586963847c630790d636c35914fa8.tar.xz
mpd-865757835ec586963847c630790d636c35914fa8.zip
mpc: use GLib instead of utils.h/log.h
Don't use deprecated MPD libraries.
Diffstat (limited to 'src/decoder/mpc_plugin.c')
-rw-r--r--src/decoder/mpc_plugin.c15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/decoder/mpc_plugin.c b/src/decoder/mpc_plugin.c
index c4142555b..81a82b98e 100644
--- a/src/decoder/mpc_plugin.c
+++ b/src/decoder/mpc_plugin.c
@@ -17,10 +17,9 @@
*/
#include "../decoder_api.h"
-#include "../utils.h"
-#include "../log.h"
#include <mpcdec/mpcdec.h>
+#include <glib.h>
typedef struct _MpcCallbackData {
struct input_stream *inStream;
@@ -135,7 +134,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
if ((ret = mpc_streaminfo_read(&info, &reader)) != ERROR_CODE_OK) {
if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP)
- ERROR("Not a valid musepack stream\n");
+ g_warning("Not a valid musepack stream\n");
return;
}
@@ -143,7 +142,7 @@ mpc_decode(struct decoder *mpd_decoder, struct input_stream *inStream)
if (!mpc_decoder_initialize(&decoder, &info)) {
if (decoder_get_command(mpd_decoder) != DECODE_COMMAND_STOP)
- ERROR("Not a valid musepack stream\n");
+ g_warning("Not a valid musepack stream\n");
return;
}
@@ -246,10 +245,8 @@ static float mpcGetTime(const char *file)
mpc_streaminfo_init(&info);
- if (!input_stream_open(&inStream, file)) {
- DEBUG("mpcGetTime: Failed to open file: %s\n", file);
+ if (!input_stream_open(&inStream, file))
return -1;
- }
if (mpc_streaminfo_read(&info, &reader) != ERROR_CODE_OK) {
input_stream_close(&inStream);
@@ -269,8 +266,8 @@ static struct tag *mpcTagDup(const char *file)
float total_time = mpcGetTime(file);
if (total_time < 0) {
- DEBUG("mpcTagDup: Failed to get Songlength of file: %s\n",
- file);
+ g_debug("mpcTagDup: Failed to get Songlength of file: %s\n",
+ file);
return NULL;
}