Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
442
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
1094d0ab
Commit
1094d0ab
authored
5 years ago
by
Rémi Denis-Courmont
Browse files
Options
Downloads
Patches
Plain Diff
wayland/shm: reorder code
parent
cbb53394
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/video_output/wayland/shm.c
+26
-26
26 additions, 26 deletions
modules/video_output/wayland/shm.c
with
26 additions
and
26 deletions
modules/video_output/wayland/shm.c
+
26
−
26
View file @
1094d0ab
...
...
@@ -272,6 +272,32 @@ static const struct wl_registry_listener registry_cbs =
registry_global_remove_cb
,
};
static
void
Close
(
vout_display_t
*
vd
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
struct
wl_display
*
display
=
sys
->
embed
->
display
.
wl
;
struct
wl_surface
*
surface
=
sys
->
embed
->
handle
.
wl
;
wl_surface_attach
(
surface
,
NULL
,
0
,
0
);
wl_surface_commit
(
surface
);
/* Wait until all picture buffers are released by the server */
while
(
sys
->
active_buffers
>
0
)
{
msg_Dbg
(
vd
,
"%zu buffer(s) still active"
,
sys
->
active_buffers
);
wl_display_roundtrip_queue
(
display
,
sys
->
eventq
);
}
msg_Dbg
(
vd
,
"no active buffers left"
);
if
(
sys
->
viewport
!=
NULL
)
wp_viewport_destroy
(
sys
->
viewport
);
if
(
sys
->
viewporter
!=
NULL
)
wp_viewporter_destroy
(
sys
->
viewporter
);
wl_shm_destroy
(
sys
->
shm
);
wl_display_flush
(
display
);
wl_event_queue_destroy
(
sys
->
eventq
);
free
(
sys
);
}
static
int
Open
(
vout_display_t
*
vd
,
const
vout_display_cfg_t
*
cfg
,
video_format_t
*
fmtp
,
vlc_video_context
*
context
)
{
...
...
@@ -368,32 +394,6 @@ error:
return
VLC_EGENERIC
;
}
static
void
Close
(
vout_display_t
*
vd
)
{
vout_display_sys_t
*
sys
=
vd
->
sys
;
struct
wl_display
*
display
=
sys
->
embed
->
display
.
wl
;
struct
wl_surface
*
surface
=
sys
->
embed
->
handle
.
wl
;
wl_surface_attach
(
surface
,
NULL
,
0
,
0
);
wl_surface_commit
(
surface
);
/* Wait until all picture buffers are released by the server */
while
(
sys
->
active_buffers
>
0
)
{
msg_Dbg
(
vd
,
"%zu buffer(s) still active"
,
sys
->
active_buffers
);
wl_display_roundtrip_queue
(
display
,
sys
->
eventq
);
}
msg_Dbg
(
vd
,
"no active buffers left"
);
if
(
sys
->
viewport
!=
NULL
)
wp_viewport_destroy
(
sys
->
viewport
);
if
(
sys
->
viewporter
!=
NULL
)
wp_viewporter_destroy
(
sys
->
viewporter
);
wl_shm_destroy
(
sys
->
shm
);
wl_display_flush
(
display
);
wl_event_queue_destroy
(
sys
->
eventq
);
free
(
sys
);
}
vlc_module_begin
()
set_shortname
(
N_
(
"WL SHM"
))
set_description
(
N_
(
"Wayland shared memory video output"
))
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment