Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-1.1
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-1.1
Commits
385b4ac8
Commit
385b4ac8
authored
Jul 09, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Code factorization
parent
1665845f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
23 deletions
+3
-23
modules/control/gestures.c
modules/control/gestures.c
+3
-23
No files found.
modules/control/gestures.c
View file @
385b4ac8
...
@@ -179,7 +179,6 @@ void Close ( vlc_object_t *p_this )
...
@@ -179,7 +179,6 @@ void Close ( vlc_object_t *p_this )
static
void
RunIntf
(
intf_thread_t
*
p_intf
)
static
void
RunIntf
(
intf_thread_t
*
p_intf
)
{
{
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
playlist_t
*
p_playlist
=
NULL
;
int
canc
=
vlc_savecancel
();
int
canc
=
vlc_savecancel
();
input_thread_t
*
p_input
;
input_thread_t
*
p_input
;
...
@@ -199,13 +198,12 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -199,13 +198,12 @@ static void RunIntf( intf_thread_t *p_intf )
/* If you modify this, please try to follow this convention:
/* If you modify this, please try to follow this convention:
Start with LEFT, RIGHT for playback related commands
Start with LEFT, RIGHT for playback related commands
and UP, DOWN, for other commands */
and UP, DOWN, for other commands */
playlist_t
*
p_playlist
=
pl_Hold
(
p_intf
);
switch
(
p_sys
->
i_pattern
)
switch
(
p_sys
->
i_pattern
)
{
{
case
LEFT
:
case
LEFT
:
msg_Dbg
(
p_intf
,
"Go backward in the movie!"
);
msg_Dbg
(
p_intf
,
"Go backward in the movie!"
);
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
p_input
)
if
(
p_input
)
{
{
i_interval
=
config_GetInt
(
p_intf
,
"short-jump-size"
);
i_interval
=
config_GetInt
(
p_intf
,
"short-jump-size"
);
...
@@ -220,10 +218,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -220,10 +218,7 @@ static void RunIntf( intf_thread_t *p_intf )
case
RIGHT
:
case
RIGHT
:
msg_Dbg
(
p_intf
,
"Go forward in the movie!"
);
msg_Dbg
(
p_intf
,
"Go forward in the movie!"
);
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
p_input
)
if
(
p_input
)
{
{
i_interval
=
config_GetInt
(
p_intf
,
"short-jump-size"
);
i_interval
=
config_GetInt
(
p_intf
,
"short-jump-size"
);
...
@@ -238,9 +233,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -238,9 +233,7 @@ static void RunIntf( intf_thread_t *p_intf )
case
GESTURE
(
LEFT
,
UP
,
NONE
,
NONE
):
case
GESTURE
(
LEFT
,
UP
,
NONE
,
NONE
):
msg_Dbg
(
p_intf
,
"Going slower."
);
msg_Dbg
(
p_intf
,
"Going slower."
);
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
p_input
)
if
(
p_input
)
{
{
var_SetVoid
(
p_input
,
"rate-slower"
);
var_SetVoid
(
p_input
,
"rate-slower"
);
...
@@ -250,9 +243,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -250,9 +243,7 @@ static void RunIntf( intf_thread_t *p_intf )
case
GESTURE
(
RIGHT
,
UP
,
NONE
,
NONE
):
case
GESTURE
(
RIGHT
,
UP
,
NONE
,
NONE
):
msg_Dbg
(
p_intf
,
"Going faster."
);
msg_Dbg
(
p_intf
,
"Going faster."
);
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
p_input
)
if
(
p_input
)
{
{
var_SetVoid
(
p_input
,
"rate-faster"
);
var_SetVoid
(
p_input
,
"rate-faster"
);
...
@@ -263,9 +254,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -263,9 +254,7 @@ static void RunIntf( intf_thread_t *p_intf )
case
GESTURE
(
LEFT
,
RIGHT
,
NONE
,
NONE
):
case
GESTURE
(
LEFT
,
RIGHT
,
NONE
,
NONE
):
case
GESTURE
(
RIGHT
,
LEFT
,
NONE
,
NONE
):
case
GESTURE
(
RIGHT
,
LEFT
,
NONE
,
NONE
):
msg_Dbg
(
p_intf
,
"Play/Pause"
);
msg_Dbg
(
p_intf
,
"Play/Pause"
);
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
p_input
)
if
(
p_input
)
{
{
...
@@ -277,15 +266,11 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -277,15 +266,11 @@ static void RunIntf( intf_thread_t *p_intf )
break
;
break
;
case
GESTURE
(
LEFT
,
DOWN
,
NONE
,
NONE
):
case
GESTURE
(
LEFT
,
DOWN
,
NONE
,
NONE
):
p_playlist
=
pl_Hold
(
p_intf
);
playlist_Prev
(
p_playlist
);
playlist_Prev
(
p_playlist
);
pl_Release
(
p_intf
);
break
;
break
;
case
GESTURE
(
RIGHT
,
DOWN
,
NONE
,
NONE
):
case
GESTURE
(
RIGHT
,
DOWN
,
NONE
,
NONE
):
p_playlist
=
pl_Hold
(
p_intf
);
playlist_Next
(
p_playlist
);
playlist_Next
(
p_playlist
);
pl_Release
(
p_intf
);
break
;
break
;
case
UP
:
case
UP
:
...
@@ -309,10 +294,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -309,10 +294,7 @@ static void RunIntf( intf_thread_t *p_intf )
vlc_value_t
val
,
list
,
list2
;
vlc_value_t
val
,
list
,
list2
;
int
i_count
,
i
;
int
i_count
,
i
;
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
!
p_input
)
if
(
!
p_input
)
break
;
break
;
...
@@ -352,10 +334,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -352,10 +334,7 @@ static void RunIntf( intf_thread_t *p_intf )
vlc_value_t
val
,
list
,
list2
;
vlc_value_t
val
,
list
,
list2
;
int
i_count
,
i
;
int
i_count
,
i
;
p_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
if
(
!
p_input
)
if
(
!
p_input
)
break
;
break
;
...
@@ -417,6 +396,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -417,6 +396,7 @@ static void RunIntf( intf_thread_t *p_intf )
p_sys
->
i_num_gestures
=
0
;
p_sys
->
i_num_gestures
=
0
;
p_sys
->
i_pattern
=
0
;
p_sys
->
i_pattern
=
0
;
p_sys
->
b_got_gesture
=
false
;
p_sys
->
b_got_gesture
=
false
;
pl_Release
(
p_intf
);
}
}
/*
/*
...
@@ -434,7 +414,7 @@ static void RunIntf( intf_thread_t *p_intf )
...
@@ -434,7 +414,7 @@ static void RunIntf( intf_thread_t *p_intf )
if
(
p_sys
->
p_vout
==
NULL
)
if
(
p_sys
->
p_vout
==
NULL
)
{
{
p_playlist
=
pl_Hold
(
p_intf
);
p
laylist_t
*
p
_playlist
=
pl_Hold
(
p_intf
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
p_input
=
playlist_CurrentInput
(
p_playlist
);
pl_Release
(
p_intf
);
pl_Release
(
p_intf
);
if
(
p_input
)
if
(
p_input
)
...
...
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