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
e1cdb462
Commit
e1cdb462
authored
Nov 03, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
EGL: support non-default X11 display
parent
8bd96cd9
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
4 deletions
+27
-4
modules/video_output/egl.c
modules/video_output/egl.c
+27
-4
No files found.
modules/video_output/egl.c
View file @
e1cdb462
...
...
@@ -68,6 +68,9 @@ typedef struct vlc_gl_sys_t
EGLDisplay
display
;
EGLSurface
surface
;
EGLContext
context
;
#if defined (USE_PLATFORM_X11)
Display
*
x11
;
#endif
}
vlc_gl_sys_t
;
/* OpenGL callbacks */
...
...
@@ -138,12 +141,28 @@ static int Open (vlc_object_t *obj, const struct gl_api *api)
sys
->
display
=
EGL_NO_DISPLAY
;
#ifdef USE_PLATFORM_X11
if
(
wnd
->
type
!=
VOUT_WINDOW_TYPE_XID
||
wnd
->
display
.
x11
!=
NULL
||
!
vlc_xlib_init
(
obj
))
sys
->
x11
=
NULL
;
if
(
wnd
->
type
!=
VOUT_WINDOW_TYPE_XID
||
!
vlc_xlib_init
(
obj
))
goto
error
;
sys
->
display
=
eglGetDisplay
(
EGL_DEFAULT_DISPLAY
);
window
=
wnd
->
handle
.
xid
;
sys
->
x11
=
XOpenDisplay
(
wnd
->
display
.
x11
);
if
(
sys
->
x11
==
NULL
)
goto
error
;
int
snum
;
{
XWindowAttributes
wa
;
if
(
!
XGetWindowAttributes
(
sys
->
x11
,
wnd
->
handle
.
xid
,
&
wa
))
goto
error
;
snum
=
XScreenNumberOfScreen
(
wa
.
screen
);
}
if
(
snum
==
XDefaultScreen
(
sys
->
x11
))
{
sys
->
display
=
eglGetDisplay
(
sys
->
x11
);
window
=
wnd
->
handle
.
xid
;
}
#elif defined (USE_PLATFORM_WIN32)
if
(
wnd
->
type
!=
VOUT_WINDOW_TYPE_HWND
)
...
...
@@ -264,6 +283,10 @@ static void Close (vlc_object_t *obj)
if
(
sys
->
display
!=
EGL_NO_DISPLAY
)
eglTerminate
(
sys
->
display
);
#ifdef USE_PLATFORM_X11
if
(
sys
->
x11
!=
NULL
)
XCloseDisplay
(
sys
->
x11
);
#endif
free
(
sys
);
}
...
...
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