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
f818952f
Commit
f818952f
authored
May 23, 2011
by
Laurent Aimar
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Used vlc_clone for interface threads.
parent
0984b220
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
5 deletions
+8
-5
include/vlc_interface.h
include/vlc_interface.h
+1
-0
src/interface/interface.c
src/interface/interface.c
+7
-5
No files found.
include/vlc_interface.h
View file @
f818952f
...
@@ -52,6 +52,7 @@ typedef struct intf_thread_t
...
@@ -52,6 +52,7 @@ typedef struct intf_thread_t
VLC_COMMON_MEMBERS
VLC_COMMON_MEMBERS
struct
intf_thread_t
*
p_next
;
/** LibVLC interfaces book keeping */
struct
intf_thread_t
*
p_next
;
/** LibVLC interfaces book keeping */
vlc_thread_t
thread
;
/** LibVLC thread */
/* Thread properties and locks */
/* Thread properties and locks */
#if defined( __APPLE__ )
#if defined( __APPLE__ )
bool
b_should_run_on_first_thread
;
bool
b_should_run_on_first_thread
;
...
...
src/interface/interface.c
View file @
f818952f
...
@@ -132,8 +132,8 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
...
@@ -132,8 +132,8 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
* (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
)
{
{
if
(
vlc_
thread_create
(
p_intf
,
MonitorLibVLCDeath
,
if
(
vlc_
clone
(
&
p_intf
->
thread
,
VLC_THREAD_PRIORITY_LOW
)
)
MonitorLibVLCDeath
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
{
{
msg_Err
(
p_intf
,
"cannot spawn libvlc death monitoring thread"
);
msg_Err
(
p_intf
,
"cannot spawn libvlc death monitoring thread"
);
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
...
@@ -144,13 +144,15 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
...
@@ -144,13 +144,15 @@ int intf_Create( vlc_object_t *p_this, const char *psz_module )
/* It is monitoring libvlc, not the p_intf */
/* It is monitoring libvlc, not the p_intf */
vlc_object_kill
(
p_intf
->
p_libvlc
);
vlc_object_kill
(
p_intf
->
p_libvlc
);
vlc_join
(
p_intf
->
thread
,
NULL
);
}
}
else
else
#endif
#endif
/* Run the interface in a separate thread */
/* Run the interface in a separate thread */
if
(
p_intf
->
pf_run
if
(
p_intf
->
pf_run
&&
vlc_
thread_create
(
p_intf
,
RunInterface
,
&&
vlc_
clone
(
&
p_intf
->
thread
,
VLC_THREAD_PRIORITY_LOW
)
)
RunInterface
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
{
{
msg_Err
(
p_intf
,
"cannot spawn interface thread"
);
msg_Err
(
p_intf
,
"cannot spawn interface thread"
);
vlc_mutex_unlock
(
&
lock
);
vlc_mutex_unlock
(
&
lock
);
...
@@ -198,7 +200,7 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
...
@@ -198,7 +200,7 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
intf_thread_t
*
p_next
=
p_intf
->
p_next
;
intf_thread_t
*
p_next
=
p_intf
->
p_next
;
if
(
p_intf
->
pf_run
)
if
(
p_intf
->
pf_run
)
vlc_
thread_join
(
p_intf
);
vlc_
join
(
p_intf
->
thread
,
NULL
);
module_unneed
(
p_intf
,
p_intf
->
p_module
);
module_unneed
(
p_intf
,
p_intf
->
p_module
);
free
(
p_intf
->
psz_intf
);
free
(
p_intf
->
psz_intf
);
config_ChainDestroy
(
p_intf
->
p_cfg
);
config_ChainDestroy
(
p_intf
->
p_cfg
);
...
...
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