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
13f58bee
Commit
13f58bee
authored
Sep 13, 2014
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
xcb/glx: remove redundant pointer
parent
8baa3933
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
19 deletions
+22
-19
modules/video_output/xcb/glx.c
modules/video_output/xcb/glx.c
+22
-19
No files found.
modules/video_output/xcb/glx.c
View file @
13f58bee
...
@@ -58,7 +58,6 @@ vlc_module_end ()
...
@@ -58,7 +58,6 @@ vlc_module_end ()
struct
vout_display_sys_t
struct
vout_display_sys_t
{
{
xcb_connection_t
*
conn
;
/**< XCB connection */
xcb_connection_t
*
conn
;
/**< XCB connection */
vout_window_t
*
embed
;
/* VLC window (when windowed) */
vlc_gl_t
*
gl
;
vlc_gl_t
*
gl
;
xcb_cursor_t
cursor
;
/* blank cursor */
xcb_cursor_t
cursor
;
/* blank cursor */
...
@@ -92,15 +91,17 @@ static int Open (vlc_object_t *obj)
...
@@ -92,15 +91,17 @@ static int Open (vlc_object_t *obj)
xcb_connection_t
*
conn
;
xcb_connection_t
*
conn
;
const
xcb_screen_t
*
scr
;
const
xcb_screen_t
*
scr
;
uint16_t
width
,
height
;
uint16_t
width
,
height
;
sys
->
embed
=
XCB_parent_Create
(
vd
,
&
conn
,
&
scr
,
&
width
,
&
height
);
vout_window_t
*
surface
;
if
(
sys
->
embed
==
NULL
)
surface
=
XCB_parent_Create
(
vd
,
&
conn
,
&
scr
,
&
width
,
&
height
);
if
(
surface
==
NULL
)
{
{
free
(
sys
);
free
(
sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
sys
->
conn
=
conn
;
sys
->
conn
=
conn
;
sys
->
gl
=
vlc_gl_Create
(
s
ys
->
embed
,
VLC_OPENGL
,
"glx"
);
sys
->
gl
=
vlc_gl_Create
(
s
urface
,
VLC_OPENGL
,
"glx"
);
if
(
sys
->
gl
==
NULL
)
if
(
sys
->
gl
==
NULL
)
goto
error
;
goto
error
;
...
@@ -129,11 +130,11 @@ static int Open (vlc_object_t *obj)
...
@@ -129,11 +130,11 @@ static int Open (vlc_object_t *obj)
vd
->
manage
=
Manage
;
vd
->
manage
=
Manage
;
/* */
/* */
bool
is_fullscreen
=
vd
->
cfg
->
is_fullscreen
;
bool
fs
=
vd
->
cfg
->
is_fullscreen
;
if
(
is_fullscreen
&&
vout_window_SetFullScreen
(
sys
->
embed
,
true
))
if
(
vout_window_SetFullScreen
(
surface
,
fs
))
is_fullscreen
=
false
;
fs
=
false
;
vout_display_SendEventFullscreen
(
vd
,
is_fullscreen
);
vout_display_SendEventFullscreen
(
vd
,
fs
);
vout_display_SendEventDisplaySize
(
vd
,
width
,
height
,
is_fullscreen
);
vout_display_SendEventDisplaySize
(
vd
,
width
,
height
,
fs
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
@@ -141,7 +142,7 @@ error:
...
@@ -141,7 +142,7 @@ error:
if
(
sys
->
gl
!=
NULL
)
if
(
sys
->
gl
!=
NULL
)
vlc_gl_Destroy
(
sys
->
gl
);
vlc_gl_Destroy
(
sys
->
gl
);
xcb_disconnect
(
sys
->
conn
);
xcb_disconnect
(
sys
->
conn
);
vout_display_DeleteWindow
(
vd
,
s
ys
->
embed
);
vout_display_DeleteWindow
(
vd
,
s
urface
);
free
(
sys
);
free
(
sys
);
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
...
@@ -154,19 +155,21 @@ static void Close (vlc_object_t *obj)
...
@@ -154,19 +155,21 @@ static void Close (vlc_object_t *obj)
{
{
vout_display_t
*
vd
=
(
vout_display_t
*
)
obj
;
vout_display_t
*
vd
=
(
vout_display_t
*
)
obj
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
vout_display_sys_t
*
sys
=
vd
->
sys
;
vlc_gl_t
*
gl
=
sys
->
gl
;
vout_window_t
*
surface
=
gl
->
surface
;
vlc_gl_MakeCurrent
(
sys
->
gl
);
vlc_gl_MakeCurrent
(
gl
);
vout_display_opengl_Delete
(
sys
->
vgl
);
vout_display_opengl_Delete
(
sys
->
vgl
);
vlc_gl_ReleaseCurrent
(
sys
->
gl
);
vlc_gl_ReleaseCurrent
(
gl
);
vlc_gl_Destroy
(
sys
->
gl
);
vlc_gl_Destroy
(
gl
);
/* show the default cursor */
/* show the default cursor */
xcb_change_window_attributes
(
sys
->
conn
,
s
ys
->
embed
->
handle
.
xid
,
xcb_change_window_attributes
(
sys
->
conn
,
s
urface
->
handle
.
xid
,
XCB_CW_CURSOR
,
&
(
uint32_t
)
{
XCB_CURSOR_NONE
});
XCB_CW_CURSOR
,
&
(
uint32_t
)
{
XCB_CURSOR_NONE
});
xcb_flush
(
sys
->
conn
);
xcb_flush
(
sys
->
conn
);
xcb_disconnect
(
sys
->
conn
);
xcb_disconnect
(
sys
->
conn
);
vout_display_DeleteWindow
(
vd
,
s
ys
->
embed
);
vout_display_DeleteWindow
(
vd
,
s
urface
);
free
(
sys
);
free
(
sys
);
}
}
...
@@ -217,13 +220,13 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -217,13 +220,13 @@ static int Control (vout_display_t *vd, int query, va_list ap)
case
VOUT_DISPLAY_CHANGE_FULLSCREEN
:
case
VOUT_DISPLAY_CHANGE_FULLSCREEN
:
{
{
const
vout_display_cfg_t
*
c
=
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
const
vout_display_cfg_t
*
c
=
va_arg
(
ap
,
const
vout_display_cfg_t
*
);
return
vout_window_SetFullScreen
(
sys
->
embed
,
c
->
is_fullscreen
);
return
vout_window_SetFullScreen
(
sys
->
gl
->
surface
,
c
->
is_fullscreen
);
}
}
case
VOUT_DISPLAY_CHANGE_WINDOW_STATE
:
case
VOUT_DISPLAY_CHANGE_WINDOW_STATE
:
{
{
unsigned
state
=
va_arg
(
ap
,
unsigned
);
unsigned
state
=
va_arg
(
ap
,
unsigned
);
return
vout_window_SetState
(
sys
->
embed
,
state
);
return
vout_window_SetState
(
sys
->
gl
->
surface
,
state
);
}
}
case
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
:
case
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
:
...
@@ -250,7 +253,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -250,7 +253,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
/* */
/* */
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
va_arg
(
ap
,
int
))
if
(
query
==
VOUT_DISPLAY_CHANGE_DISPLAY_SIZE
&&
va_arg
(
ap
,
int
))
{
{
vout_window_SetSize
(
sys
->
embed
,
vout_window_SetSize
(
sys
->
gl
->
surface
,
cfg
->
display
.
width
,
cfg
->
display
.
height
);
cfg
->
display
.
width
,
cfg
->
display
.
height
);
return
VLC_EGENERIC
;
/* Always fail. See x11.c for rationale. */
return
VLC_EGENERIC
;
/* Always fail. See x11.c for rationale. */
}
}
...
@@ -267,7 +270,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
...
@@ -267,7 +270,7 @@ static int Control (vout_display_t *vd, int query, va_list ap)
/* Hide the mouse. It will be send when
/* Hide the mouse. It will be send when
* vout_display_t::info.b_hide_mouse is false */
* vout_display_t::info.b_hide_mouse is false */
case
VOUT_DISPLAY_HIDE_MOUSE
:
case
VOUT_DISPLAY_HIDE_MOUSE
:
xcb_change_window_attributes
(
sys
->
conn
,
sys
->
embed
->
handle
.
xid
,
xcb_change_window_attributes
(
sys
->
conn
,
sys
->
gl
->
surface
->
handle
.
xid
,
XCB_CW_CURSOR
,
&
(
uint32_t
){
sys
->
cursor
});
XCB_CW_CURSOR
,
&
(
uint32_t
){
sys
->
cursor
});
xcb_flush
(
sys
->
conn
);
xcb_flush
(
sys
->
conn
);
return
VLC_SUCCESS
;
return
VLC_SUCCESS
;
...
...
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