Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
c047aa40
Commit
c047aa40
authored
May 23, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not create an interface thread if not needed
parent
156dd2ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/interface/interface.c
src/interface/interface.c
+8
-9
No files found.
src/interface/interface.c
View file @
c047aa40
...
...
@@ -138,6 +138,9 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
return
VLC_EGENERIC
;
}
if
(
p_intf
->
pf_run
==
NULL
)
return
VLC_SUCCESS
;
#if defined( __APPLE__ ) || defined( WIN32 )
/* Hack to get Mac OS X Cocoa runtime running
* (it needs access to the main thread) */
...
...
@@ -150,7 +153,7 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
vlc_object_release
(
p_intf
);
return
VLC_ENOMEM
;
}
RunInterface
(
VLC_OBJECT
(
p_intf
)
);
p_intf
->
pf_run
(
p_intf
);
/* Make sure our MonitorLibVLCDeath thread exit */
vlc_object_kill
(
p_intf
);
...
...
@@ -160,8 +163,8 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
vlc_object_detach
(
p_intf
);
vlc_object_release
(
p_intf
);
return
VLC_SUCCESS
;
}
else
#endif
/* Run the interface in a separate thread */
if
(
vlc_thread_create
(
p_intf
,
"interface"
,
RunInterface
,
...
...
@@ -186,13 +189,12 @@ void intf_StopThread( intf_thread_t *p_intf )
{
/* Tell the interface to die */
vlc_object_kill
(
p_intf
);
vlc_thread_join
(
p_intf
);
if
(
p_intf
->
pf_run
)
vlc_thread_join
(
p_intf
);
module_unneed
(
p_intf
,
p_intf
->
p_module
);
}
/* Following functions are local */
/**
...
...
@@ -204,10 +206,7 @@ static void* RunInterface( vlc_object_t *p_this )
{
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
/* Give control to the interface */
if
(
p_intf
->
pf_run
)
p_intf
->
pf_run
(
p_intf
);
p_intf
->
pf_run
(
p_intf
);
return
NULL
;
}
...
...
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