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
235cac96
Commit
235cac96
authored
May 09, 2012
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Remove b_should_run_on_first_thread"
This reverts commit
4dc0b22b
.
parent
deb8ae92
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
0 deletions
+23
-0
include/vlc_interface.h
include/vlc_interface.h
+4
-0
src/interface/interface.c
src/interface/interface.c
+19
-0
No files found.
include/vlc_interface.h
View file @
235cac96
...
...
@@ -53,6 +53,10 @@ typedef struct intf_thread_t
struct
intf_thread_t
*
p_next
;
/** LibVLC interfaces book keeping */
vlc_thread_t
thread
;
/** LibVLC thread */
/* Thread properties and locks */
#if defined( __APPLE__ )
bool
b_should_run_on_first_thread
;
#endif
/* Specific interfaces */
intf_sys_t
*
p_sys
;
/** system interface */
...
...
src/interface/interface.c
View file @
235cac96
...
...
@@ -106,6 +106,11 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
var_AddCallback
(
p_intf
,
"intf-add"
,
AddIntfCallback
,
NULL
);
/* Attach interface to LibVLC */
#if defined( __APPLE__ )
p_intf
->
b_should_run_on_first_thread
=
false
;
#endif
/* Choose the best module */
p_intf
->
p_cfg
=
NULL
;
char
*
psz_parser
=
*
chain
==
'$'
...
...
@@ -124,6 +129,17 @@ int intf_Create( vlc_object_t *p_this, const char *chain )
goto
error
;
}
#if defined( __APPLE__ )
/* Hack to get Mac OS X Cocoa runtime running
* (it needs access to the main thread) */
if
(
p_intf
->
b_should_run_on_first_thread
)
{
libvlc_SetExitHandler
(
p_libvlc
,
vlc_object_kill
,
p_intf
);
assert
(
p_intf
->
pf_run
);
p_intf
->
pf_run
(
p_intf
);
}
else
#endif
/* Run the interface in a separate thread */
if
(
p_intf
->
pf_run
&&
vlc_clone
(
&
p_intf
->
thread
,
...
...
@@ -176,6 +192,9 @@ void intf_DestroyAll( libvlc_int_t *p_libvlc )
if
(
p_intf
->
pf_run
)
{
vlc_cancel
(
p_intf
->
thread
);
#ifdef __APPLE__
if
(
!
p_intf
->
b_should_run_on_first_thread
)
#endif
vlc_join
(
p_intf
->
thread
,
NULL
);
}
module_unneed
(
p_intf
,
p_intf
->
p_module
);
...
...
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