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
c4aac77c
Commit
c4aac77c
authored
Oct 30, 2008
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix another small race condition in the Qt4 video window
parent
e488bc0f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
11 deletions
+15
-11
modules/gui/qt4/qt4.cpp
modules/gui/qt4/qt4.cpp
+15
-11
No files found.
modules/gui/qt4/qt4.cpp
View file @
c4aac77c
...
...
@@ -273,9 +273,13 @@ static int Open( vlc_object_t *p_this )
else
{
QMutexLocker
locker
(
&
iface
.
lock
);
vlc_value_t
val
;
while
(
p_sys
->
p_mi
==
NULL
)
iface
.
ready
.
wait
(
&
iface
.
lock
);
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
);
}
return
VLC_SUCCESS
;
}
...
...
@@ -297,6 +301,7 @@ static void Close( vlc_object_t *p_this )
intf_thread_t
*
p_intf
=
(
intf_thread_t
*
)
p_this
;
intf_sys_t
*
p_sys
=
p_intf
->
p_sys
;
var_Destroy
(
p_this
->
p_libvlc
,
"qt4-iface"
);
QApplication
::
postEvent
(
p_sys
->
p_mi
,
new
QCloseEvent
());
if
(
p_intf
->
p_sys
->
b_isDialogProvider
)
...
...
@@ -510,24 +515,23 @@ static int WindowControl (vout_window_t *, int, va_list);
static
int
WindowOpen
(
vlc_object_t
*
obj
)
{
vout_window_t
*
wnd
=
(
vout_window_t
*
)
obj
;
MainInterface
*
p_mi
;
intf_thread_t
*
intf
=
NULL
;
vlc_value_t
val
;
if
(
config_GetInt
(
obj
,
"embedded-video"
)
<=
0
)
return
VLC_EGENERIC
;
intf_thread_t
*
intf
=
(
intf_thread_t
*
)
vlc_object_find_name
(
obj
,
"qt4"
,
FIND_ANYWHERE
);
if
(
intf
==
NULL
)
return
VLC_EGENERIC
;
/* Qt4 not in use */
assert
(
intf
->
i_object_type
==
VLC_OBJECT_INTF
);
QMutexLocker
(
&
iface
.
lock
);
msg_Dbg
(
obj
,
"waiting for interface..."
);
while
((
p_mi
=
intf
->
p_sys
->
p_mi
)
==
NULL
)
iface
.
ready
.
wait
(
&
iface
.
lock
);
if
(
var_Get
(
obj
->
p_libvlc
,
"qt4-iface"
,
&
val
)
==
0
)
intf
=
(
intf_thread_t
*
)
val
.
p_address
;
if
(
intf
==
NULL
)
{
/* If another interface is used, this plugin cannot work */
msg_Dbg
(
obj
,
"Qt4 interface not found"
);
return
VLC_EGENERIC
;
}
MainInterface
*
p_mi
=
intf
->
p_sys
->
p_mi
;
msg_Dbg
(
obj
,
"requesting video..."
);
vlc_object_release
(
intf
);
wnd
->
handle
=
p_mi
->
requestVideo
(
wnd
->
vout
,
&
wnd
->
pos_x
,
&
wnd
->
pos_y
,
&
wnd
->
width
,
&
wnd
->
height
);
...
...
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