player_control: removed the global variable "pc"
Allocate a player_control object where needed, and pass it around. Each "client" object is associated with a "player_control" instance. This prepares multi-player support.
This commit is contained in:
@@ -28,8 +28,9 @@
|
||||
#define G_LOG_DOMAIN "decoder_control"
|
||||
|
||||
void
|
||||
dc_init(struct decoder_control *dc)
|
||||
dc_init(struct decoder_control *dc, struct player_control *pc)
|
||||
{
|
||||
dc->player_control = pc;
|
||||
dc->thread = NULL;
|
||||
|
||||
dc->mutex = g_mutex_new();
|
||||
@@ -62,7 +63,7 @@ static void
|
||||
dc_command_wait_locked(struct decoder_control *dc)
|
||||
{
|
||||
while (dc->command != DECODE_COMMAND_NONE)
|
||||
player_wait_decoder(dc);
|
||||
player_wait_decoder(dc->player_control, dc);
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user