#include <GL/glx.h>
#endif
-#if HAVE_SDL2
+#if CONFIG_SDL2
#include <SDL.h>
#endif
typedef struct OpenGLContext {
AVClass *class; ///< class for private options
-#if HAVE_SDL2
+#if CONFIG_SDL2
SDL_Window *window;
SDL_GLContext glcontext;
#endif
return AVERROR(ENOSYS);
}
-#if HAVE_SDL2
+#if CONFIG_SDL2
static int opengl_sdl_process_events(AVFormatContext *h)
{
OpenGLContext *opengl = h->priv_data;
#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
return AVERROR(ENOSYS); \
}
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
return opengl_sdl_load_procedures(opengl);
#endif
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;
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();
glClear(GL_COLOR_BUFFER_BIT);
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
SDL_GL_SwapWindow(opengl->window);
#endif
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
ret = AVERROR_EXTERNAL;
OPENGL_ERROR_CHECK(opengl);
-#if HAVE_SDL2
+#if CONFIG_SDL2
if (!opengl->no_window)
SDL_GL_SwapWindow(opengl->window);
#endif