Video postprocess: moved from decoder to display

This allows postprocess replacement without reconfiguring the whole
decoder (under smoe circumstances).
This commit is contained in:
Martin Pulec
2016-07-22 13:08:59 +02:00
parent c356176219
commit 5197a11c85
11 changed files with 236 additions and 30 deletions

View File

@@ -509,10 +509,10 @@ static int process_msg(struct control_state *s, fd_t client_fd, char *message, s
msg->type = RECEIVER_MSG_MUTE;
resp = send_message(s->root_module, path, (struct message *) msg);
} else if (prefix_matches(message, "postprocess ")) {
strncpy(path, "receiver", sizeof path);
struct msg_receiver *msg = (struct msg_receiver *) new_message(sizeof(struct msg_receiver));
msg->type = RECEIVER_MSG_POSTPROCESS;
strncpy(msg->postprocess_cfg, suffix(message, "postprocess "), sizeof msg->postprocess_cfg - 1);
strncpy(path, "display", sizeof path);
struct msg_universal *msg = (struct msg_universal *) new_message(sizeof(struct msg_universal));
strncpy(msg->text, message, sizeof msg->text - 1);
msg->text[sizeof msg->text - 1] = '\0';
resp = send_message(s->root_module, path, (struct message *) msg);
} else if(strcasecmp(message, "bye") == 0) {
ret = CONTROL_CLOSE_HANDLE;