Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
GSoC
GSoC2018
macOS
vlc
Commits
e6bf9bce
Commit
e6bf9bce
authored
May 23, 2018
by
Zhao Zhili
Committed by
Thomas Guillem
May 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
opengl: rename HasExtension to generic StrHasToken
Signed-off-by:
Thomas Guillem
<
thomas@gllm.fr
>
parent
bee130f6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
14 additions
and
14 deletions
+14
-14
include/vlc_opengl.h
include/vlc_opengl.h
+1
-1
modules/video_output/opengl/converter_sw.c
modules/video_output/opengl/converter_sw.c
+5
-5
modules/video_output/opengl/converter_vaapi.c
modules/video_output/opengl/converter_vaapi.c
+2
-2
modules/video_output/opengl/converter_vdpau.c
modules/video_output/opengl/converter_vdpau.c
+1
-1
modules/video_output/opengl/fragment_shaders.c
modules/video_output/opengl/fragment_shaders.c
+1
-1
modules/video_output/opengl/vout_helper.c
modules/video_output/opengl/vout_helper.c
+2
-2
modules/video_output/win32/direct3d9.c
modules/video_output/win32/direct3d9.c
+1
-1
modules/video_output/win32/wgl.c
modules/video_output/win32/wgl.c
+1
-1
No files found.
include/vlc_opengl.h
View file @
e6bf9bce
...
...
@@ -118,7 +118,7 @@ VLC_API vlc_gl_t *vlc_gl_surface_Create(vlc_object_t *,
VLC_API
bool
vlc_gl_surface_CheckSize
(
vlc_gl_t
*
,
unsigned
*
w
,
unsigned
*
h
);
VLC_API
void
vlc_gl_surface_Destroy
(
vlc_gl_t
*
);
static
inline
bool
vlc_gl_
HasExtensio
n
(
const
char
*
apis
,
const
char
*
api
)
static
inline
bool
vlc_gl_
StrHasToke
n
(
const
char
*
apis
,
const
char
*
api
)
{
size_t
apilen
=
strlen
(
api
);
while
(
apis
)
{
...
...
modules/video_output/opengl/converter_sw.c
View file @
e6bf9bce
...
...
@@ -586,19 +586,19 @@ opengl_tex_converter_generic_init(opengl_tex_converter_t *tc, bool allow_dr)
/* OpenGL or OpenGL ES2 with GL_EXT_unpack_subimage ext */
priv
->
has_unpack_subimage
=
!
tc
->
is_gles
||
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_EXT_unpack_subimage"
);
!
tc
->
is_gles
||
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_EXT_unpack_subimage"
);
if
(
allow_dr
&&
priv
->
has_unpack_subimage
)
{
bool
supports_map_persistent
=
false
;
const
bool
has_pbo
=
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_ARB_pixel_buffer_object"
)
||
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_EXT_pixel_buffer_object"
);
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_ARB_pixel_buffer_object"
)
||
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_EXT_pixel_buffer_object"
);
const
bool
has_bs
=
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_ARB_buffer_storage"
)
||
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_EXT_buffer_storage"
);
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_ARB_buffer_storage"
)
||
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_EXT_buffer_storage"
);
/* Ensure we do direct rendering with OpenGL 3.0 or higher. Indeed,
* persistent mapped buffers seems to be slow with OpenGL 2.1 drivers
...
...
modules/video_output/opengl/converter_vaapi.c
View file @
e6bf9bce
...
...
@@ -406,11 +406,11 @@ Open(vlc_object_t *obj)
||
tc
->
gl
->
egl
.
destroyImageKHR
==
NULL
)
return
VLC_EGENERIC
;
if
(
!
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_OES_EGL_image"
))
if
(
!
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_OES_EGL_image"
))
return
VLC_EGENERIC
;
const
char
*
eglexts
=
tc
->
gl
->
egl
.
queryString
(
tc
->
gl
,
EGL_EXTENSIONS
);
if
(
eglexts
==
NULL
||
!
vlc_gl_
HasExtensio
n
(
eglexts
,
"EGL_EXT_image_dma_buf_import"
))
if
(
eglexts
==
NULL
||
!
vlc_gl_
StrHasToke
n
(
eglexts
,
"EGL_EXT_image_dma_buf_import"
))
return
VLC_EGENERIC
;
struct
priv
*
priv
=
tc
->
priv
=
calloc
(
1
,
sizeof
(
struct
priv
));
...
...
modules/video_output/opengl/converter_vdpau.c
View file @
e6bf9bce
...
...
@@ -175,7 +175,7 @@ Open(vlc_object_t *obj)
if
((
tc
->
fmt
.
i_chroma
!=
VLC_CODEC_VDPAU_VIDEO_420
&&
tc
->
fmt
.
i_chroma
!=
VLC_CODEC_VDPAU_VIDEO_422
&&
tc
->
fmt
.
i_chroma
!=
VLC_CODEC_VDPAU_VIDEO_444
)
||
!
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_NV_vdpau_interop"
)
||
!
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_NV_vdpau_interop"
)
||
tc
->
gl
->
surface
->
type
!=
VOUT_WINDOW_TYPE_XID
)
return
VLC_EGENERIC
;
...
...
modules/video_output/opengl/fragment_shaders.c
View file @
e6bf9bce
...
...
@@ -104,7 +104,7 @@ tc_yuv_base_init(opengl_tex_converter_t *tc, GLenum tex_target,
GLint
oneplane_texfmt
,
oneplane16_texfmt
,
twoplanes_texfmt
,
twoplanes16_texfmt
;
if
(
vlc_gl_
HasExtensio
n
(
tc
->
glexts
,
"GL_ARB_texture_rg"
))
if
(
vlc_gl_
StrHasToke
n
(
tc
->
glexts
,
"GL_ARB_texture_rg"
))
{
oneplane_texfmt
=
GL_RED
;
oneplane16_texfmt
=
GL_R16
;
...
...
modules/video_output/opengl/vout_helper.c
View file @
e6bf9bce
...
...
@@ -871,8 +871,8 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
* so checks for extensions are bound to fail. Check for OpenGL ES version instead. */
vgl
->
supports_npot
=
true
;
#else
vgl
->
supports_npot
=
vlc_gl_
HasExtensio
n
(
extensions
,
"GL_ARB_texture_non_power_of_two"
)
||
vlc_gl_
HasExtensio
n
(
extensions
,
"GL_APPLE_texture_2D_limited_npot"
);
vgl
->
supports_npot
=
vlc_gl_
StrHasToke
n
(
extensions
,
"GL_ARB_texture_non_power_of_two"
)
||
vlc_gl_
StrHasToke
n
(
extensions
,
"GL_APPLE_texture_2D_limited_npot"
);
#endif
bool
b_dump_shaders
=
var_InheritInteger
(
gl
,
"verbose"
)
>=
4
;
...
...
modules/video_output/win32/direct3d9.c
View file @
e6bf9bce
...
...
@@ -1943,7 +1943,7 @@ GLConvOpen(vlc_object_t *obj)
const
char
*
wglExt
=
tc
->
gl
->
wgl
.
getExtensionsString
(
tc
->
gl
);
if
(
wglExt
==
NULL
||
!
vlc_gl_
HasExtensio
n
(
wglExt
,
"WGL_NV_DX_interop"
))
if
(
wglExt
==
NULL
||
!
vlc_gl_
StrHasToke
n
(
wglExt
,
"WGL_NV_DX_interop"
))
return
VLC_EGENERIC
;
struct
wgl_vt
vt
;
...
...
modules/video_output/win32/wgl.c
View file @
e6bf9bce
...
...
@@ -198,7 +198,7 @@ static int Open(vlc_object_t *object)
#ifdef WGL_EXT_swap_control
/* Create an GPU Affinity DC */
const
char
*
extensions
=
(
const
char
*
)
glGetString
(
GL_EXTENSIONS
);
if
(
vlc_gl_
HasExtensio
n
(
extensions
,
"WGL_EXT_swap_control"
))
{
if
(
vlc_gl_
StrHasToke
n
(
extensions
,
"WGL_EXT_swap_control"
))
{
PFNWGLSWAPINTERVALEXTPROC
SwapIntervalEXT
=
(
PFNWGLSWAPINTERVALEXTPROC
)
wglGetProcAddress
(
"wglSwapIntervalEXT"
);
if
(
SwapIntervalEXT
)
SwapIntervalEXT
(
1
);
...
...
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