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
64443848
Commit
64443848
authored
Sep 12, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Qt4: use semaphore
parent
ef551582
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+6
-12
No files found.
modules/gui/qt4/qt4.cpp
View file @
64443848
...
...
@@ -263,11 +263,7 @@ vlc_module_end ()
/*****************************************/
/* Ugly, but the Qt4 interface assumes single instance anyway */
static
struct
{
QMutex
lock
;
QWaitCondition
ready
;
}
iface
;
static
vlc_sem_t
ready
;
/*****************************************************************************
* Module callbacks
...
...
@@ -298,6 +294,7 @@ static int Open( vlc_object_t *p_this )
p_sys
->
p_playlist
=
pl_Hold
(
p_intf
);
/* */
vlc_sem_init
(
&
ready
,
0
);
if
(
vlc_clone
(
&
p_sys
->
thread
,
Thread
,
p_intf
,
VLC_THREAD_PRIORITY_LOW
)
)
{
pl_Release
(
p_sys
->
p_playlist
);
...
...
@@ -306,13 +303,12 @@ static int Open( vlc_object_t *p_this )
}
/* */
QMutexLocker
locker
(
&
iface
.
lock
);
vlc_
value_t
val
;
vlc_sem_wait
(
&
ready
);
vlc_
sem_destroy
(
&
ready
)
;
while
(
p_sys
->
p_mi
==
NULL
&&
!
p_sys
->
b_isDialogProvider
)
iface
.
ready
.
wait
(
&
iface
.
lock
);
if
(
!
p_sys
->
b_isDialogProvider
)
{
vlc_value_t
val
;
var_Create
(
p_this
->
p_libvlc
,
"qt4-iface"
,
VLC_VAR_ADDRESS
);
val
.
p_address
=
p_this
;
var_Set
(
p_this
->
p_libvlc
,
"qt4-iface"
,
val
);
...
...
@@ -419,11 +415,9 @@ static void *Thread( void *obj )
p_mi
=
NULL
;
/* */
iface
.
lock
.
lock
();
p_intf
->
p_sys
->
p_mi
=
p_mi
;
p_intf
->
p_sys
->
b_isDialogProvider
=
p_mi
==
NULL
;
iface
.
ready
.
wakeAll
();
iface
.
lock
.
unlock
();
vlc_sem_post
(
&
ready
);
/* Explain to the core how to show a dialog :D */
p_intf
->
pf_show_dialog
=
ShowDialog
;
...
...
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