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
522baa53
Commit
522baa53
authored
May 29, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanup handling of thread-less interfaces
parent
e3fa003b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
16 deletions
+7
-16
src/interface/interface.c
src/interface/interface.c
+6
-10
src/libvlc-common.c
src/libvlc-common.c
+1
-6
No files found.
src/interface/interface.c
View file @
522baa53
...
@@ -150,10 +150,6 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
...
@@ -150,10 +150,6 @@ intf_thread_t* __intf_Create( vlc_object_t *p_this, const char *psz_module,
*/
*/
int
intf_RunThread
(
intf_thread_t
*
p_intf
)
int
intf_RunThread
(
intf_thread_t
*
p_intf
)
{
{
/* This interface doesn't need to be run */
if
(
p_intf
->
pf_run
==
NULL
)
return
VLC_SUCCESS
;
/* Hack to get Mac OS X Cocoa runtime running
/* Hack to get Mac OS X Cocoa runtime running
* (it needs access to the main thread) */
* (it needs access to the main thread) */
if
(
p_intf
->
b_should_run_on_first_thread
)
if
(
p_intf
->
b_should_run_on_first_thread
)
...
@@ -186,11 +182,8 @@ void intf_StopThread( intf_thread_t *p_intf )
...
@@ -186,11 +182,8 @@ void intf_StopThread( intf_thread_t *p_intf )
{
{
/* Tell the interface to die */
/* Tell the interface to die */
vlc_object_kill
(
p_intf
);
vlc_object_kill
(
p_intf
);
if
(
p_intf
->
pf_run
!=
NULL
)
{
vlc_cond_signal
(
&
p_intf
->
object_wait
);
vlc_cond_signal
(
&
p_intf
->
object_wait
);
vlc_thread_join
(
p_intf
);
vlc_thread_join
(
p_intf
);
}
}
}
/* Following functions are local */
/* Following functions are local */
...
@@ -229,7 +222,10 @@ static void RunInterface( intf_thread_t *p_intf )
...
@@ -229,7 +222,10 @@ static void RunInterface( intf_thread_t *p_intf )
do
do
{
{
/* Give control to the interface */
/* Give control to the interface */
if
(
p_intf
->
pf_run
)
p_intf
->
pf_run
(
p_intf
);
p_intf
->
pf_run
(
p_intf
);
else
while
(
vlc_object_lock_and_wait
(
p_intf
)
==
0
);
/* Reset play on start status */
/* Reset play on start status */
p_intf
->
b_play
=
false
;
p_intf
->
b_play
=
false
;
...
...
src/libvlc-common.c
View file @
522baa53
...
@@ -1150,12 +1150,7 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
...
@@ -1150,12 +1150,7 @@ int libvlc_InternalAddIntf( libvlc_int_t *p_libvlc,
if
(
b_block
)
if
(
b_block
)
{
{
/* FIXME: should be moved to interface/interface.c */
if
(
p_intf
->
pf_run
)
vlc_thread_join
(
p_intf
);
vlc_thread_join
(
p_intf
);
else
while
(
vlc_object_lock_and_wait
(
p_intf
)
==
0
);
vlc_object_detach
(
p_intf
);
vlc_object_detach
(
p_intf
);
vlc_object_release
(
p_intf
);
vlc_object_release
(
p_intf
);
}
}
...
...
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