Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
59414b08
Commit
59414b08
authored
Mar 17, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMML: privatize callback lock
parent
31b183e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
6 deletions
+11
-6
modules/codec/cmml/intf.c
modules/codec/cmml/intf.c
+11
-6
No files found.
modules/codec/cmml/intf.c
View file @
59414b08
...
...
@@ -61,6 +61,7 @@
*****************************************************************************/
struct
intf_sys_t
{
vlc_mutex_t
lock
;
decoder_t
*
p_cmml_decoder
;
input_thread_t
*
p_input
;
...
...
@@ -123,6 +124,7 @@ int OpenIntf ( vlc_object_t *p_this )
return
VLC_ENOMEM
;
p_intf
->
pf_run
=
RunIntf
;
vlc_mutex_init
(
&
p_intf
->
p_sys
->
lock
);
var_AddCallback
(
p_intf
->
p_libvlc
,
"key-action"
,
KeyEvent
,
p_intf
);
/* we also need to add the callback for "mouse-clicked", but do that later
...
...
@@ -166,6 +168,7 @@ void CloseIntf ( vlc_object_t *p_this )
vlc_object_release
(
p_intf
->
p_sys
->
p_cmml_decoder
);
vlc_mutex_destroy
(
&
p_intf
->
p_sys
->
lock
);
free
(
p_intf
->
p_sys
);
}
...
...
@@ -212,7 +215,7 @@ static void RunIntf( intf_thread_t *p_intf )
}
}
vlc_mutex_lock
(
&
p_intf
->
change_
lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
/*
* keyboard event
...
...
@@ -232,7 +235,7 @@ static void RunIntf( intf_thread_t *p_intf )
break
;
}
p_intf
->
p_sys
->
i_key_action
=
0
;
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
(
void
)
DisplayPendingAnchor
(
p_intf
,
p_vout
);
...
...
@@ -334,14 +337,14 @@ static int InitThread( intf_thread_t * p_intf )
return
VLC_EGENERIC
;
}
vlc_mutex_lock
(
&
p_intf
->
change_
lock
);
vlc_mutex_lock
(
&
p_intf
->
p_sys
->
lock
);
p_intf
->
p_sys
->
p_input
=
p_input
;
p_intf
->
p_sys
->
p_cmml_decoder
=
p_cmml_decoder
;
p_intf
->
p_sys
->
i_key_action
=
0
;
vlc_mutex_unlock
(
&
p_intf
->
change_
lock
);
vlc_mutex_unlock
(
&
p_intf
->
p_sys
->
lock
);
return
VLC_SUCCESS
;
}
...
...
@@ -374,11 +377,13 @@ static int KeyEvent( vlc_object_t *p_this, char const *psz_var,
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
psz_var
);
VLC_UNUSED
(
oldval
);
VLC_UNUSED
(
newval
);
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
);
/* FIXME: key presses might get lost here... */
p_intf
->
p_sys
->
i_key_action
=
newval
.
i_int
;
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