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
dd5df29b
Commit
dd5df29b
authored
Mar 17, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Gestures: privatize interface callback lock
And hmm, this really should use a condition variable too.
parent
ef652e91
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
5 deletions
+8
-5
modules/control/gestures.c
modules/control/gestures.c
+8
-5
No files found.
modules/control/gestures.c
View file @
dd5df29b
...
...
@@ -45,6 +45,7 @@
*****************************************************************************/
struct
intf_sys_t
{
vlc_mutex_t
lock
;
vlc_object_t
*
p_vout
;
bool
b_got_gesture
;
bool
b_button_pressed
;
...
...
@@ -119,6 +120,7 @@ int Open ( vlc_object_t *p_this )
// Configure the module
p_intf
->
pf_run
=
RunIntf
;
vlc_mutex_init
(
&
p_sys
->
lock
);
p_sys
->
p_vout
=
NULL
;
p_sys
->
b_got_gesture
=
false
;
p_sys
->
b_button_pressed
=
false
;
...
...
@@ -166,6 +168,7 @@ void Close ( vlc_object_t *p_this )
}
/* Destroy structure */
vlc_mutex_destroy
(
&
p_intf
->
p_sys
->
lock
);
free
(
p_intf
->
p_sys
);
}
...
...
@@ -182,7 +185,7 @@ static void RunIntf( intf_thread_t *p_intf )
/* Main loop */
while
(
vlc_object_alive
(
p_intf
)
)
{
vlc_mutex_lock
(
&
p_intf
->
change_
lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
/*
* mouse cursor
...
...
@@ -443,7 +446,7 @@ static void RunIntf( intf_thread_t *p_intf )
}
}
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
/* Wait a bit */
msleep
(
INTF_IDLE_SLEEP
);
...
...
@@ -465,12 +468,12 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
signed
int
i_horizontal
,
i_vertical
;
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_data
;
vlc_mutex_lock
(
&
p_intf
->
change_
lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
/* don't process new gestures before the last events are processed */
if
(
p_intf
->
p_sys
->
b_got_gesture
)
{
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
return
VLC_SUCCESS
;
}
...
...
@@ -539,7 +542,7 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
p_intf
->
p_sys
->
b_got_gesture
=
true
;
}
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
return
VLC_SUCCESS
;
}
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