[vlc-devel] [PATCH 8/8] opengl/display: fix option categorisation for gles2

Lyndon Brown jnqnfe at gmail.com
Sat Sep 26 00:33:34 CEST 2020


From: Lyndon Brown <jnqnfe at gmail.com>
Date: Sat, 23 Mar 2019 04:48:04 +0000
Subject: opengl/display: fix option categorisation for gles2

note: the lack of cat/subcat on the gles2 module may have been deliberate,
due to the fact that gl and gles2 are separate plugins from the same
source and with this correction they introduce duplicate options when both
are installed on a system, which is not ideal, however there is a similar
issue with vout plugins and the fact that the options are guaranteed
identical means that it should not be a real issue. this also ensures that
the gles2 plugin will work correctly independent of the gl one (if such a
situation applies to anyone).

diff --git a/modules/video_output/opengl/display.c b/modules/video_output/opengl/display.c
index 151e98aff2..b4d79cf0ca 100644
--- a/modules/video_output/opengl/display.c
+++ b/modules/video_output/opengl/display.c
@@ -47,6 +47,8 @@ static void Close(vout_display_t *vd);
     "Extension through which to use the Open Graphics Library (OpenGL).")
 
 vlc_module_begin ()
+    set_category (CAT_VIDEO)
+    set_subcategory (SUBCAT_VIDEO_VOUT)
 #if defined (USE_OPENGL_ES2)
 # define API VLC_OPENGL_ES2
 # define MODULE_VARNAME "gles2"
@@ -62,8 +64,6 @@ vlc_module_begin ()
 # define MODULE_VARNAME "gl"
     set_shortname (N_("OpenGL"))
     set_description (N_("OpenGL video output"))
-    set_category (CAT_VIDEO)
-    set_subcategory (SUBCAT_VIDEO_VOUT)
     set_callback_display(Open, 270)
     add_shortcut ("opengl", "gl")
     add_module("gl", "opengl", NULL, GL_TEXT, PROVIDER_LONGTEXT)



More information about the vlc-devel mailing list