aboutsummaryrefslogtreecommitdiffstats
path: root/src/decoder_control.c
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.c
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.c')
-rw-r--r--src/decoder_control.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/decoder_control.c b/src/decoder_control.c
index a570b2441..15f60790f 100644
--- a/src/decoder_control.c
+++ b/src/decoder_control.c
@@ -19,7 +19,6 @@
#include "config.h"
#include "decoder_control.h"
-#include "player_control.h"
#include "pipe.h"
#include <assert.h>
@@ -28,15 +27,15 @@
#define G_LOG_DOMAIN "decoder_control"
struct decoder_control *
-dc_new(struct player_control *pc)
+dc_new(GCond *client_cond)
{
struct decoder_control *dc = g_new(struct decoder_control, 1);
- dc->player_control = pc;
dc->thread = NULL;
dc->mutex = g_mutex_new();
dc->cond = g_cond_new();
+ dc->client_cond = client_cond;
dc->state = DECODE_STATE_STOP;
dc->command = DECODE_COMMAND_NONE;
@@ -65,7 +64,7 @@ static void
dc_command_wait_locked(struct decoder_control *dc)
{
while (dc->command != DECODE_COMMAND_NONE)
- player_wait_decoder(dc->player_control, dc);
+ g_cond_wait(dc->client_cond, dc->mutex);
}
static void