aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_control.h
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2011-01-10 21:27:43 +0100
committerMax Kellermann <max@duempel.org>2011-01-10 21:27:43 +0100
commita0ad96a787d5df3f0cbd0c40252312700320a849 (patch)
tree1d9c66b3880180ae6c7453515aaad7942a8b474a /src/decoder_control.h
parent39c5af5dbc1ccf0b103daaaed642c2d8af3210a8 (diff)
downloadmpd-a0ad96a787d5df3f0cbd0c40252312700320a849.tar.gz
mpd-a0ad96a787d5df3f0cbd0c40252312700320a849.tar.xz
mpd-a0ad96a787d5df3f0cbd0c40252312700320a849.zip
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.
Diffstat (limited to 'src/decoder_control.h')
-rw-r--r--src/decoder_control.h16
1 files changed, 7 insertions, 9 deletions
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 <assert.h>
-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);