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
ea9f11a1
Commit
ea9f11a1
authored
Aug 31, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wl/shm: use separate queue
This should fix deadlocks with the mainloop (in wl/shell_surface).
parent
0ff2de05
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
modules/video_output/wl/shm.c
modules/video_output/wl/shm.c
+14
-3
No files found.
modules/video_output/wl/shm.c
View file @
ea9f11a1
...
...
@@ -45,6 +45,7 @@
struct
vout_display_sys_t
{
vout_window_t
*
embed
;
/* VLC window */
struct
wl_event_queue
*
eventq
;
struct
wl_shm
*
shm
;
struct
wl_shm_pool
*
shm_pool
;
...
...
@@ -207,8 +208,7 @@ static void Display(vout_display_t *vd, picture_t *pic, subpicture_t *subpic)
struct
wl_surface
*
surface
=
sys
->
embed
->
handle
.
wl
;
wl_surface_commit
(
surface
);
// FIXME: deadlocks here
wl_display_roundtrip
(
display
);
wl_display_roundtrip_queue
(
display
,
sys
->
eventq
);
(
void
)
pic
;
(
void
)
subpic
;
}
...
...
@@ -351,6 +351,7 @@ static int Open(vlc_object_t *obj)
vd
->
sys
=
sys
;
sys
->
embed
=
NULL
;
sys
->
eventq
=
NULL
;
sys
->
shm
=
NULL
;
sys
->
pool
=
NULL
;
sys
->
fd
=
-
1
;
...
...
@@ -377,12 +378,18 @@ static int Open(vlc_object_t *obj)
goto
error
;
struct
wl_display
*
display
=
sys
->
embed
->
display
.
wl
;
sys
->
eventq
=
wl_display_create_queue
(
display
);
if
(
sys
->
eventq
==
NULL
)
goto
error
;
struct
wl_registry
*
registry
=
wl_display_get_registry
(
display
);
if
(
registry
==
NULL
)
goto
error
;
wl_proxy_set_queue
((
struct
wl_proxy
*
)
registry
,
sys
->
eventq
);
wl_registry_add_listener
(
registry
,
&
registry_cbs
,
vd
);
wl_display_roundtrip
(
display
);
wl_display_roundtrip
_queue
(
display
,
sys
->
eventq
);
wl_registry_destroy
(
registry
);
if
(
sys
->
shm
==
NULL
)
...
...
@@ -413,6 +420,8 @@ static int Open(vlc_object_t *obj)
return
VLC_SUCCESS
;
error:
if
(
sys
->
eventq
!=
NULL
)
wl_event_queue_destroy
(
sys
->
eventq
);
if
(
sys
->
embed
!=
NULL
)
vout_display_DeleteWindow
(
vd
,
sys
->
embed
);
if
(
sys
->
fd
!=
-
1
)
...
...
@@ -429,6 +438,8 @@ static void Close(vlc_object_t *obj)
ResetPictures
(
vd
);
wl_shm_destroy
(
sys
->
shm
);
wl_display_flush
(
sys
->
embed
->
display
.
wl
);
wl_event_queue_destroy
(
sys
->
eventq
);
vout_display_DeleteWindow
(
vd
,
sys
->
embed
);
close
(
sys
->
fd
);
free
(
sys
);
...
...
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