summaryrefslogtreecommitdiff
path: root/libavdevice/opengl_enc.c
diff options
context:
space:
mode:
authorClément Bœsch <cboesch@gopro.com>2017-08-30 13:46:38 +0200
committerClément Bœsch <u@pkh.me>2017-09-02 16:14:15 +0200
commit353c2e384c7000fa65092d36773d687d44c6ab95 (patch)
treea12d8a6a0b927e371acb2ddc311191cf4c5c2250 /libavdevice/opengl_enc.c
parentb802971d6db5ad09d8d7dd0bbc20e3eea4c25f54 (diff)
build: replace use of HAVE_SDL2 with existing CONFIG_SDL2
There is no need for duplication.
Diffstat (limited to 'libavdevice/opengl_enc.c')
-rw-r--r--libavdevice/opengl_enc.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/libavdevice/opengl_enc.c b/libavdevice/opengl_enc.c
index 1fc7ddd003..bb6787c6f1 100644
--- a/libavdevice/opengl_enc.c
+++ b/libavdevice/opengl_enc.c
@@ -46,7 +46,7 @@
#include <GL/glx.h>
#endif
-#if HAVE_SDL2
+#if CONFIG_SDL2
#include <SDL.h>
#endif
@@ -174,7 +174,7 @@ static const GLushort g_index[6] =
typedef struct OpenGLContext {
AVClass *class; ///< class for private options
-#if HAVE_SDL2
+#if CONFIG_SDL2
SDL_Window *window;
SDL_GLContext glcontext;
#endif
@@ -343,7 +343,7 @@ static int opengl_control_message(AVFormatContext *h, int type, void *data, size
return AVERROR(ENOSYS);
}
-#if HAVE_SDL2
+#if CONFIG_SDL2
static int opengl_sdl_process_events(AVFormatContext *h)
{
OpenGLContext *opengl = h->priv_data;
@@ -448,14 +448,14 @@ static int av_cold opengl_sdl_load_procedures(OpenGLContext *opengl)
#undef LOAD_OPENGL_FUN
}
-#endif /* HAVE_SDL2 */
+#endif /* CONFIG_SDL2 */
#if defined(__APPLE__)
static int av_cold opengl_load_procedures(OpenGLContext *opengl)
{
FFOpenGLFunctions *procs = &opengl->glprocs;
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
return opengl_sdl_load_procedures(opengl);
#endif
@@ -505,7 +505,7 @@ static int av_cold opengl_load_procedures(OpenGLContext *opengl)
return AVERROR(ENOSYS); \
}
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
return opengl_sdl_load_procedures(opengl);
#endif
@@ -931,7 +931,7 @@ static int opengl_create_window(AVFormatContext *h)
int ret;
if (!opengl->no_window) {
-#if HAVE_SDL2
+#if CONFIG_SDL2
if ((ret = opengl_sdl_create_window(h)) < 0) {
av_log(opengl, AV_LOG_ERROR, "Cannot create default SDL window.\n");
return ret;
@@ -963,7 +963,7 @@ static int opengl_release_window(AVFormatContext *h)
int ret;
OpenGLContext *opengl = h->priv_data;
if (!opengl->no_window) {
-#if HAVE_SDL2
+#if CONFIG_SDL2
SDL_GL_DeleteContext(opengl->glcontext);
SDL_DestroyWindow(opengl->window);
SDL_Quit();
@@ -1099,7 +1099,7 @@ static av_cold int opengl_write_header(AVFormatContext *h)
glClear(GL_COLOR_BUFFER_BIT);
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
SDL_GL_SwapWindow(opengl->window);
#endif
@@ -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);
int ret;
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window && (ret = opengl_sdl_process_events(h)) < 0)
goto fail;
#endif
@@ -1235,7 +1235,7 @@ static int opengl_draw(AVFormatContext *h, void *input, int repaint, int is_pkt)
ret = AVERROR_EXTERNAL;
OPENGL_ERROR_CHECK(opengl);
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
SDL_GL_SwapWindow(opengl->window);
#endif