Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
b87b8515
Commit
b87b8515
authored
Apr 16, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Factor SHM and non SHM pictures a little
parent
01ff226b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
18 deletions
+9
-18
modules/video_output/xcb/xcb.c
modules/video_output/xcb/xcb.c
+9
-18
No files found.
modules/video_output/xcb/xcb.c
View file @
b87b8515
...
...
@@ -280,8 +280,6 @@ struct picture_sys_t
xcb_shm_seg_t
segment
;
/* Shared memory segment X ID */
};
static
void
PictureRelease
(
picture_t
*
pic
);
static
void
PictureShmRelease
(
picture_t
*
pic
);
#define SHM_ERR ((void *)(intptr_t)(-1))
static
int
PictureInit
(
vout_thread_t
*
vout
,
picture_t
*
pic
)
...
...
@@ -333,6 +331,8 @@ static int PictureInit (vout_thread_t *vout, picture_t *pic)
shm
=
SHM_ERR
;
}
}
else
priv
->
segment
=
0
;
const
unsigned
real_width
=
pic
->
p
->
i_pitch
/
(
p_sys
->
bpp
>>
3
);
/* FIXME: anyway to getthing more intuitive than that?? */
...
...
@@ -366,8 +366,6 @@ static int PictureInit (vout_thread_t *vout, picture_t *pic)
priv
->
native
=
NULL
;
pic
->
p_sys
=
priv
;
pic
->
p
->
p_pixels
=
img
->
data
;
pic
->
pf_release
=
(
shm
!=
SHM_ERR
)
?
PictureShmRelease
:
PictureRelease
;
pic
->
i_status
=
DESTROYED_PICTURE
;
pic
->
i_type
=
DIRECT_PICTURE
;
return
VLC_SUCCESS
;
...
...
@@ -383,28 +381,21 @@ error:
/**
* Release picture private data
*/
static
void
Picture
Release
(
picture_t
*
pic
)
static
void
Picture
Deinit
(
picture_t
*
pic
)
{
struct
picture_sys_t
*
p_sys
=
pic
->
p_sys
;
if
(
p_sys
->
segment
!=
0
)
{
xcb_shm_detach
(
p_sys
->
conn
,
p_sys
->
segment
);
shmdt
(
p_sys
->
image
->
data
);
}
if
((
p_sys
->
native
!=
NULL
)
&&
(
p_sys
->
native
!=
p_sys
->
image
))
xcb_image_destroy
(
p_sys
->
native
);
xcb_image_destroy
(
p_sys
->
image
);
free
(
p_sys
);
}
/**
* Release shared memory picture private data
*/
static
void
PictureShmRelease
(
picture_t
*
pic
)
{
struct
picture_sys_t
*
p_sys
=
pic
->
p_sys
;
xcb_shm_detach
(
p_sys
->
conn
,
p_sys
->
segment
);
shmdt
(
p_sys
->
image
->
data
);
PictureRelease
(
pic
);
}
/**
* Allocate drawable window and picture buffers.
*/
...
...
@@ -518,7 +509,7 @@ static void Deinit (vout_thread_t *vout)
vout_sys_t
*
p_sys
=
vout
->
p_sys
;
while
(
I_OUTPUTPICTURES
>
0
)
picture_Release
(
PP_OUTPUTPICTURE
[
--
I_OUTPUTPICTURES
]);
PictureDeinit
(
PP_OUTPUTPICTURE
[
--
I_OUTPUTPICTURES
]);
xcb_unmap_window
(
p_sys
->
conn
,
p_sys
->
window
);
xcb_destroy_window
(
p_sys
->
conn
,
p_sys
->
window
);
...
...
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