[vlc-commits] [Git][videolan/vlc][master] 4 commits: opengl: reorder Makefile
Romain Vimont (@rom1v)
gitlab at videolan.org
Wed Aug 25 10:46:23 UTC 2021
Romain Vimont pushed to branch master at VideoLAN / VLC
Commits:
4e5d3ade by Romain Vimont at 2021-08-24T11:23:35+02:00
opengl: reorder Makefile
Gather all libgl_plugin.la declarations at the same place.
- - - - -
01d983f8 by Romain Vimont at 2021-08-24T11:23:35+02:00
opengl: remove duplicate entry in Makefile
The header filter.h was included twice.
- - - - -
d59527eb by Romain Vimont at 2021-08-24T11:23:35+02:00
opengl: reformat Makefile
- - - - -
d98f1346 by Romain Vimont at 2021-08-24T11:23:35+02:00
opengl: move "draw" filter to its own plugin
This avoids to expose the exact same module in different plugins.
Moreover, the "draw" filter is necessary to the OpenGL filter engine,
but is not directly related to any vout, so it was odd to include it in
vout plugins.
- - - - -
7 changed files:
- modules/video_output/caopengllayer.m
- modules/video_output/macosx.m
- modules/video_output/opengl/Makefile.am
- modules/video_output/opengl/display.c
- modules/video_output/opengl/filter_draw.c
- − modules/video_output/opengl/filter_draw.h
- modules/video_output/win32/glwin32.c
Changes:
=====================================
modules/video_output/caopengllayer.m
=====================================
@@ -40,7 +40,6 @@
#import <OpenGL/OpenGL.h>
#import <dlfcn.h> /* dlsym */
-#include "opengl/filter_draw.h"
#include "opengl/renderer.h"
#include "opengl/vout_helper.h"
@@ -59,7 +58,6 @@ vlc_module_begin()
set_callback_display(Open, 0)
add_opengl_submodule_renderer()
- add_opengl_submodule_draw()
vlc_module_end()
static void PictureRender (vout_display_t *vd, picture_t *pic, subpicture_t *subpicture,
=====================================
modules/video_output/macosx.m
=====================================
@@ -46,7 +46,6 @@
#include <vlc_vout_display.h>
#include <vlc_opengl.h>
#include <vlc_dialog.h>
-#include "opengl/filter_draw.h"
#include "opengl/renderer.h"
#include "opengl/vout_helper.h"
@@ -82,7 +81,6 @@ vlc_module_begin ()
add_glopts ()
add_opengl_submodule_renderer()
- add_opengl_submodule_draw()
vlc_module_end ()
/**
=====================================
modules/video_output/opengl/Makefile.am
=====================================
@@ -1,9 +1,6 @@
OPENGL_COMMONSOURCES = \
video_output/opengl/filter.c \
video_output/opengl/filter.h \
- video_output/opengl/filter_draw.c \
- video_output/opengl/filter_draw.h \
- video_output/opengl/filter.h \
video_output/opengl/filter_priv.h \
video_output/opengl/filters.c \
video_output/opengl/filters.h \
@@ -14,7 +11,8 @@ OPENGL_COMMONSOURCES = \
video_output/opengl/gl_util.h \
video_output/opengl/interop.h \
video_output/opengl/internal.h \
- video_output/opengl/interop.c video_output/opengl/interop_sw.c \
+ video_output/opengl/interop.c \
+ video_output/opengl/interop_sw.c \
video_output/opengl/sampler.c \
video_output/opengl/sampler.h \
video_output/opengl/sampler_priv.h
@@ -70,6 +68,26 @@ libgl_plugin_la_SOURCES = video_output/opengl/display.c \
$(OPENGL_VOUT_COMMONSOURCES)
libgl_plugin_la_CFLAGS = $(AM_CFLAGS) $(GL_CFLAGS) $(OPENGL_COMMONCFLAGS)
libgl_plugin_la_LIBADD = libvlc_opengl.la
+if HAVE_GL
+vout_LTLIBRARIES += libgl_plugin.la
+endif # HAVE_GL
+
+libglfilter_draw_plugin_la_SOURCES = video_output/opengl/filter_draw.c
+libglfilter_draw_plugin_la_LDFLAGS = $(AM_LDFLAGS)
+if HAVE_GL
+libglfilter_draw_plugin_la_LIBADD = libvlc_opengl.la $(GL_LIBS)
+vout_LTLIBRARIES += libglfilter_draw_plugin.la
+endif
+if HAVE_IOS
+libglfilter_draw_plugin_la_LIBADD = libvlc_opengles.la $(GLES2_LIBS)
+libglfilter_draw_plugin_la_CFLAGS = -DUSE_OPENGL_ES2=1
+vout_LTLIBRARIES += libglfilter_draw_plugin.la
+endif
+if HAVE_ANDROID
+libglfilter_draw_plugin_la_LIBADD = libvlc_opengles.la $(GLES2_LIBS)
+libglfilter_draw_plugin_la_CFLAGS = -DUSE_OPENGL_ES2=1
+vout_LTLIBRARIES += libglfilter_draw_plugin.la
+endif
libglfilter_mock_plugin_la_SOURCES = video_output/opengl/filter_mock.c
libglfilter_mock_plugin_la_LIBADD = $(LIBM)
@@ -91,10 +109,6 @@ libglfilter_mock_plugin_la_CFLAGS = -DUSE_OPENGL_ES2=1
noinst_LTLIBRARIES += libglfilter_mock_plugin.la
endif
-if HAVE_GL
-vout_LTLIBRARIES += libgl_plugin.la
-endif # HAVE_GL
-
libegl_display_generic_plugin_la_SOURCES = video_output/opengl/egl_display_generic.c
libegl_display_generic_plugin_la_CPPFLAGS = $(AM_CPPFLAGS) $(EGL_FLAGS)
libegl_display_generic_plugin_la_LIBADD = $(EGL_LIBS)
=====================================
modules/video_output/opengl/display.c
=====================================
@@ -33,7 +33,6 @@
#include <vlc_opengl.h>
#include "vout_helper.h"
-#include "filter_draw.h"
#include "renderer.h"
/* Plugin callbacks */
@@ -71,7 +70,6 @@ vlc_module_begin ()
add_glopts ()
add_opengl_submodule_renderer()
- add_opengl_submodule_draw()
vlc_module_end ()
typedef struct vout_display_sys_t
=====================================
modules/video_output/opengl/filter_draw.c
=====================================
@@ -28,13 +28,17 @@
#include <vlc_modules.h>
#include <vlc_opengl.h>
-#include "filter_draw.h"
-
#include "filter.h"
#include "gl_api.h"
#include "gl_common.h"
#include "gl_util.h"
+#define DRAW_VFLIP_SHORTTEXT "VFlip the video"
+#define DRAW_VFLIP_LONGTEXT \
+ "Apply a vertical flip to the video"
+
+#define DRAW_CFG_PREFIX "draw-"
+
static const char *const filter_options[] = { "vflip", NULL };
struct sys {
@@ -84,10 +88,9 @@ Close(struct vlc_gl_filter *filter)
free(sys);
}
-int
-vlc_gl_filter_draw_Open(struct vlc_gl_filter *filter,
- const config_chain_t *config,
- struct vlc_gl_tex_size *size_out)
+static int
+Open(struct vlc_gl_filter *filter, const config_chain_t *config,
+ struct vlc_gl_tex_size *size_out)
{
(void) size_out;
@@ -195,3 +198,12 @@ error:
free(sys);
return VLC_EGENERIC;
}
+
+vlc_module_begin()
+ add_shortcut("draw");
+ set_shortname("draw")
+ set_capability("opengl filter", 0)
+ set_callback(Open)
+ add_bool(DRAW_CFG_PREFIX "vflip", false, \
+ DRAW_VFLIP_SHORTTEXT, DRAW_VFLIP_LONGTEXT)
+vlc_module_end()
=====================================
modules/video_output/opengl/filter_draw.h deleted
=====================================
@@ -1,44 +0,0 @@
-/*****************************************************************************
- * filter_draw.h
- *****************************************************************************
- * Copyright (C) 2020 VLC authors and VideoLAN
- * Copyright (C) 2020 Videolabs
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as published by
- * the Free Software Foundation; either version 2.1 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public License
- * along with this program; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
- *****************************************************************************/
-
-#ifndef VLC_GL_FILTER_DRAW_H
-#define VLC_GL_FILTER_DRAW_H
-
-#include "filter.h"
-
-#define DRAW_VFLIP_SHORTTEXT "VFlip the video"
-#define DRAW_VFLIP_LONGTEXT \
- "Apply a vertical flip to the video"
-
-#define DRAW_CFG_PREFIX "draw-"
-
-#define add_opengl_submodule_draw() \
- add_submodule() \
- add_shortcut("draw") \
- set_shortname("draw") \
- set_capability("opengl filter", 0) \
- set_callback(vlc_gl_filter_draw_Open) \
- add_bool(DRAW_CFG_PREFIX "vflip", false, \
- DRAW_VFLIP_SHORTTEXT, DRAW_VFLIP_LONGTEXT)
-
-vlc_gl_filter_open_fn vlc_gl_filter_draw_Open;
-
-#endif
=====================================
modules/video_output/win32/glwin32.c
=====================================
@@ -34,7 +34,6 @@
#include <versionhelpers.h>
#define GLEW_STATIC
-#include "../opengl/filter_draw.h"
#include "../opengl/renderer.h"
#include "../opengl/vout_helper.h"
@@ -57,7 +56,6 @@ vlc_module_begin()
add_glopts()
add_opengl_submodule_renderer()
- add_opengl_submodule_draw()
vlc_module_end()
/*****************************************************************************
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/163fb4869025e2bac0691c925d2e37b2d862114d...d98f134699121a5f231483e7a10073e56e4e5ad4
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/163fb4869025e2bac0691c925d2e37b2d862114d...d98f134699121a5f231483e7a10073e56e4e5ad4
You're receiving this email because of your account on code.videolan.org.
More information about the vlc-commits
mailing list