[vlc-devel] commit: Added hotkey code for input "frame-next". (Laurent Aimar )
git version control
git at videolan.org
Wed Oct 22 22:22:05 CEST 2008
vlc | branch: master | Laurent Aimar <fenrir at videolan.org> | Mon Oct 13 23:15:00 2008 +0200| [321e04ca2733320670bada94ae1b12e0e9ceb046] | committer: Laurent Aimar
Added hotkey code for input "frame-next".
No default key is assigned.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=321e04ca2733320670bada94ae1b12e0e9ceb046
---
include/vlc_keys.h | 1 +
modules/control/hotkeys.c | 6 ++++++
src/libvlc-module.c | 8 ++++++++
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/include/vlc_keys.h b/include/vlc_keys.h
index a3fca57..210d107 100644
--- a/include/vlc_keys.h
+++ b/include/vlc_keys.h
@@ -261,6 +261,7 @@ typedef enum vlc_key {
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 */
diff --git a/modules/control/hotkeys.c b/modules/control/hotkeys.c
index 81d3868..e6c2ddb 100644
--- a/modules/control/hotkeys.c
+++ b/modules/control/hotkeys.c
@@ -699,6 +699,12 @@ static void Run( intf_thread_t *p_intf )
{
playlist_Stop( p_playlist );
}
+ else if( i_action == ACTIONID_FRAME_NEXT )
+ {
+ var_SetVoid( p_input, "frame-next" );
+ vout_OSDMessage( VLC_OBJECT(p_input), DEFAULT_CHAN,
+ _("Next frame") );
+ }
else if( i_action == ACTIONID_FASTER )
{
var_SetVoid( p_input, "rate-faster" );
diff --git a/src/libvlc-module.c b/src/libvlc-module.c
index abd4c6b..8c8079d 100644
--- a/src/libvlc-module.c
+++ b/src/libvlc-module.c
@@ -1218,6 +1218,9 @@ static const char *const ppsz_albumart_descriptions[] =
#define JFLONG_KEY_TEXT N_("Long forward jump")
#define JFLONG_KEY_LONGTEXT \
N_("Select the hotkey to make a long forward jump.")
+#define FRAME_NEXT_KEY_TEXT N_("Next frame")
+#define FRAME_NEXT_KEY_LONGTEXT \
+ N_("Select the hotkey to got to the next video frame.")
#define JIEXTRASHORT_TEXT N_("Very short jump length")
#define JIEXTRASHORT_LONGTEXT N_("Very short jump length, in seconds.")
@@ -2073,6 +2076,7 @@ vlc_module_begin();
# define KEY_JUMP_PMEDIUM KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_RIGHT
# define KEY_JUMP_MLONG KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_MODIFIER_ALT|KEY_LEFT
# define KEY_JUMP_PLONG KEY_MODIFIER_COMMAND|KEY_MODIFIER_SHIFT|KEY_MODIFIER_ALT|KEY_RIGHT
+# define KEY_FRAME_NEXT KEY_UNSET
# define KEY_NAV_ACTIVATE KEY_ENTER
# define KEY_NAV_UP KEY_UP
# define KEY_NAV_DOWN KEY_DOWN
@@ -2180,6 +2184,7 @@ vlc_module_begin();
# define KEY_JUMP_PMEDIUM KEY_MODIFIER_CTRL|KEY_RIGHT
# define KEY_JUMP_MLONG KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|KEY_LEFT
# define KEY_JUMP_PLONG KEY_MODIFIER_CTRL|KEY_MODIFIER_ALT|KEY_RIGHT
+# define KEY_FRAME_NEXT KEY_UNSET
# define KEY_NAV_ACTIVATE KEY_ENTER
# define KEY_NAV_UP KEY_UP
# define KEY_NAV_DOWN KEY_DOWN
@@ -2308,6 +2313,8 @@ vlc_module_begin();
JBLONG_KEY_LONGTEXT, false );
add_key( "key-jump+long", KEY_JUMP_PLONG, NULL, JFLONG_KEY_TEXT,
JFLONG_KEY_LONGTEXT, false );
+ add_key( "key-frame-next", KEY_FRAME_NEXT, NULL, FRAME_NEXT_KEY_TEXT,
+ FRAME_NEXT_KEY_LONGTEXT, false );
add_key( "key-nav-activate", KEY_NAV_ACTIVATE, NULL, NAV_ACTIVATE_KEY_TEXT,
NAV_ACTIVATE_KEY_LONGTEXT, true );
add_key( "key-nav-up", KEY_NAV_UP, NULL, NAV_UP_KEY_TEXT,
@@ -2613,6 +2620,7 @@ const struct hotkey libvlc_hotkeys[] =
{ "key-jump+medium", ACTIONID_JUMP_FORWARD_MEDIUM, 0, },
{ "key-jump-long", ACTIONID_JUMP_BACKWARD_LONG, 0, },
{ "key-jump+long", ACTIONID_JUMP_FORWARD_LONG, 0, },
+ { "key-frame-next", ACTIONID_FRAME_NEXT, 0, },
{ "key-prev", ACTIONID_PREV, 0, },
{ "key-next", ACTIONID_NEXT, 0, },
{ "key-faster", ACTIONID_FASTER, 0, },
More information about the vlc-devel
mailing list