Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
d2c70247
Commit
d2c70247
authored
Dec 10, 2003
by
Yoann Peronneau
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added a hotkey ('t') which displays the position in the media
parent
6d316cc7
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
3 deletions
+45
-3
include/vlc_keys.h
include/vlc_keys.h
+2
-1
modules/control/hotkeys.c
modules/control/hotkeys.c
+37
-1
src/libvlc.h
src/libvlc.h
+6
-1
No files found.
include/vlc_keys.h
View file @
d2c70247
...
...
@@ -2,7 +2,7 @@
* hotkeys.h: keycode defines
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: vlc_keys.h,v 1.
9 2003/11/16 22:10:16 sam
Exp $
* $Id: vlc_keys.h,v 1.
10 2003/12/10 17:19:05 yoann
Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -198,3 +198,4 @@ static inline int StringToKey( char *psz_key )
#define ACTIONID_JUMP_FORWARD_1MIN 21
#define ACTIONID_JUMP_BACKWARD_5MIN 22
#define ACTIONID_JUMP_FORWARD_5MIN 23
#define ACTIONID_POSITION 24
modules/control/hotkeys.c
View file @
d2c70247
...
...
@@ -2,7 +2,7 @@
* hotkeys.c: Hotkey handling for vlc
*****************************************************************************
* Copyright (C) 2003 VideoLAN
* $Id: hotkeys.c,v 1.
9 2003/12/08 13:04:58 gbazi
n Exp $
* $Id: hotkeys.c,v 1.
10 2003/12/10 17:19:05 yoan
n Exp $
*
* Authors: Sigmund Augdal <sigmunau@idi.ntnu.no>
*
...
...
@@ -351,6 +351,42 @@ static void Run( intf_thread_t *p_intf )
vlc_value_t
val
;
val
.
b_bool
=
VLC_TRUE
;
var_Set
(
p_input
,
"rate-slower"
,
val
);
}
else
if
(
i_action
==
ACTIONID_POSITION
)
{
p_playlist
=
vlc_object_find
(
p_intf
,
VLC_OBJECT_PLAYLIST
,
FIND_ANYWHERE
);
char
psz_duration
[
MSTRTIME_MAX_SIZE
];
char
psz_time
[
MSTRTIME_MAX_SIZE
];
vlc_value_t
time
;
mtime_t
i_seconds
;
var_Get
(
p_input
,
"time"
,
&
time
);
if
(
p_playlist
)
{
mtime_t
dur
=
p_playlist
->
pp_items
[
p_playlist
->
i_index
]
->
i_duration
;
i_seconds
=
time
.
i_time
/
1000000
;
secstotimestr
(
psz_time
,
i_seconds
);
if
(
dur
!=
-
1
)
{
char
psz_position
[
2
*
MSTRTIME_MAX_SIZE
+
3
];
secstotimestr
(
psz_duration
,
dur
/
1000000
);
strcpy
(
psz_position
,
psz_time
);
strcat
(
psz_position
,
" / "
);
strcat
(
psz_position
,
psz_duration
);
vout_OSDMessage
(
VLC_OBJECT
(
p_playlist
),
psz_position
);
}
else
if
(
i_seconds
>
0
)
{
vout_OSDMessage
(
VLC_OBJECT
(
p_playlist
),
psz_time
);
}
}
vlc_object_release
(
p_playlist
);
}
}
}
...
...
src/libvlc.h
View file @
d2c70247
...
...
@@ -2,7 +2,7 @@
* libvlc.h: main libvlc header
*****************************************************************************
* Copyright (C) 1998-2002 VideoLAN
* $Id: libvlc.h,v 1.11
5 2003/12/09 00:46:03
yoann Exp $
* $Id: libvlc.h,v 1.11
6 2003/12/10 17:19:05
yoann Exp $
*
* Authors: Vincent Seguin <seguin@via.ecp.fr>
* Samuel Hocevar <sam@zoy.org>
...
...
@@ -545,6 +545,8 @@ static char *ppsz_language_text[] =
#define PREV_KEY_LONGTEXT N_("Select the hotkey to use to skip to the previous item in the playlist")
#define STOP_KEY_TEXT N_("Stop")
#define STOP_KEY_LONGTEXT N_("Select the hotkey to stop the playback")
#define POSITION_KEY_TEXT N_("Position")
#define POSITION_KEY_LONGTEXT N_("Select the hotkey to display the position")
#define JB10SEC_KEY_TEXT N_("Jump backward 10 seconds")
#define JB10SEC_KEY_LONGTEXT N_("Select the hotkey to jump backward by 10 seconds")
...
...
@@ -800,6 +802,7 @@ vlc_module_begin();
add_key
(
"key-next"
,
KEY_MODIFIER_COMMAND
|
KEY_RIGHT
,
NULL
,
NEXT_KEY_TEXT
,
NEXT_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-prev"
,
KEY_MODIFIER_COMMAND
|
KEY_LEFT
,
NULL
,
PREV_KEY_TEXT
,
PREV_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-stop"
,
KEY_MODIFIER_COMMAND
|
'.'
,
NULL
,
STOP_KEY_TEXT
,
STOP_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-position"
,
KEY_MODIFIER_COMMAND
|
't'
,
NULL
,
POSITION_KEY_TEXT
,
POSITION_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-jump-10sec"
,
KEY_MODIFIER_COMMAND
|
KEY_MODIFIER_ALT
|
KEY_LEFT
,
NULL
,
JB10SEC_KEY_TEXT
,
JB10SEC_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-jump+10sec"
,
KEY_MODIFIER_COMMAND
|
KEY_MODIFIER_ALT
|
KEY_RIGHT
,
NULL
,
JF10SEC_KEY_TEXT
,
JF10SEC_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-jump-1min"
,
KEY_MODIFIER_COMMAND
|
KEY_MODIFIER_SHIFT
|
KEY_LEFT
,
NULL
,
JB1MIN_KEY_TEXT
,
JB1MIN_KEY_LONGTEXT
,
VLC_FALSE
);
...
...
@@ -824,6 +827,7 @@ vlc_module_begin();
add_key
(
"key-next"
,
'n'
,
NULL
,
NEXT_KEY_TEXT
,
NEXT_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-prev"
,
'p'
,
NULL
,
PREV_KEY_TEXT
,
PREV_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-stop"
,
's'
,
NULL
,
STOP_KEY_TEXT
,
STOP_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-position"
,
't'
,
NULL
,
POSITION_KEY_TEXT
,
POSITION_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-jump-10sec"
,
KEY_MODIFIER_ALT
|
KEY_LEFT
,
NULL
,
JB10SEC_KEY_TEXT
,
JB10SEC_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-jump+10sec"
,
KEY_MODIFIER_ALT
|
KEY_RIGHT
,
NULL
,
JF10SEC_KEY_TEXT
,
JF10SEC_KEY_LONGTEXT
,
VLC_FALSE
);
add_key
(
"key-jump-1min"
,
KEY_MODIFIER_CTRL
|
KEY_LEFT
,
NULL
,
JB1MIN_KEY_TEXT
,
JB1MIN_KEY_LONGTEXT
,
VLC_FALSE
);
...
...
@@ -882,6 +886,7 @@ static struct hotkey p_hotkeys[] =
{
"key-play"
,
ACTIONID_PLAY
,
0
},
{
"key-pause"
,
ACTIONID_PAUSE
,
0
},
{
"key-stop"
,
ACTIONID_STOP
,
0
},
{
"key-position"
,
ACTIONID_POSITION
,
0
},
{
"key-jump-10sec"
,
ACTIONID_JUMP_BACKWARD_10SEC
,
0
},
{
"key-jump+10sec"
,
ACTIONID_JUMP_FORWARD_10SEC
,
0
},
{
"key-jump-1min"
,
ACTIONID_JUMP_BACKWARD_1MIN
,
0
},
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment