From 25a806a347ce420126eb75d82c5fb875eb0a5e0d Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Sat, 31 Oct 2009 17:02:12 +0100 Subject: player_control: protect command, state, error with a mutex Use GMutex/GCond instead of the notify library. Manually lock the player_control object before accessing the protected attributes. Use the GCond object to notify the player thread and the main thread. --- src/decoder_control.h | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/decoder_control.h') diff --git a/src/decoder_control.h b/src/decoder_control.h index 7e861f970..6b65da2f2 100644 --- a/src/decoder_control.h +++ b/src/decoder_control.h @@ -30,8 +30,6 @@ #define DECODE_TYPE_FILE 0 #define DECODE_TYPE_URL 1 -struct notify; - enum decoder_state { DECODE_STATE_STOP = 0, DECODE_STATE_START, @@ -205,19 +203,19 @@ decoder_current_song(void) } void -dc_command_wait(struct notify *notify); +dc_command_wait(void); void -dc_start(struct notify *notify, struct song *song); +dc_start(struct song *song); void dc_start_async(struct song *song); void -dc_stop(struct notify *notify); +dc_stop(void); bool -dc_seek(struct notify *notify, double where); +dc_seek(double where); void dc_quit(void); -- cgit v1.2.3