Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
353c2e38
Commit
353c2e38
authored
Aug 30, 2017
by
Clément Bœsch
Committed by
Clément Bœsch
Sep 02, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
build: replace use of HAVE_SDL2 with existing CONFIG_SDL2
There is no need for duplication.
parent
b802971d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
12 deletions
+11
-12
configure
configure
+0
-1
opengl_enc.c
libavdevice/opengl_enc.c
+11
-11
No files found.
configure
View file @
353c2e38
...
@@ -2068,7 +2068,6 @@ HAVE_LIST="
...
@@ -2068,7 +2068,6 @@ HAVE_LIST="
MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
MMAL_PARAMETER_VIDEO_MAX_NUM_CALLBACKS
perl
perl
pod2man
pod2man
sdl2
section_data_rel_ro
section_data_rel_ro
sndio
sndio
texi2html
texi2html
...
...
libavdevice/opengl_enc.c
View file @
353c2e38
...
@@ -46,7 +46,7 @@
...
@@ -46,7 +46,7 @@
#include <GL/glx.h>
#include <GL/glx.h>
#endif
#endif
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
#include <SDL.h>
#include <SDL.h>
#endif
#endif
...
@@ -174,7 +174,7 @@ static const GLushort g_index[6] =
...
@@ -174,7 +174,7 @@ static const GLushort g_index[6] =
typedef
struct
OpenGLContext
{
typedef
struct
OpenGLContext
{
AVClass
*
class
;
///< class for private options
AVClass
*
class
;
///< class for private options
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
SDL_Window
*
window
;
SDL_Window
*
window
;
SDL_GLContext
glcontext
;
SDL_GLContext
glcontext
;
#endif
#endif
...
@@ -343,7 +343,7 @@ static int opengl_control_message(AVFormatContext *h, int type, void *data, size
...
@@ -343,7 +343,7 @@ static int opengl_control_message(AVFormatContext *h, int type, void *data, size
return
AVERROR
(
ENOSYS
);
return
AVERROR
(
ENOSYS
);
}
}
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
static
int
opengl_sdl_process_events
(
AVFormatContext
*
h
)
static
int
opengl_sdl_process_events
(
AVFormatContext
*
h
)
{
{
OpenGLContext
*
opengl
=
h
->
priv_data
;
OpenGLContext
*
opengl
=
h
->
priv_data
;
...
@@ -448,14 +448,14 @@ static int av_cold opengl_sdl_load_procedures(OpenGLContext *opengl)
...
@@ -448,14 +448,14 @@ static int av_cold opengl_sdl_load_procedures(OpenGLContext *opengl)
#undef LOAD_OPENGL_FUN
#undef LOAD_OPENGL_FUN
}
}
#endif
/*
HAVE
_SDL2 */
#endif
/*
CONFIG
_SDL2 */
#if defined(__APPLE__)
#if defined(__APPLE__)
static
int
av_cold
opengl_load_procedures
(
OpenGLContext
*
opengl
)
static
int
av_cold
opengl_load_procedures
(
OpenGLContext
*
opengl
)
{
{
FFOpenGLFunctions
*
procs
=
&
opengl
->
glprocs
;
FFOpenGLFunctions
*
procs
=
&
opengl
->
glprocs
;
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
if
(
!
opengl
->
no_window
)
if
(
!
opengl
->
no_window
)
return
opengl_sdl_load_procedures
(
opengl
);
return
opengl_sdl_load_procedures
(
opengl
);
#endif
#endif
...
@@ -505,7 +505,7 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl)
...
@@ -505,7 +505,7 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl)
return AVERROR(ENOSYS); \
return AVERROR(ENOSYS); \
}
}
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
if
(
!
opengl
->
no_window
)
if
(
!
opengl
->
no_window
)
return
opengl_sdl_load_procedures
(
opengl
);
return
opengl_sdl_load_procedures
(
opengl
);
#endif
#endif
...
@@ -931,7 +931,7 @@ static int opengl_create_window(AVFormatContext *h)
...
@@ -931,7 +931,7 @@ static int opengl_create_window(AVFormatContext *h)
int
ret
;
int
ret
;
if
(
!
opengl
->
no_window
)
{
if
(
!
opengl
->
no_window
)
{
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
if
((
ret
=
opengl_sdl_create_window
(
h
))
<
0
)
{
if
((
ret
=
opengl_sdl_create_window
(
h
))
<
0
)
{
av_log
(
opengl
,
AV_LOG_ERROR
,
"Cannot create default SDL window.
\n
"
);
av_log
(
opengl
,
AV_LOG_ERROR
,
"Cannot create default SDL window.
\n
"
);
return
ret
;
return
ret
;
...
@@ -963,7 +963,7 @@ static int opengl_release_window(AVFormatContext *h)
...
@@ -963,7 +963,7 @@ static int opengl_release_window(AVFormatContext *h)
int
ret
;
int
ret
;
OpenGLContext
*
opengl
=
h
->
priv_data
;
OpenGLContext
*
opengl
=
h
->
priv_data
;
if
(
!
opengl
->
no_window
)
{
if
(
!
opengl
->
no_window
)
{
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
SDL_GL_DeleteContext
(
opengl
->
glcontext
);
SDL_GL_DeleteContext
(
opengl
->
glcontext
);
SDL_DestroyWindow
(
opengl
->
window
);
SDL_DestroyWindow
(
opengl
->
window
);
SDL_Quit
();
SDL_Quit
();
...
@@ -1099,7 +1099,7 @@ static av_cold int opengl_write_header(AVFormatContext *h)
...
@@ -1099,7 +1099,7 @@ static av_cold int opengl_write_header(AVFormatContext *h)
glClear
(
GL_COLOR_BUFFER_BIT
);
glClear
(
GL_COLOR_BUFFER_BIT
);
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
if
(
!
opengl
->
no_window
)
if
(
!
opengl
->
no_window
)
SDL_GL_SwapWindow
(
opengl
->
window
);
SDL_GL_SwapWindow
(
opengl
->
window
);
#endif
#endif
...
@@ -1194,7 +1194,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
...
@@ -1194,7 +1194,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
const
AVPixFmtDescriptor
*
desc
=
av_pix_fmt_desc_get
(
pix_fmt
);
int
ret
;
int
ret
;
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
if
(
!
opengl
->
no_window
&&
(
ret
=
opengl_sdl_process_events
(
h
))
<
0
)
if
(
!
opengl
->
no_window
&&
(
ret
=
opengl_sdl_process_events
(
h
))
<
0
)
goto
fail
;
goto
fail
;
#endif
#endif
...
@@ -1235,7 +1235,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
...
@@ -1235,7 +1235,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
ret
=
AVERROR_EXTERNAL
;
ret
=
AVERROR_EXTERNAL
;
OPENGL_ERROR_CHECK
(
opengl
);
OPENGL_ERROR_CHECK
(
opengl
);
#if
HAVE
_SDL2
#if
CONFIG
_SDL2
if
(
!
opengl
->
no_window
)
if
(
!
opengl
->
no_window
)
SDL_GL_SwapWindow
(
opengl
->
window
);
SDL_GL_SwapWindow
(
opengl
->
window
);
#endif
#endif
...
...
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