Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
e7b9d161
Commit
e7b9d161
authored
Sep 02, 2009
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB_x11: wait until picture is displayed
parent
5a1a5945
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
3 deletions
+14
-3
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+14
-3
No files found.
modules/video_output/xcb/x11.c
View file @
e7b9d161
...
...
@@ -389,9 +389,10 @@ static void Display (vout_display_t *vd, picture_t *pic)
{
vout_display_sys_t
*
p_sys
=
vd
->
sys
;
xcb_shm_seg_t
segment
=
pic
->
p_sys
->
segment
;
xcb_void_cookie_t
ck
;
if
(
segment
!=
0
)
xcb_shm_put_image
(
p_sys
->
conn
,
p_sys
->
window
,
p_sys
->
gc
,
ck
=
xcb_shm_put_image_checked
(
p_sys
->
conn
,
p_sys
->
window
,
p_sys
->
gc
,
/* real width */
pic
->
p
->
i_pitch
/
pic
->
p
->
i_pixel_pitch
,
/* real height */
pic
->
p
->
i_lines
,
/* x */
vd
->
fmt
.
i_x_offset
,
...
...
@@ -405,13 +406,23 @@ static void Display (vout_display_t *vd, picture_t *pic)
const
size_t
offset
=
vd
->
fmt
.
i_y_offset
*
pic
->
p
->
i_pitch
;
const
unsigned
lines
=
pic
->
p
->
i_lines
-
vd
->
fmt
.
i_y_offset
;
xcb_put_image
(
p_sys
->
conn
,
XCB_IMAGE_FORMAT_Z_PIXMAP
,
ck
=
xcb_put_image_checked
(
p_sys
->
conn
,
XCB_IMAGE_FORMAT_Z_PIXMAP
,
p_sys
->
window
,
p_sys
->
gc
,
pic
->
p
->
i_pitch
/
pic
->
p
->
i_pixel_pitch
,
lines
,
-
vd
->
fmt
.
i_x_offset
,
0
,
0
,
p_sys
->
depth
,
pic
->
p
->
i_pitch
*
lines
,
pic
->
p
->
p_pixels
+
offset
);
}
xcb_flush
(
p_sys
->
conn
);
/* Wait for reply. This makes sure that the X server gets CPU time to
* display the picture. xcb_flush() is *not* sufficient: especially with
* shared memory the PUT requests are so short that many of them can fit in
* X11 socket output buffer before the kernel preempts VLC. */
xcb_generic_error_t
*
e
=
xcb_request_check
(
p_sys
->
conn
,
ck
);
if
(
e
!=
NULL
)
{
msg_Dbg
(
vd
,
"%s: X11 error %d"
,
"cannot put image"
,
e
->
error_code
);
free
(
e
);
}
/* FIXME might be WAY better to wait in some case (be carefull with
* VOUT_DISPLAY_RESET_PICTURES if done) + does not work with
...
...
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