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
eb5d8fad
Commit
eb5d8fad
authored
Mar 17, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
showintf: privatize the callback lock
parent
dd5df29b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
6 deletions
+9
-6
modules/control/showintf.c
modules/control/showintf.c
+9
-6
No files found.
modules/control/showintf.c
View file @
eb5d8fad
...
...
@@ -44,6 +44,7 @@
*****************************************************************************/
struct
intf_sys_t
{
vlc_mutex_t
lock
;
vlc_object_t
*
p_vout
;
bool
b_button_pressed
;
bool
b_triggered
;
...
...
@@ -89,6 +90,7 @@ int Open( vlc_object_t *p_this )
return
(
1
);
};
vlc_mutex_init
(
&
p_intf
->
p_sys
->
lock
);
p_intf
->
pf_run
=
RunIntf
;
return
(
0
);
...
...
@@ -102,6 +104,7 @@ void Close( vlc_object_t *p_this )
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
/* Destroy structure */
vlc_mutex_destroy
(
&
p_intf
->
p_sys
->
lock
);
free
(
p_intf
->
p_sys
);
}
...
...
@@ -123,7 +126,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
);
/* Notify the interfaces */
if
(
p_intf
->
p_sys
->
b_triggered
)
...
...
@@ -132,7 +135,7 @@ static void RunIntf( intf_thread_t *p_intf )
p_intf
->
p_sys
->
b_triggered
=
false
;
}
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
/* Take care of the video output */
...
...
@@ -181,14 +184,14 @@ static int InitThread( intf_thread_t * p_intf )
{
if
(
vlc_object_alive
(
p_intf
)
)
{
vlc_mutex_lock
(
&
p_intf
->
change_
lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
p_intf
->
p_sys
->
b_triggered
=
false
;
p_intf
->
p_sys
->
b_button_pressed
=
false
;
p_intf
->
p_sys
->
i_threshold
=
config_GetInt
(
p_intf
,
"showintf-threshold"
);
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
return
0
;
}
...
...
@@ -219,7 +222,7 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
if
(
!
val
.
i_int
)
return
VLC_SUCCESS
;
vlc_mutex_lock
(
&
p_intf
->
change_
lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
if
(
!
strcmp
(
psz_var
,
"mouse-moved"
)
&&
!
p_intf
->
p_sys
->
b_button_pressed
)
{
var_Get
(
p_intf
->
p_sys
->
p_vout
,
"mouse-x"
,
&
val
);
...
...
@@ -248,7 +251,7 @@ static int MouseEvent( vlc_object_t *p_this, char const *psz_var,
p_intf
->
p_sys
->
b_button_pressed
=
false
;
}
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