[vlc-commits] [Git][videolan/vlc][master] 7 commits: opengl: filter: add forward-declaration

Steve Lhomme (@robUx4) gitlab at videolan.org
Wed May 10 10:28:08 UTC 2023



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
3c9c1b9e by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
opengl: filter: add forward-declaration

Add forward-declaration for filter.h so that it doesn't depends on
opengl/picture.h.

vlc_es.h needs to be imported now, because of the dovi metadata.

- - - - -
5c83ea97 by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
opengl: filters: forward-declare vlc_gl_filter

- - - - -
18bcf2bf by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
include: vlc_opengl_filter: import filter.h from modules/

Import the filter.h header into the include/ so that new implementations
can be written without using headers from modules/. This enables cleaner
approach to write test driver using filters, which was used when testing
the OpenGL implementation and the matching interop for emscripten.

- - - - -
24e9a297 by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
opengl: remove filter.h and adapt clients

Now that vlc_opengl_filter.h is exposed, we can adapt the clients.
Splitting in two commits allows easy cherry-picking without breaking
anything, while this commit also modify the clients.

- - - - -
e47d7251 by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
include: vlc_opengl_filter: add gl pointer

Reference the vlc_gl_t provider used by the filter so that filter
implementation can load other OpenGL symbols and extensions.

- - - - -
080baa06 by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
opengl: vout_helper: remove unused label

The label is unused starting with the removal of the matching goto in
viewpoint error with commit 99e3c1c47ee2e7f56bbd73b9032c436222c561e0.

    ../../modules/video_output/opengl/vout_helper.c: In function ‘vout_display_opengl_New’:
    ../../modules/video_output/opengl/vout_helper.c:265:1: warning: label ‘delete_sub_renderer’ defined but not used [-Wunused-label]
      265 | delete_sub_renderer:
          | ^~~~~~~~~~~~~~~~~~~

- - - - -
a538bdbf by Alexandre Janniaux at 2023-05-10T09:29:22+00:00
include: meson.build: add missing opengl includes

- - - - -


15 changed files:

- include/meson.build
- modules/video_output/opengl/filter.h → include/vlc_opengl_filter.h
- modules/video_filter/deinterlace/glblend.c
- modules/video_output/opengl/Makefile.am
- modules/video_output/opengl/filter.c
- modules/video_output/opengl/filter_draw.c
- modules/video_output/opengl/filter_mock.c
- modules/video_output/opengl/filter_priv.h
- modules/video_output/opengl/filters.c
- modules/video_output/opengl/filters.h
- modules/video_output/opengl/pl_scale.c
- modules/video_output/opengl/renderer.c
- modules/video_output/opengl/renderer.h
- modules/video_output/opengl/vout_helper.c
- src/Makefile.am


Changes:

=====================================
include/meson.build
=====================================
@@ -77,6 +77,8 @@ install_headers(
     'vlc_network.h',
     'vlc_objects.h',
     'vlc_opengl.h',
+    'vlc_opengl_filter.h',
+    'vlc_opengl_interop.h',
     'vlc_pgpkey.h',
     'vlc_picture.h',
     'vlc_picture_fifo.h',


=====================================
modules/video_output/opengl/filter.h → include/vlc_opengl_filter.h
=====================================
@@ -1,8 +1,10 @@
 /*****************************************************************************
- * filter.h
+ * vlc_opengl_filter.h
  *****************************************************************************
  * Copyright (C) 2020 VLC authors and VideoLAN
- * Copyright (C) 2020 Videolabs
+ * Copyright (C) 2020-2023 Videolabs
+ *
+ * Authors: Alexandre Janniaux <ajanni at videolabs.io>
  *
  * 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
@@ -19,14 +21,15 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
  *****************************************************************************/
 
-#ifndef VLC_GL_FILTER_H
-#define VLC_GL_FILTER_H
+#ifndef VLC_OPENGL_FILTER_H
+#define VLC_OPENGL_FILTER_H
 
 #include <vlc_tick.h>
-
-#include "picture.h"
+#include <vlc_es.h>
 
 struct vlc_gl_filter;
+struct vlc_gl_picture;
+struct vlc_gl_format;
 
 #ifdef __cplusplus
 extern "C"
@@ -54,7 +57,7 @@ vlc_gl_filter_open_fn(struct vlc_gl_filter *filter,
     { \
         vlc_gl_filter_open_fn *fn = open; \
         (void) fn; \
-        set_callback(fn) \
+        set_callback(fn); \
     }
 
 struct vlc_gl_filter_ops {


=====================================
modules/video_filter/deinterlace/glblend.c
=====================================
@@ -27,9 +27,9 @@
 #include <vlc_plugin.h>
 #include <vlc_modules.h>
 #include <vlc_opengl.h>
+#include <vlc_opengl_filter.h>
 #include <vlc_filter.h>
 
-#include "video_output/opengl/filter.h"
 #include "video_output/opengl/gl_api.h"
 #include "video_output/opengl/gl_common.h"
 #include "video_output/opengl/gl_util.h"


=====================================
modules/video_output/opengl/Makefile.am
=====================================
@@ -1,6 +1,5 @@
 OPENGL_COMMONSOURCES = \
        video_output/opengl/filter.c \
-       video_output/opengl/filter.h \
        video_output/opengl/filter_priv.h \
        video_output/opengl/filters.c \
        video_output/opengl/filters.h \


=====================================
modules/video_output/opengl/filter.c
=====================================
@@ -31,6 +31,7 @@
 #include <vlc_modules.h>
 
 #include "gl_api.h"
+#include "picture.h"
 
 struct vlc_gl_filter *
 vlc_gl_filter_New(struct vlc_gl_t *gl, const struct vlc_gl_api *api)


=====================================
modules/video_output/opengl/filter_draw.c
=====================================
@@ -28,8 +28,8 @@
 #include <vlc_plugin.h>
 #include <vlc_modules.h>
 #include <vlc_opengl.h>
+#include <vlc_opengl_filter.h>
 
-#include "filter.h"
 #include "gl_api.h"
 #include "gl_common.h"
 #include "gl_util.h"


=====================================
modules/video_output/opengl/filter_mock.c
=====================================
@@ -66,14 +66,15 @@
 #include <vlc_plugin.h>
 #include <vlc_modules.h>
 #include <vlc_opengl.h>
+#include <vlc_opengl_filter.h>
 
 #include <math.h>
 
-#include "filter.h"
 #include "gl_api.h"
 #include "gl_common.h"
 #include "gl_util.h"
 #include "sampler.h"
+#include "picture.h"
 
 #define MOCK_CFG_PREFIX "mock-"
 


=====================================
modules/video_output/opengl/filter_priv.h
=====================================
@@ -25,8 +25,9 @@
 #include <vlc_common.h>
 #include <vlc_list.h>
 #include <vlc_picture.h>
+#include <vlc_opengl_filter.h>
 
-#include "filter.h"
+#include "picture.h"
 
 struct vlc_gl_filter_priv {
     struct vlc_gl_filter filter;


=====================================
modules/video_output/opengl/filters.c
=====================================
@@ -210,6 +210,7 @@ vlc_gl_filters_Append(struct vlc_gl_filters *filters, const char *name,
     struct vlc_gl_filter *filter = vlc_gl_filter_New(filters->gl, filters->api);
     if (!filter)
         return NULL;
+    filter->gl = filters->gl;
 
     struct vlc_gl_filter_priv *priv = vlc_gl_filter_PRIV(filter);
 


=====================================
modules/video_output/opengl/filters.h
=====================================
@@ -27,12 +27,12 @@
 #include <vlc_opengl.h>
 #include <vlc_tick.h>
 
-#include "filter.h"
 #include "gl_api.h"
 #include "interop.h"
 #include "sampler.h"
 
 struct vlc_gl_filters;
+struct vlc_gl_filter;
 
 /**
  * Create a new OpenGL filter chain


=====================================
modules/video_output/opengl/pl_scale.c
=====================================
@@ -31,13 +31,13 @@
 #include <vlc_modules.h>
 #include <vlc_opengl.h>
 #include <vlc_filter.h>
+#include <vlc_opengl_filter.h>
 
 #include <libplacebo/log.h>
 #include <libplacebo/gpu.h>
 #include <libplacebo/opengl.h>
 #include <libplacebo/renderer.h>
 
-#include "video_output/opengl/filter.h"
 #include "video_output/opengl/gl_api.h"
 #include "video_output/opengl/gl_common.h"
 #include "video_output/opengl/gl_scale.h"


=====================================
modules/video_output/opengl/renderer.c
=====================================
@@ -36,11 +36,12 @@
 #include <vlc_common.h>
 #include <vlc_es.h>
 #include <vlc_picture.h>
+#include <vlc_opengl_filter.h>
 
-#include "filter.h"
 #include "gl_util.h"
 #include "vout_helper.h"
 #include "sampler.h"
+#include "picture.h"
 
 #define SPHERE_RADIUS 1.f
 


=====================================
modules/video_output/opengl/renderer.h
=====================================
@@ -24,9 +24,9 @@
 #include <vlc_common.h>
 #include <vlc_codec.h>
 #include <vlc_opengl.h>
+#include <vlc_opengl_filter.h>
 #include <vlc_plugin.h>
 
-#include "filter.h"
 #include "gl_api.h"
 #include "gl_common.h"
 #include "interop.h"


=====================================
modules/video_output/opengl/vout_helper.c
=====================================
@@ -262,8 +262,6 @@ vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
     GL_ASSERT_NOERROR(vt);
     return vgl;
 
-delete_sub_renderer:
-    vlc_gl_sub_renderer_Delete(vgl->sub_renderer);
 delete_sub_interop:
     vlc_gl_interop_Delete(vgl->sub_interop);
 delete_filters:


=====================================
src/Makefile.am
=====================================
@@ -84,6 +84,7 @@ pluginsinclude_HEADERS = \
 	../include/vlc_objects.h \
 	../include/vlc_opengl.h \
 	../include/vlc_opengl_interop.h \
+	../include/vlc_opengl_filter.h \
 	../include/vlc_picture.h \
 	../include/vlc_picture_fifo.h \
 	../include/vlc_picture_pool.h \



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c585c486dea97c169c56eef9ef674887ec368ee7...a538bdbf7e7d4d740a935557d7b399caa3716562

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/c585c486dea97c169c56eef9ef674887ec368ee7...a538bdbf7e7d4d740a935557d7b399caa3716562
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list