aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-12-29 17:29:14 +0100
committerMax Kellermann <max@duempel.org>2008-12-29 17:29:14 +0100
commite9b96c6e56e1a267d227e7089dd1a9f562639717 (patch)
tree8d2fdd78d821110d323d9916fcb95e4ee3122e08 /src
parent46bef03e5a08c226cc229d2fbd0db05a50bc5430 (diff)
downloadmpd-e9b96c6e56e1a267d227e7089dd1a9f562639717.tar.gz
mpd-e9b96c6e56e1a267d227e7089dd1a9f562639717.tar.xz
mpd-e9b96c6e56e1a267d227e7089dd1a9f562639717.zip
player_thread: use GLib logging
Diffstat (limited to '')
-rw-r--r--src/player_thread.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/player_thread.c b/src/player_thread.c
index d588a079b..bbbb5e619 100644
--- a/src/player_thread.c
+++ b/src/player_thread.c
@@ -22,7 +22,6 @@
#include "audio.h"
#include "pcm_utils.h"
#include "path.h"
-#include "log.h"
#include "main_notify.h"
#include "crossfade.h"
#include "song.h"
@@ -31,6 +30,9 @@
#include <glib.h>
+#undef G_LOG_DOMAIN
+#define G_LOG_DOMAIN "player_thread"
+
enum xfade_state {
XFADE_DISABLED = -1,
XFADE_UNKNOWN = 0,
@@ -176,9 +178,9 @@ static void player_process_command(struct player *player)
assert(dc.next_song == NULL || dc.next_song->url != NULL);
pc.errored_song = dc.next_song;
pc.error = PLAYER_ERROR_AUDIO;
- ERROR("problems opening audio device "
- "while playing \"%s\"\n",
- song_get_url(dc.next_song, tmp));
+ g_warning("problems opening audio device "
+ "while playing \"%s\"",
+ song_get_url(dc.next_song, tmp));
player->paused = true;
}
}
@@ -329,9 +331,9 @@ static void do_play(void)
assert(dc.next_song == NULL || dc.next_song->url != NULL);
pc.errored_song = dc.next_song;
pc.error = PLAYER_ERROR_AUDIO;
- ERROR("problems opening audio device "
- "while playing \"%s\"\n",
- song_get_url(dc.next_song, tmp));
+ g_warning("problems opening audio device "
+ "while playing \"%s\"",
+ song_get_url(dc.next_song, tmp));
break;
}
@@ -539,5 +541,5 @@ void player_create(void)
GThread *t;
if (!(t = g_thread_create(player_task, NULL, FALSE, &e)))
- FATAL("Failed to spawn player task: %s\n", e->message);
+ g_error("Failed to spawn player task: %s", e->message);
}