From 27a8610c560b07b04ca3a4ee3ed0bdb8d1daa672 Mon Sep 17 00:00:00 2001 From: wm4 Date: Fri, 24 Aug 2012 13:29:28 +0200 Subject: input: add ability to disable all default bindings for an input section Add a flags parameter to mp_input_set_section(). Add a flag that defines whether bindings in the default section are used or not. This is useful for special functionality, where the normal key bindings may have unwanted effects. For example, it shouldn't be possible to seek during encoding. However, you want to be able to cancel the encoding process gracefully. For that purpose, the "encode" section of input.conf could be made exclusive: mp_input_set_section(mpctx->input, "encode", MP_INPUT_NO_DEFAULT_SECTION); And input.conf could contain this definition: RIGHT seek 10 q {encode} quit Then only the key "q" would be bound during encoding. --- mplayer.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mplayer.c') diff --git a/mplayer.c b/mplayer.c index 48758b2967..2ed4a3d257 100644 --- a/mplayer.c +++ b/mplayer.c @@ -3613,10 +3613,10 @@ goto_enable_cache: mpctx->sh_video->fps, mpctx->sh_video->frametime); } - mp_input_set_section(mpctx->input, NULL); + mp_input_set_section(mpctx->input, NULL, 0); //TODO: add desired (stream-based) sections here if (mpctx->stream->type == STREAMTYPE_TV) - mp_input_set_section(mpctx->input, "tv"); + mp_input_set_section(mpctx->input, "tv", 0); //==================== START PLAYING ======================= -- cgit v1.2.3