summaryrefslogtreecommitdiffstats
path: root/player/client.c
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2015-05-07 21:26:11 +0200
committerwm4 <wm4@nowhere>2015-05-07 21:26:11 +0200
commit34770887410cab45e2779d43a83aa4f6bdecf926 (patch)
tree2f61367ee2e4e736e9d4e64c8ea2ecff78f176e9 /player/client.c
parent036a49478ff6cc19abfa06b7807bd4653eb9ce33 (diff)
downloadmpv-34770887410cab45e2779d43a83aa4f6bdecf926.tar.bz2
mpv-34770887410cab45e2779d43a83aa4f6bdecf926.tar.xz
player: use profiles for libmpv and encoding defaults
The client API (libmpv) and encoding (--o) have slightly different defaults from the command line player. Instead of doing a bunch of calls to set the options explicitly, use profiles. This is simpler and has the advantage that they can be listed on command line (instead of possibly forcing the user to find and read the code to know all the details).
Diffstat (limited to 'player/client.c')
-rw-r--r--player/client.c15
1 files changed, 1 insertions, 14 deletions
diff --git a/player/client.c b/player/client.c
index 43c7c07c60..4fba2912e7 100644
--- a/player/client.c
+++ b/player/client.c
@@ -466,20 +466,7 @@ mpv_handle *mpv_create(void)
if (ctx) {
ctx->owner = true;
ctx->fuzzy_initialized = true;
- // Set some defaults.
- mpv_set_option_string(ctx, "config", "no");
- mpv_set_option_string(ctx, "idle", "yes");
- mpv_set_option_string(ctx, "terminal", "no");
- mpv_set_option_string(ctx, "input-terminal", "no");
- mpv_set_option_string(ctx, "osc", "no");
- mpv_set_option_string(ctx, "ytdl", "no");
- mpv_set_option_string(ctx, "input-default-bindings", "no");
- mpv_set_option_string(ctx, "input-vo-keyboard", "no");
- mpv_set_option_string(ctx, "input-lirc", "no");
- mpv_set_option_string(ctx, "input-appleremote", "no");
- mpv_set_option_string(ctx, "input-media-keys", "no");
- mpv_set_option_string(ctx, "input-app-events", "no");
- mpv_set_option_string(ctx, "stop-playback-on-init-failure", "yes");
+ m_config_set_profile(mpctx->mconfig, "libmpv", 0);
} else {
mp_destroy(mpctx);
}