diff options
author | wm4 <wm4@nowhere> | 2016-09-17 21:01:59 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-09-17 21:01:59 +0200 |
commit | cb604d5412f0eb87d030d75f5ca44370fdfa26f6 (patch) | |
tree | 2a5314e264bf62dcf33d0158cbd6e9af880b451a /player | |
parent | a3e8ff624c8adf3b18dddea0fdede7b7fa8c4eb1 (diff) | |
download | mpv-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')
-rw-r--r-- | player/command.c | 8 |
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; |