From 34770887410cab45e2779d43a83aa4f6bdecf926 Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 7 May 2015 21:26:11 +0200 Subject: 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). --- player/client.c | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'player/client.c') 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); } -- cgit v1.2.3