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
3c762ac1
Commit
3c762ac1
authored
Feb 19, 2011
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
GL: create one plugin per API since we link different libraries
parent
02c56916
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
35 deletions
+24
-35
modules/video_output/gl.c
modules/video_output/gl.c
+24
-35
No files found.
modules/video_output/gl.c
View file @
3c762ac1
...
@@ -34,9 +34,7 @@
...
@@ -34,9 +34,7 @@
#include "opengl.h"
#include "opengl.h"
/* Plugin callbacks */
/* Plugin callbacks */
static
int
OpenGL
(
vlc_object_t
*
);
static
int
Open
(
vlc_object_t
*
);
static
int
OpenGLES2
(
vlc_object_t
*
);
static
int
OpenGLES
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
#define GL_TEXT N_("OpenGL extension")
#define GL_TEXT N_("OpenGL extension")
...
@@ -46,34 +44,40 @@ static void Close (vlc_object_t *);
...
@@ -46,34 +44,40 @@ static void Close (vlc_object_t *);
"Extension through which to use the Open Graphics Library (OpenGL).")
"Extension through which to use the Open Graphics Library (OpenGL).")
vlc_module_begin
()
vlc_module_begin
()
set_shortname
(
N_
(
"OpenGL"
))
#if USE_OPENGL_ES == 2
set_description
(
N_
(
"Open Graphics Library video output"
))
# define API VLC_OPENGL_ES2
set_category
(
CAT_VIDEO
)
# define MODULE_VARNAME "gles2"
set_subcategory
(
SUBCAT_VIDEO_VOUT
)
set_capability
(
"vout display"
,
/*170*/
0
)
set_callbacks
(
OpenGL
,
Close
)
add_shortcut
(
"opengl"
,
"gl"
)
add_module
(
"gl"
,
"opengl"
,
NULL
,
NULL
,
GL_TEXT
,
PROVIDER_LONGTEXT
,
true
)
add_submodule
()
set_shortname
(
N_
(
"OpenGL ES2"
))
set_shortname
(
N_
(
"OpenGL ES2"
))
set_description
(
N_
(
"OpenGL for Embedded Systems 2 video output"
))
set_description
(
N_
(
"OpenGL for Embedded Systems 2 video output"
))
set_capability
(
"vout display"
,
/*165*/
0
)
set_capability
(
"vout display"
,
/*165*/
0
)
set_callbacks
(
Open
GLES2
,
Close
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"opengles2"
,
"gles2"
)
add_shortcut
(
"opengles2"
,
"gles2"
)
add_module
(
"gles2"
,
"opengl es2"
,
NULL
,
NULL
,
add_module
(
"gles2"
,
"opengl es2"
,
NULL
,
NULL
,
GLES2_TEXT
,
PROVIDER_LONGTEXT
,
true
)
GLES2_TEXT
,
PROVIDER_LONGTEXT
,
true
)
add_submodule
()
#elif USE_OPENGL_ES == 1
# define API VLC_OPENGL_ES
# define MODULE_VARNAME "gles"
set_shortname
(
N_
(
"OpenGL ES"
))
set_shortname
(
N_
(
"OpenGL ES"
))
set_description
(
N_
(
"OpenGL for Embedded Systems video output"
))
set_description
(
N_
(
"OpenGL for Embedded Systems video output"
))
set_capability
(
"vout display"
,
/*160*/
0
)
set_capability
(
"vout display"
,
/*160*/
0
)
set_callbacks
(
Open
GLES
,
Close
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"opengles"
,
"gles"
)
add_shortcut
(
"opengles"
,
"gles"
)
add_module
(
"gles"
,
"opengl es"
,
NULL
,
NULL
,
add_module
(
"gles"
,
"opengl es"
,
NULL
,
NULL
,
GLES_TEXT
,
PROVIDER_LONGTEXT
,
true
)
GLES_TEXT
,
PROVIDER_LONGTEXT
,
true
)
#else
# define API VLC_OPENGL
# define MODULE_VARNAME "gl"
set_shortname
(
N_
(
"OpenGL"
))
set_description
(
N_
(
"Open Graphics Library video output"
))
set_category
(
CAT_VIDEO
)
set_subcategory
(
SUBCAT_VIDEO_VOUT
)
set_capability
(
"vout display"
,
/*170*/
0
)
set_callbacks
(
Open
,
Close
)
add_shortcut
(
"opengl"
,
"gl"
)
add_module
(
"gl"
,
"opengl"
,
NULL
,
NULL
,
GL_TEXT
,
PROVIDER_LONGTEXT
,
true
)
#endif
vlc_module_end
()
vlc_module_end
()
struct
vout_display_sys_t
struct
vout_display_sys_t
...
@@ -111,7 +115,7 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
...
@@ -111,7 +115,7 @@ static vout_window_t *MakeWindow (vout_display_t *vd)
/**
/**
* Allocates a surface and an OpenGL context for video output.
* Allocates a surface and an OpenGL context for video output.
*/
*/
static
int
Open
(
vlc_object_t
*
obj
,
unsigned
api
,
const
char
*
name
)
static
int
Open
(
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
=
malloc
(
sizeof
(
*
sys
));
vout_display_sys_t
*
sys
=
malloc
(
sizeof
(
*
sys
));
...
@@ -125,7 +129,7 @@ static int Open (vlc_object_t *obj, unsigned api, const char *name)
...
@@ -125,7 +129,7 @@ static int Open (vlc_object_t *obj, unsigned api, const char *name)
if
(
sys
->
window
==
NULL
)
if
(
sys
->
window
==
NULL
)
goto
error
;
goto
error
;
sys
->
gl
=
vlc_gl_Create
(
sys
->
window
,
api
,
name
);
sys
->
gl
=
vlc_gl_Create
(
sys
->
window
,
API
,
"$"
MODULE_VARNAME
);
if
(
sys
->
gl
==
NULL
)
if
(
sys
->
gl
==
NULL
)
goto
error
;
goto
error
;
...
@@ -155,21 +159,6 @@ error:
...
@@ -155,21 +159,6 @@ error:
return
VLC_EGENERIC
;
return
VLC_EGENERIC
;
}
}
static
int
OpenGL
(
vlc_object_t
*
obj
)
{
return
Open
(
obj
,
VLC_OPENGL
,
"$gl"
);
}
static
int
OpenGLES2
(
vlc_object_t
*
obj
)
{
return
Open
(
obj
,
VLC_OPENGL_ES2
,
"$gles2"
);
}
static
int
OpenGLES
(
vlc_object_t
*
obj
)
{
return
Open
(
obj
,
VLC_OPENGL_ES2
,
"$gles"
);
}
/**
/**
* Destroys the OpenGL context.
* Destroys the OpenGL context.
*/
*/
...
...
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