[vlc-devel] [PATCH 16/20] libvlc: add a key to switch spu channel orders

Thomas Guillem thomas at gllm.fr
Thu Jun 20 17:23:59 CEST 2019


From: Roland Bewick <roland.bewick at gmail.com>

Signed-off-by: Thomas Guillem <thomas at gllm.fr>
---
 include/vlc_actions.h | 2 ++
 src/libvlc-module.c   | 4 ++++
 src/misc/actions.c    | 1 +
 3 files changed, 7 insertions(+)

diff --git a/include/vlc_actions.h b/include/vlc_actions.h
index 62f0afae53..e8e2224c80 100644
--- a/include/vlc_actions.h
+++ b/include/vlc_actions.h
@@ -191,6 +191,8 @@ typedef enum vlc_action_id {
     ACTIONID_SUBDELAY_UP,
     /* subtitle toggle */
     ACTIONID_SUBTITLE_TOGGLE,
+    /* dual subtitle control */
+    ACTIONID_SUBTITLE_CONTROL_SECONDARY,
     /* subtitle sync */
     ACTIONID_SUBSYNC_MARKAUDIO,
     ACTIONID_SUBSYNC_MARKSUB,
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index b1a0c8c522..cf9d96f00d 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -2353,6 +2353,7 @@ vlc_module_begin ()
 #   define KEY_AUDIO_TRACK        "l"
 #   define KEY_SUBTITLE_TRACK     "s"
 #   define KEY_SUBTITLE_TOGGLE    "Shift+s"
+#   define KEY_SUBTITLE_CONTROL_S "Command+Shift+v"
 #   define KEY_SUBTITLE_REVTRACK  "Alt+s"
 #   define KEY_PROGRAM_SID_NEXT   "x"
 #   define KEY_PROGRAM_SID_PREV   "Shift+x"
@@ -2496,6 +2497,7 @@ vlc_module_begin ()
 #   define KEY_AUDIO_TRACK        "b"
 #   define KEY_SUBTITLE_TRACK     "v"
 #   define KEY_SUBTITLE_TOGGLE    "Shift+v"
+#   define KEY_SUBTITLE_CONTROL_S "Ctrl+Shift+v"
 #   define KEY_SUBTITLE_REVTRACK  "Alt+v"
 #   define KEY_PROGRAM_SID_NEXT   "x"
 #   define KEY_PROGRAM_SID_PREV   "Shift+x"
@@ -2665,6 +2667,8 @@ vlc_module_begin ()
             SUBTITLE_TRACK_KEY_TEXT, SUBTITLE_TRACK_KEY_LONGTEXT)
     add_key("key-subtitle-toggle", KEY_SUBTITLE_TOGGLE,
             SUBTITLE_TOGGLE_KEY_TEXT, SUBTITLE_TOGGLE_KEY_LONGTEXT)
+    add_key("key-subtitle-control-secondary", KEY_SUBTITLE_CONTROL_S,
+            SUBTITLE_CONTROL_SECONDARY_KEY_TEXT, SUBTITLE_CONTROL_SECONDARY_KEY_LONGTEXT)
     add_key("key-program-sid-next", KEY_PROGRAM_SID_NEXT,
             PROGRAM_SID_NEXT_KEY_TEXT, PROGRAM_SID_NEXT_KEY_LONGTEXT)
     add_key("key-program-sid-prev", KEY_PROGRAM_SID_PREV,
diff --git a/src/misc/actions.c b/src/misc/actions.c
index e10eb94790..b6e76e75d9 100644
--- a/src/misc/actions.c
+++ b/src/misc/actions.c
@@ -347,6 +347,7 @@ static const struct name2action
     { "subsync-markaudio", ACTIONID_SUBSYNC_MARKAUDIO, },
     { "subsync-marksub", ACTIONID_SUBSYNC_MARKSUB, },
     { "subsync-reset", ACTIONID_SUBSYNC_RESET, },
+    { "subtitle-control-secondary", ACTIONID_SUBTITLE_CONTROL_SECONDARY, },
     { "subtitle-revtrack", ACTIONID_SUBTITLE_REVERSE_TRACK, },
     { "subtitle-text-scale-down", ACTIONID_SUBTITLE_TEXT_SCALE_DOWN, },
     { "subtitle-text-scale-normal", ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL, },
-- 
2.20.1



More information about the vlc-devel mailing list