[vlc-commits] [Git][videolan/vlc][master] 3 commits: opengl: allow C++ OpenGL modules

Hugo Beauzée-Luyssen (@chouquette) gitlab at videolan.org
Tue Feb 22 16:47:06 UTC 2022



Hugo Beauzée-Luyssen pushed to branch master at VideoLAN / VLC


Commits:
c8aea2e6 by Hugo Beauzée-Luyssen at 2022-02-22T15:29:12+00:00
opengl: allow C++ OpenGL modules

- - - - -
d7410b93 by Hugo Beauzée-Luyssen at 2022-02-22T15:29:12+00:00
opengl: picture: remove static array size qualifier

This is invalid in C++.

- - - - -
8f2bf524 by Alexandre Janniaux at 2022-02-22T15:29:12+00:00
include: vlc_opengl: use extern "C" in C++ code

- - - - -


5 changed files:

- include/vlc_opengl.h
- modules/video_output/opengl/filter.h
- modules/video_output/opengl/picture.h
- modules/video_output/opengl/renderer.h
- modules/video_output/opengl/sampler.h


Changes:

=====================================
include/vlc_opengl.h
=====================================
@@ -24,6 +24,10 @@
 #ifndef VLC_GL_H
 #define VLC_GL_H 1
 
+# ifdef __cplusplus
+extern "C" {
+# endif
+
 /**
  * \file
  * This file defines GL structures and functions.
@@ -149,4 +153,8 @@ static inline bool vlc_gl_StrHasToken(const char *apis, const char *api)
     return false;
 }
 
+#ifdef __cplusplus
+}
+#endif /* C++ */
+
 #endif /* VLC_GL_H */


=====================================
modules/video_output/opengl/filter.h
=====================================
@@ -28,6 +28,11 @@
 
 struct vlc_gl_filter;
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 struct vlc_gl_tex_size {
     unsigned width;
     unsigned height;
@@ -145,4 +150,8 @@ struct vlc_gl_filter {
     void *sys;
 };
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif


=====================================
modules/video_output/opengl/picture.h
=====================================
@@ -141,6 +141,6 @@ vlc_gl_picture_ToTexCoords(const struct vlc_gl_picture *pic,
  */
 void
 vlc_gl_picture_ComputeDirectionMatrix(const struct vlc_gl_picture *pic,
-                                      float direction[static 2*2]);
+                                      float direction[2*2]);
 
 #endif


=====================================
modules/video_output/opengl/renderer.h
=====================================
@@ -32,6 +32,11 @@
 #include "interop.h"
 #include "sampler.h"
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 struct pl_context;
 struct pl_shader;
 struct pl_shader_res;
@@ -107,4 +112,8 @@ int
 vlc_gl_renderer_SetViewpoint(struct vlc_gl_renderer *renderer,
                              const vlc_viewpoint_t *p_vp);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* include-guard */


=====================================
modules/video_output/opengl/sampler.h
=====================================
@@ -33,6 +33,11 @@
 #include "gl_common.h"
 #include "picture.h"
 
+#ifdef __cplusplus
+extern "C"
+{
+#endif
+
 /**
  * The purpose of a sampler is to provide pixel values of a VLC input picture,
  * stored in any format.
@@ -190,4 +195,8 @@ vlc_gl_sampler_Update(struct vlc_gl_sampler *sampler,
 void
 vlc_gl_sampler_SelectPlane(struct vlc_gl_sampler *sampler, unsigned plane);
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif



View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/267cf709fb0b31716ff558c7e739b2e8d9ba09d6...8f2bf524c0e631b93142028ee0ed9f3bed6c36a7

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/compare/267cf709fb0b31716ff558c7e739b2e8d9ba09d6...8f2bf524c0e631b93142028ee0ed9f3bed6c36a7
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