aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlayerThread.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2014-02-21 08:55:52 +0100
committerMax Kellermann <max@duempel.org>2014-02-21 10:22:35 +0100
commit30a82076ba50a21c4df5fe4c46c8fc2ed25a7486 (patch)
tree6d7f28eb99c4e708d7b7609a203f78d565475c89 /src/PlayerThread.cxx
parent860339c132f76ae6710b2d96851b3f55a273c1da (diff)
downloadmpd-30a82076ba50a21c4df5fe4c46c8fc2ed25a7486.tar.gz
mpd-30a82076ba50a21c4df5fe4c46c8fc2ed25a7486.tar.xz
mpd-30a82076ba50a21c4df5fe4c46c8fc2ed25a7486.zip
PlayerListener: new interface to replace GlobalEvents access
Diffstat (limited to '')
-rw-r--r--src/PlayerThread.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/PlayerThread.cxx b/src/PlayerThread.cxx
index d90f281c6..9f342ad5d 100644
--- a/src/PlayerThread.cxx
+++ b/src/PlayerThread.cxx
@@ -19,6 +19,7 @@
#include "config.h"
#include "PlayerThread.hxx"
+#include "PlayerListener.hxx"
#include "decoder/DecoderThread.hxx"
#include "decoder/DecoderControl.hxx"
#include "MusicPipe.hxx"
@@ -31,7 +32,6 @@
#include "output/MultipleOutputs.hxx"
#include "tag/Tag.hxx"
#include "Idle.hxx"
-#include "GlobalEvents.hxx"
#include "util/Domain.hxx"
#include "thread/Name.hxx"
#include "Log.hxx"
@@ -359,7 +359,7 @@ Player::WaitForDecoder()
pc.Unlock();
/* call syncPlaylistWithQueue() in the main thread */
- GlobalEvents::Emit(GlobalEvents::PLAYLIST);
+ pc.listener.OnPlayerSync();
return true;
}
@@ -696,7 +696,7 @@ update_song_tag(PlayerControl &pc, DetachedSong &song, const Tag &new_tag)
/* the main thread will update the playlist version when he
receives this event */
- GlobalEvents::Emit(GlobalEvents::TAG);
+ pc.listener.OnPlayerTagModified();
/* notify all clients that the tag of the current song has
changed */
@@ -1124,7 +1124,7 @@ player_task(void *arg)
pc.Unlock();
do_play(pc, dc, buffer);
- GlobalEvents::Emit(GlobalEvents::PLAYLIST);
+ pc.listener.OnPlayerSync();
pc.Lock();
break;