diff options
author | Max Kellermann <max@duempel.org> | 2009-01-01 18:22:11 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-01 18:22:11 +0100 |
commit | b3e2635ac1d6cb46ae5a41e4c9760127453e49db (patch) | |
tree | b3fe2592a7f40eea7c28a2f7a9f6e8b386d61b55 /src/player_thread.c | |
parent | 22bb5a5856ff4c195a179610dfb3f09af3183467 (diff) | |
download | mpd-b3e2635ac1d6cb46ae5a41e4c9760127453e49db.tar.gz mpd-b3e2635ac1d6cb46ae5a41e4c9760127453e49db.tar.xz mpd-b3e2635ac1d6cb46ae5a41e4c9760127453e49db.zip |
event_pipe: added pipe_event enum and callbacks
Make the event_pipe (formerly main_notify) send/receive a set of
events, with a callback for each one.
The default event PIPE_EVENT_SIGNAL does not have a callback. It
is still there for waking up the main thread, when it is waiting for
the player thread.
Diffstat (limited to 'src/player_thread.c')
-rw-r--r-- | src/player_thread.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/player_thread.c b/src/player_thread.c index 75419c9b9..5b2130669 100644 --- a/src/player_thread.c +++ b/src/player_thread.c @@ -90,7 +90,7 @@ static void player_stop_decoder(void) { dc_stop(&pc.notify); pc.state = PLAYER_STATE_STOP; - event_pipe_signal(); + event_pipe_emit(PIPE_EVENT_PLAYLIST); } static int player_wait_for_decoder(struct player *player) @@ -369,7 +369,7 @@ static void do_play(void) request the next song from the playlist */ pc.next_song = NULL; - event_pipe_signal(); + event_pipe_emit(PIPE_EVENT_PLAYLIST); } if (decoder_is_idle() && player.queued) { @@ -476,7 +476,7 @@ static void do_play(void) if (player_wait_for_decoder(&player) < 0) return; - event_pipe_signal(); + event_pipe_emit(PIPE_EVENT_PLAYLIST); } else if (decoder_is_idle()) { break; } else { |