[vlc-devel] [PATCH 6/9] actions: reorder into relevant sections

Victorien Le Couviour--Tuffet victorien.lecouviour.tuffet at gmail.com
Tue Nov 27 13:34:44 CET 2018


This is used by the next commit for refactor purposes.
---
 include/vlc_actions.h | 167 ++++++++++++++++++++++--------------------
 src/misc/actions.c    |   4 +-
 2 files changed, 91 insertions(+), 80 deletions(-)

diff --git a/include/vlc_actions.h b/include/vlc_actions.h
index 404c1662a8..5ab013d990 100644
--- a/include/vlc_actions.h
+++ b/include/vlc_actions.h
@@ -120,34 +120,19 @@ VLC_API uint_fast32_t vlc_str2keycode(const char *str) VLC_USED;
 typedef enum vlc_action_id {
     ACTIONID_NONE = 0,
     ACTIONID_QUIT,
-    ACTIONID_PLAY_PAUSE,
-    ACTIONID_PLAY,
-    ACTIONID_PAUSE,
-    ACTIONID_STOP,
+    /* intf actions */
+    ACTIONID_INTF_TOGGLE_FSC,
+    ACTIONID_INTF_HIDE,
+    ACTIONID_INTF_BOSS,
+    ACTIONID_INTF_POPUP_MENU,
+    /* playlist interaction */
+    ACTIONID_PLAY_CLEAR,
     ACTIONID_PREV,
     ACTIONID_NEXT,
-    ACTIONID_SLOWER,
-    ACTIONID_FASTER,
-    ACTIONID_TOGGLE_FULLSCREEN,
-    ACTIONID_VOL_UP,
-    ACTIONID_VOL_DOWN,
-    ACTIONID_NAV_ACTIVATE,
-    ACTIONID_NAV_UP,
-    ACTIONID_NAV_DOWN,
-    ACTIONID_NAV_LEFT,
-    ACTIONID_NAV_RIGHT,
-    ACTIONID_JUMP_BACKWARD_EXTRASHORT,
-    ACTIONID_JUMP_FORWARD_EXTRASHORT,
-    ACTIONID_JUMP_BACKWARD_SHORT,
-    ACTIONID_JUMP_FORWARD_SHORT,
-    ACTIONID_JUMP_BACKWARD_MEDIUM,
-    ACTIONID_JUMP_FORWARD_MEDIUM,
-    ACTIONID_JUMP_BACKWARD_LONG,
-    ACTIONID_JUMP_FORWARD_LONG,
-    ACTIONID_FRAME_NEXT,
-    ACTIONID_POSITION,
-    ACTIONID_VOL_MUTE,
-/* let ACTIONID_SET_BOOMARK* and ACTIONID_PLAY_BOOKMARK* be contiguous */
+    /* playback */
+    ACTIONID_LOOP,
+    ACTIONID_RANDOM,
+    /* playlist bookmarks */
     ACTIONID_SET_BOOKMARK1,
     ACTIONID_SET_BOOKMARK2,
     ACTIONID_SET_BOOKMARK3,
@@ -168,43 +153,85 @@ typedef enum vlc_action_id {
     ACTIONID_PLAY_BOOKMARK8,
     ACTIONID_PLAY_BOOKMARK9,
     ACTIONID_PLAY_BOOKMARK10,
-    /* end of contiguous zone */
-    ACTIONID_PLAY_CLEAR,
-    ACTIONID_SUBDELAY_UP,
+    /* player state */
+    ACTIONID_PLAY_PAUSE,
+    ACTIONID_PLAY,
+    ACTIONID_PAUSE,
+    ACTIONID_STOP,
+    ACTIONID_FRAME_NEXT,
+    /* input seeking */
+    ACTIONID_JUMP_BACKWARD_EXTRASHORT,
+    ACTIONID_JUMP_FORWARD_EXTRASHORT,
+    ACTIONID_JUMP_BACKWARD_SHORT,
+    ACTIONID_JUMP_FORWARD_SHORT,
+    ACTIONID_JUMP_BACKWARD_MEDIUM,
+    ACTIONID_JUMP_FORWARD_MEDIUM,
+    ACTIONID_JUMP_BACKWARD_LONG,
+    ACTIONID_JUMP_FORWARD_LONG,
+    ACTIONID_POSITION,
+    /* program SID, chapter and title navigation */
+    ACTIONID_PROGRAM_SID_PREV,
+    ACTIONID_PROGRAM_SID_NEXT,
+    ACTIONID_TITLE_PREV,
+    ACTIONID_TITLE_NEXT,
+    ACTIONID_CHAPTER_PREV,
+    ACTIONID_CHAPTER_NEXT,
+    ACTIONID_DISC_MENU,
+    /* audio / subtitle track */
+    ACTIONID_AUDIO_TRACK,
+    ACTIONID_SUBTITLE_REVERSE_TRACK,
+    ACTIONID_SUBTITLE_TRACK,
+    /* audio / subtitle delay */
+    ACTIONID_AUDIODELAY_DOWN,
+    ACTIONID_AUDIODELAY_UP,
     ACTIONID_SUBDELAY_DOWN,
+    ACTIONID_SUBDELAY_UP,
+    /* subtitle toggle */
+    ACTIONID_SUBTITLE_TOGGLE,
+    /* subtitle sync */
     ACTIONID_SUBSYNC_MARKAUDIO,
     ACTIONID_SUBSYNC_MARKSUB,
     ACTIONID_SUBSYNC_APPLY,
     ACTIONID_SUBSYNC_RESET,
-    ACTIONID_SUBPOS_UP,
+    /* subtitle display */
     ACTIONID_SUBPOS_DOWN,
-    ACTIONID_AUDIO_TRACK,
-    ACTIONID_SUBTITLE_REVERSE_TRACK,
-    ACTIONID_SUBTITLE_TRACK,
-    ACTIONID_SUBTITLE_TOGGLE,
+    ACTIONID_SUBPOS_UP,
     ACTIONID_SUBTITLE_TEXT_SCALE_NORMAL,
-    ACTIONID_SUBTITLE_TEXT_SCALE_UP,
     ACTIONID_SUBTITLE_TEXT_SCALE_DOWN,
-    ACTIONID_INTF_TOGGLE_FSC,
-    ACTIONID_INTF_HIDE,
-    ACTIONID_INTF_BOSS,
-    /* chapter and title navigation */
-    ACTIONID_TITLE_PREV,
-    ACTIONID_TITLE_NEXT,
-    ACTIONID_CHAPTER_PREV,
-    ACTIONID_CHAPTER_NEXT,
-    /* end of chapter and title navigation */
-    ACTIONID_AUDIODELAY_UP,
-    ACTIONID_AUDIODELAY_DOWN,
-    ACTIONID_SNAPSHOT,
+    ACTIONID_SUBTITLE_TEXT_SCALE_UP,
+    /* input rate */
+    ACTIONID_RATE_NORMAL,
+    ACTIONID_RATE_SLOWER,
+    ACTIONID_RATE_FASTER,
+    ACTIONID_RATE_SLOWER_FINE,
+    ACTIONID_RATE_FASTER_FINE,
+    /* input navigation */
+    ACTIONID_NAV_ACTIVATE,
+    ACTIONID_NAV_UP,
+    ACTIONID_NAV_DOWN,
+    ACTIONID_NAV_LEFT,
+    ACTIONID_NAV_RIGHT,
+    /* input recording */
     ACTIONID_RECORD,
-    ACTIONID_DISC_MENU,
+    /* viewpoint */
+    ACTIONID_VIEWPOINT_FOV_IN,
+    ACTIONID_VIEWPOINT_FOV_OUT,
+    ACTIONID_VIEWPOINT_ROLL_CLOCK,
+    ACTIONID_VIEWPOINT_ROLL_ANTICLOCK,
+    /* aout actions */
+    ACTIONID_VOL_DOWN,
+    ACTIONID_VOL_UP,
+    ACTIONID_VOL_MUTE,
+    ACTIONID_AUDIODEVICE_CYCLE,
+    /* all vouts actions */
+    ACTIONID_TOGGLE_FULLSCREEN,
+    ACTIONID_LEAVE_FULLSCREEN,
+    ACTIONID_SNAPSHOT,
+    ACTIONID_WALLPAPER,
+    /* vout aspect ratio */
     ACTIONID_ASPECT_RATIO,
+    /* vout cropping */
     ACTIONID_CROP,
-    ACTIONID_DEINTERLACE,
-    ACTIONID_DEINTERLACE_MODE,
-    ACTIONID_ZOOM,
-    ACTIONID_UNZOOM,
     ACTIONID_CROP_TOP,
     ACTIONID_UNCROP_TOP,
     ACTIONID_CROP_LEFT,
@@ -213,38 +240,22 @@ typedef enum vlc_action_id {
     ACTIONID_UNCROP_BOTTOM,
     ACTIONID_CROP_RIGHT,
     ACTIONID_UNCROP_RIGHT,
-    ACTIONID_RANDOM,
-    ACTIONID_LOOP,
-    ACTIONID_WALLPAPER,
-    ACTIONID_LEAVE_FULLSCREEN,
-    /* Zoom */
+    /* vout deinterlacing */
+    ACTIONID_DEINTERLACE,
+    ACTIONID_DEINTERLACE_MODE,
+    /* vout scaling / zooming */
+    ACTIONID_TOGGLE_AUTOSCALE,
+    ACTIONID_SCALE_UP,
+    ACTIONID_SCALE_DOWN,
+    ACTIONID_ZOOM,
+    ACTIONID_UNZOOM,
     ACTIONID_ZOOM_QUARTER,
     ACTIONID_ZOOM_HALF,
     ACTIONID_ZOOM_ORIGINAL,
     ACTIONID_ZOOM_DOUBLE,
-    /* Cycle Through Audio Devices */
-    ACTIONID_AUDIODEVICE_CYCLE,
-    /* scaling */
-    ACTIONID_TOGGLE_AUTOSCALE,
-    ACTIONID_SCALE_UP,
-    ACTIONID_SCALE_DOWN,
-    /* */
-    ACTIONID_RATE_NORMAL,
-    ACTIONID_RATE_SLOWER_FINE,
-    ACTIONID_RATE_FASTER_FINE,
-    /* Cycle Through Program Service IDs */
-    ACTIONID_PROGRAM_SID_NEXT,
-    ACTIONID_PROGRAM_SID_PREV,
-    ACTIONID_INTF_POPUP_MENU,
-    /* Viewpoint */
-    ACTIONID_VIEWPOINT_FOV_IN,
-    ACTIONID_VIEWPOINT_FOV_OUT,
-    ACTIONID_VIEWPOINT_ROLL_CLOCK,
-    ACTIONID_VIEWPOINT_ROLL_ANTICLOCK,
     /* Combo Actions */
-    ACTIONID_COMBO_VOL_FOV_UP,
     ACTIONID_COMBO_VOL_FOV_DOWN,
-
+    ACTIONID_COMBO_VOL_FOV_UP,
 } vlc_action_id_t;
 
 /**
diff --git a/src/misc/actions.c b/src/misc/actions.c
index 72a4398334..03d8e99a43 100644
--- a/src/misc/actions.c
+++ b/src/misc/actions.c
@@ -281,7 +281,7 @@ static const struct name2action
     { "deinterlace", ACTIONID_DEINTERLACE, },
     { "deinterlace-mode", ACTIONID_DEINTERLACE_MODE, },
     { "disc-menu", ACTIONID_DISC_MENU, },
-    { "faster", ACTIONID_FASTER, },
+    { "faster", ACTIONID_RATE_FASTER, },
     { "frame-next", ACTIONID_FRAME_NEXT, },
     { "incr-scalefactor", ACTIONID_SCALE_UP, },
     { "intf-boss", ACTIONID_INTF_BOSS, },
@@ -336,7 +336,7 @@ static const struct name2action
     { "set-bookmark7", ACTIONID_SET_BOOKMARK7, },
     { "set-bookmark8", ACTIONID_SET_BOOKMARK8, },
     { "set-bookmark9", ACTIONID_SET_BOOKMARK9, },
-    { "slower", ACTIONID_SLOWER, },
+    { "slower", ACTIONID_RATE_SLOWER, },
     { "snapshot", ACTIONID_SNAPSHOT, },
     { "stop", ACTIONID_STOP, },
     { "subdelay-down", ACTIONID_SUBDELAY_DOWN, },
-- 
2.19.1



More information about the vlc-devel mailing list