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
d8743005
Commit
d8743005
authored
Feb 14, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
XCB/X11: remove two write-only variables
parent
92ccd4f1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
29 deletions
+22
-29
modules/video_output/xcb/x11.c
modules/video_output/xcb/x11.c
+22
-29
No files found.
modules/video_output/xcb/x11.c
View file @
d8743005
...
@@ -71,8 +71,6 @@ struct vout_display_sys_t
...
@@ -71,8 +71,6 @@ struct vout_display_sys_t
xcb_gcontext_t
gc
;
/* context to put images */
xcb_gcontext_t
gc
;
/* context to put images */
bool
shm
;
/* whether to use MIT-SHM */
bool
shm
;
/* whether to use MIT-SHM */
bool
visible
;
/* whether to draw */
bool
visible
;
/* whether to draw */
uint8_t
bpp
;
/* bits per pixel */
uint8_t
pad
;
/* scanline pad */
uint8_t
depth
;
/* useful bits per pixel */
uint8_t
depth
;
/* useful bits per pixel */
picture_pool_t
*
pool
;
/* picture pool */
picture_pool_t
*
pool
;
/* picture pool */
...
@@ -205,42 +203,37 @@ static int Open (vlc_object_t *obj)
...
@@ -205,42 +203,37 @@ static int Open (vlc_object_t *obj)
fmt_pic
.
i_rmask
=
vt
->
red_mask
;
fmt_pic
.
i_rmask
=
vt
->
red_mask
;
fmt_pic
.
i_gmask
=
vt
->
green_mask
;
fmt_pic
.
i_gmask
=
vt
->
green_mask
;
fmt_pic
.
i_bmask
=
vt
->
blue_mask
;
fmt_pic
.
i_bmask
=
vt
->
blue_mask
;
goto
found_visual
;
found_visual:
vd
->
fmt
=
fmt_pic
;
vid
=
vt
->
visual_id
;
msg_Dbg
(
vd
,
"using X11 visual ID 0x%"
PRIx32
,
vid
);
p_sys
->
depth
=
fmt
->
depth
;
msg_Dbg
(
vd
,
" %"
PRIu8
" bits depth"
,
p_sys
->
depth
);
msg_Dbg
(
vd
,
" %"
PRIu8
" bits per pixel"
,
fmt
->
bits_per_pixel
);
msg_Dbg
(
vd
,
" %"
PRIu8
" bits line pad"
,
fmt
->
scanline_pad
);
goto
found_format
;
}
}
vt
++
;
vt
++
;
}
}
/* Then try Static Gray class */
/* Then try Static Gray class */
if
(
fmt
->
depth
==
8
)
if
(
fmt
->
depth
!=
8
)
continue
;
for
(
int
i
=
xcb_depth_visuals_length
(
d
);
i
>
0
&&
!
vid
;
i
--
)
for
(
int
i
=
xcb_depth_visuals_length
(
d
);
i
>
0
&&
!
vid
;
i
--
)
{
{
if
(
vt
->
_class
==
XCB_VISUAL_CLASS_STATIC_GRAY
)
if
(
vt
->
_class
==
XCB_VISUAL_CLASS_STATIC_GRAY
)
goto
found_grey
;
{
fmt_pic
.
i_chroma
=
VLC_CODEC_GREY
;
goto
found_visual
;
}
vt
++
;
vt
++
;
}
}
continue
;
/* Fail: unusable pixel format */
found_grey:
fmt_pic
.
i_chroma
=
VLC_CODEC_GREY
;
found_visual:
p_sys
->
bpp
=
fmt
->
bits_per_pixel
;
p_sys
->
pad
=
fmt
->
scanline_pad
;
p_sys
->
depth
=
fmt
->
depth
;
vd
->
fmt
=
fmt_pic
;
vid
=
vt
->
visual_id
;
}
}
if
(
!
vid
)
{
msg_Err
(
obj
,
"no supported pixel format & visual"
);
msg_Err
(
obj
,
"no supported pixel format & visual"
);
goto
error
;
goto
error
;
}
msg_Dbg
(
vd
,
"using X11 visual ID 0x%"
PRIx32
,
vid
);
msg_Dbg
(
vd
,
" %"
PRIu8
" bits depth"
,
p_sys
->
depth
);
msg_Dbg
(
vd
,
" %"
PRIu8
" bits per pixel"
,
p_sys
->
bpp
);
msg_Dbg
(
vd
,
" %"
PRIu8
" bits line pad"
,
p_sys
->
pad
);
found_format:
;
/* Create colormap (needed to select non-default visual) */
/* Create colormap (needed to select non-default visual) */
xcb_colormap_t
cmap
;
xcb_colormap_t
cmap
;
if
(
vid
!=
scr
->
root_visual
)
if
(
vid
!=
scr
->
root_visual
)
...
...
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