summaryrefslogtreecommitdiffstats
path: root/player/command.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-09-17 21:01:59 +0200
committerwm4 <wm4@nowhere>2016-09-17 21:01:59 +0200
commitcb604d5412f0eb87d030d75f5ca44370fdfa26f6 (patch)
tree2a5314e264bf62dcf33d0158cbd6e9af880b451a /player/command.c
parenta3e8ff624c8adf3b18dddea0fdede7b7fa8c4eb1 (diff)
downloadmpv-cb604d5412f0eb87d030d75f5ca44370fdfa26f6.tar.bz2
mpv-cb604d5412f0eb87d030d75f5ca44370fdfa26f6.tar.xz
command: add an apply-profile command
This will actually update all associated options (which is trivial now with the recent changes).
Diffstat (limited to 'player/command.c')
-rw-r--r--player/command.c8
1 files changed, 8 insertions, 0 deletions
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;