From a0ad96a787d5df3f0cbd0c40252312700320a849 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Mon, 10 Jan 2011 21:27:43 +0100 Subject: decoder_control: store GCond object, not a player_control Remove the decoder dependency on player_control. All player_control was needed for is to signal the player thread, and we can do that with a simple GCond as well. --- src/decoder_control.h | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'src/decoder_control.h') diff --git a/src/decoder_control.h b/src/decoder_control.h index f0e369c71..34b486525 100644 --- a/src/decoder_control.h +++ b/src/decoder_control.h @@ -27,8 +27,6 @@ #include -struct player_control; - enum decoder_state { DECODE_STATE_STOP = 0, DECODE_STATE_START, @@ -44,12 +42,6 @@ enum decoder_state { }; struct decoder_control { - /** - * The player thread which calls us. This pointer is used to - * signal command completion. - */ - struct player_control *player_control; - /** the handle of the decoder thread, or NULL if the decoder thread isn't running */ GThread *thread; @@ -66,6 +58,12 @@ struct decoder_control { */ GCond *cond; + /** + * The trigger of this object's client. It is signalled + * whenever an event occurs. + */ + GCond *client_cond; + enum decoder_state state; enum decoder_command command; @@ -107,7 +105,7 @@ struct decoder_control { G_GNUC_MALLOC struct decoder_control * -dc_new(struct player_control *pc); +dc_new(GCond *client_cond); void dc_free(struct decoder_control *dc); -- cgit v1.2.3