mirror of
https://github.com/outbackdingo/UltraGrid.git
synced 2026-03-21 10:40:21 +00:00
Control: pass sender messages also to audio
This commit is contained in:
@@ -300,10 +300,22 @@ static int process_msg(struct control_state *s, fd_t client_fd, char *message)
|
||||
abort();
|
||||
}
|
||||
|
||||
struct msg_sender *msg_audio = (struct msg_sender *) malloc(sizeof(struct msg_sender));
|
||||
memcpy(msg_audio, msg, sizeof(struct msg_sender));
|
||||
if (msg_audio->type == SENDER_MSG_CHANGE_PORT) {
|
||||
msg->port = atoi(suffix(message, "sender-port "));
|
||||
}
|
||||
|
||||
enum module_class path_sender[] = { MODULE_CLASS_SENDER, MODULE_CLASS_NONE };
|
||||
enum module_class path_sender_audio[] = { MODULE_CLASS_AUDIO, MODULE_CLASS_SENDER, MODULE_CLASS_NONE };
|
||||
char path_audio[1024];
|
||||
memcpy(path_audio, path, sizeof(path_audio));
|
||||
append_message_path(path, sizeof(path), path_sender);
|
||||
append_message_path(path_audio, sizeof(path_audio), path_sender_audio);
|
||||
|
||||
resp =
|
||||
send_message(s->root_module, path, (struct message *) msg);
|
||||
send_message(s->root_module, path_audio, (struct message *) msg_audio);
|
||||
} else if (prefix_matches(message, "receiver-port ")) {
|
||||
struct msg_receiver *msg =
|
||||
(struct msg_receiver *)
|
||||
|
||||
Reference in New Issue
Block a user