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
99613a82
Commit
99613a82
authored
Oct 04, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wayland/shm: no need to retain the shm_pool
parent
23e13d55
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
13 deletions
+8
-13
modules/video_output/wl/shm.c
modules/video_output/wl/shm.c
+8
-13
No files found.
modules/video_output/wl/shm.c
View file @
99613a82
...
...
@@ -47,7 +47,6 @@ 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
;
picture_pool_t
*
pool
;
/* picture pool */
...
...
@@ -122,9 +121,9 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req)
memset
(
base
,
0x80
,
length
);
/* gray fill */
#endif
s
ys
->
shm_pool
=
wl_shm_create_pool
(
sys
->
shm
,
fd
,
length
);
s
truct
wl_shm_pool
*
shm_pool
=
wl_shm_create_pool
(
sys
->
shm
,
fd
,
length
);
close
(
fd
);
if
(
s
ys
->
s
hm_pool
==
NULL
)
if
(
shm_pool
==
NULL
)
{
munmap
(
base
,
length
);
return
NULL
;
...
...
@@ -149,7 +148,7 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req)
{
struct
wl_buffer
*
buf
;
buf
=
wl_shm_pool_create_buffer
(
s
ys
->
s
hm_pool
,
offset
,
width
,
height
,
buf
=
wl_shm_pool_create_buffer
(
shm_pool
,
offset
,
width
,
height
,
stride
,
WL_SHM_FORMAT_XRGB8888
);
if
(
buf
==
NULL
)
break
;
...
...
@@ -171,24 +170,22 @@ static picture_pool_t *Pool(vout_display_t *vd, unsigned req)
pics
[
count
++
]
=
pic
;
}
wl_shm_pool_destroy
(
shm_pool
);
wl_display_flush
(
sys
->
embed
->
display
.
wl
);
if
(
length
>
0
)
munmap
(
base
,
length
);
/* Left-over buffers */
if
(
count
==
0
)
goto
error
;
wl_display_flush
(
sys
->
embed
->
display
.
wl
);
return
NULL
;
sys
->
pool
=
picture_pool_New
(
count
,
pics
);
if
(
unlikely
(
sys
->
pool
==
NULL
))
{
while
(
count
>
0
)
picture_Release
(
pics
[
--
count
]);
goto
error
;
return
NULL
;
}
return
sys
->
pool
;
error:
wl_shm_pool_destroy
(
sys
->
shm_pool
);
return
NULL
;
}
static
void
Prepare
(
vout_display_t
*
vd
,
picture_t
*
pic
,
subpicture_t
*
subpic
)
...
...
@@ -229,8 +226,6 @@ static void ResetPictures(vout_display_t *vd)
return
;
picture_pool_Delete
(
sys
->
pool
);
wl_shm_pool_destroy
(
sys
->
shm_pool
);
sys
->
pool
=
NULL
;
}
...
...
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