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
72499a50
Commit
72499a50
authored
Feb 01, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
input: define proper controls for menu navigation
parent
2cb909b3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
43 additions
and
0 deletions
+43
-0
include/vlc_demux.h
include/vlc_demux.h
+7
-0
include/vlc_input.h
include/vlc_input.h
+7
-0
src/input/control.c
src/input/control.c
+9
-0
src/input/input.c
src/input/input.c
+14
-0
src/input/input_internal.h
src/input/input_internal.h
+6
-0
No files found.
include/vlc_demux.h
View file @
72499a50
...
...
@@ -161,6 +161,13 @@ enum demux_query_e
DEMUX_CAN_SEEK
,
/* arg1= bool* can fail (assume false)*/
DEMUX_GET_SIGNAL
,
/* arg1= double * arg2= double * can fail */
/* Navigation */
DEMUX_NAV_ACTIVATE
,
/* res=can fail */
DEMUX_NAV_UP
,
/* res=can fail */
DEMUX_NAV_DOWN
,
/* res=can fail */
DEMUX_NAV_LEFT
,
/* res=can fail */
DEMUX_NAV_RIGHT
,
/* res=can fail */
};
VLC_API
int
demux_vaControlHelper
(
stream_t
*
,
int64_t
i_start
,
int64_t
i_end
,
int64_t
i_bitrate
,
int
i_align
,
int
i_query
,
va_list
args
);
...
...
include/vlc_input.h
View file @
72499a50
...
...
@@ -470,6 +470,13 @@ enum input_query_e
INPUT_GET_SPU_DELAY
,
/* arg1 = int* res=can fail */
INPUT_SET_SPU_DELAY
,
/* arg1 = int res=can fail */
/* Menu navigation */
INPUT_NAV_ACTIVATE
,
INPUT_NAV_UP
,
INPUT_NAV_DOWN
,
INPUT_NAV_LEFT
,
INPUT_NAV_RIGHT
,
/* Meta datas */
INPUT_ADD_INFO
,
/* arg1= char* arg2= char* arg3=... res=can fail */
INPUT_REPLACE_INFOS
,
/* arg1= info_category_t * res=cannot fail */
...
...
src/input/control.c
View file @
72499a50
...
...
@@ -136,6 +136,15 @@ int input_vaControl( input_thread_t *p_input, int i_query, va_list args )
i_64
=
(
int64_t
)
va_arg
(
args
,
int64_t
);
return
var_SetTime
(
p_input
,
"spu-delay"
,
i_64
);
case
INPUT_NAV_ACTIVATE
:
case
INPUT_NAV_UP
:
case
INPUT_NAV_DOWN
:
case
INPUT_NAV_LEFT
:
case
INPUT_NAV_RIGHT
:
input_ControlPush
(
p_input
,
i_query
-
INPUT_NAV_ACTIVATE
+
INPUT_CONTROL_NAV_ACTIVATE
,
NULL
);
return
VLC_SUCCESS
;
case
INPUT_ADD_INFO
:
{
char
*
psz_cat
=
(
char
*
)
va_arg
(
args
,
char
*
);
...
...
src/input/input.c
View file @
72499a50
...
...
@@ -1581,6 +1581,11 @@ static bool ControlIsSeekRequest( int i_type )
case
INPUT_CONTROL_SET_SEEKPOINT_NEXT
:
case
INPUT_CONTROL_SET_SEEKPOINT_PREV
:
case
INPUT_CONTROL_SET_BOOKMARK
:
case
INPUT_CONTROL_NAV_ACTIVATE
:
case
INPUT_CONTROL_NAV_UP
:
case
INPUT_CONTROL_NAV_DOWN
:
case
INPUT_CONTROL_NAV_LEFT
:
case
INPUT_CONTROL_NAV_RIGHT
:
return
true
;
default:
return
false
;
...
...
@@ -2175,6 +2180,15 @@ static bool Control( input_thread_t *p_input,
break
;
}
case
INPUT_CONTROL_NAV_ACTIVATE
:
case
INPUT_CONTROL_NAV_UP
:
case
INPUT_CONTROL_NAV_DOWN
:
case
INPUT_CONTROL_NAV_LEFT
:
case
INPUT_CONTROL_NAV_RIGHT
:
demux_Control
(
p_input
->
p
->
input
.
p_demux
,
i_type
-
INPUT_CONTROL_NAV_ACTIVATE
+
DEMUX_NAV_ACTIVATE
);
break
;
default:
msg_Err
(
p_input
,
"not yet implemented"
);
break
;
...
...
src/input/input_internal.h
View file @
72499a50
...
...
@@ -195,6 +195,12 @@ enum input_control_e
INPUT_CONTROL_SET_BOOKMARK
,
INPUT_CONTROL_NAV_ACTIVATE
,
// NOTE: INPUT_CONTROL_NAV_* values must be
INPUT_CONTROL_NAV_UP
,
// contiguous and in the same order as
INPUT_CONTROL_NAV_DOWN
,
// INPUT_NAV_* and DEMUX_NAV_*.
INPUT_CONTROL_NAV_LEFT
,
INPUT_CONTROL_NAV_RIGHT
,
INPUT_CONTROL_SET_ES
,
INPUT_CONTROL_RESTART_ES
,
...
...
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