From cb604d5412f0eb87d030d75f5ca44370fdfa26f6 Mon Sep 17 00:00:00 2001 From: wm4 Date: Sat, 17 Sep 2016 21:01:59 +0200 Subject: command: add an apply-profile command This will actually update all associated options (which is trivial now with the recent changes). --- player/command.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'player/command.c') diff --git a/player/command.c b/player/command.c index d791838ef8..f275fcc489 100644 --- a/player/command.c +++ b/player/command.c @@ -5514,6 +5514,14 @@ int run_command(struct MPContext *mpctx, struct mp_cmd *cmd, struct mpv_node *re break; } + case MP_CMD_APPLY_PROFILE: { + char *profile = cmd->args[0].v.s; + int flags = mpctx->initialized ? M_SETOPT_RUNTIME : 0; + if (m_config_set_profile(mpctx->mconfig, profile, flags) < 0) + return -1; + break; + } + default: MP_VERBOSE(mpctx, "Received unknown cmd %s\n", cmd->name); return -1; -- cgit v1.2.3