Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e6c890d1
Commit
e6c890d1
authored
Jul 08, 2013
by
Rafaël Carré
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ncurses: add shortcuts to cycle through audio/subs tracks
parent
69128da6
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
0 deletions
+31
-0
modules/gui/ncurses.c
modules/gui/ncurses.c
+31
-0
No files found.
modules/gui/ncurses.c
View file @
e6c890d1
...
...
@@ -880,6 +880,9 @@ static int DrawHelp(intf_thread_t *intf)
H
(
_
(
" s Stop"
));
H
(
_
(
" <space> Pause/Play"
));
H
(
_
(
" f Toggle Fullscreen"
));
H
(
_
(
" c Cycle through audio tracks"
));
H
(
_
(
" v Cycle through subtitles tracks"
));
H
(
_
(
" b Cycle through video tracks"
));
H
(
_
(
" n, p Next/Previous playlist item"
));
H
(
_
(
" [, ] Next/Previous title"
));
H
(
_
(
" <, > Next/Previous chapter"
));
...
...
@@ -1543,6 +1546,30 @@ static void InputNavigate(input_thread_t* p_input, const char *var)
var_TriggerCallback
(
p_input
,
var
);
}
static
void
CycleESTrack
(
intf_sys_t
*
sys
,
const
char
*
var
)
{
input_thread_t
*
input
=
sys
->
p_input
;
if
(
!
input
)
return
;
vlc_value_t
val
;
if
(
var_Change
(
input
,
var
,
VLC_VAR_GETLIST
,
&
val
,
NULL
)
<
0
)
return
;
vlc_list_t
*
list
=
val
.
p_list
;
int64_t
current
=
var_GetInteger
(
input
,
var
);
int
i
;
for
(
i
=
0
;
i
<
list
->
i_count
;
i
++
)
if
(
list
->
p_values
[
i
].
i_int
==
current
)
break
;
if
(
++
i
>=
list
->
i_count
)
i
=
0
;
var_SetInteger
(
input
,
var
,
list
->
p_values
[
i
].
i_int
);
}
static
void
HandleCommonKey
(
intf_thread_t
*
intf
,
int
key
)
{
intf_sys_t
*
sys
=
intf
->
p_sys
;
...
...
@@ -1611,6 +1638,10 @@ static void HandleCommonKey(intf_thread_t *intf, int key)
case
'z'
:
playlist_VolumeDown
(
p_playlist
,
1
,
NULL
);
break
;
case
'm'
:
playlist_MuteToggle
(
p_playlist
);
break
;
case
'c'
:
CycleESTrack
(
sys
,
"audio-es"
);
break
;
case
'v'
:
CycleESTrack
(
sys
,
"spu-es"
);
break
;
case
'b'
:
CycleESTrack
(
sys
,
"video-es"
);
break
;
case
0x0c
:
/* ^l */
case
KEY_CLEAR
:
break
;
...
...
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