From f813a2813e35e5112c13d5b7f6ec8fcb28472b8d Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 18 May 2023 14:23:49 +0530 Subject: [PATCH] meson: Support building qml6glsink on win32 Part-of: --- subprojects/gst-plugins-good/ext/qt6/gstqt6glutility.cc | 2 -- subprojects/gst-plugins-good/ext/qt6/meson.build | 16 +++++++++++++++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/subprojects/gst-plugins-good/ext/qt6/gstqt6glutility.cc b/subprojects/gst-plugins-good/ext/qt6/gstqt6glutility.cc index 11daec3..6e2105b 100644 --- a/subprojects/gst-plugins-good/ext/qt6/gstqt6glutility.cc +++ b/subprojects/gst-plugins-good/ext/qt6/gstqt6glutility.cc @@ -254,7 +254,6 @@ gst_qml6_get_gl_wrapcontext (GstGLDisplay * display, gst_gl_display_filter_gl_api (display, gst_gl_context_get_gl_api (*wrap_glcontext)); gst_gl_context_activate (*wrap_glcontext, FALSE); } -#if 0 #if GST_GL_HAVE_WINDOW_WIN32 && GST_GL_HAVE_PLATFORM_WGL && defined (HAVE_QT_WIN32) g_return_val_if_fail (context != NULL, FALSE); @@ -289,7 +288,6 @@ gst_qml6_get_gl_wrapcontext (GstGLDisplay * display, } G_STMT_END; #endif -#endif return TRUE; } #if 0 diff --git a/subprojects/gst-plugins-good/ext/qt6/meson.build b/subprojects/gst-plugins-good/ext/qt6/meson.build index 74a405f..cb1f51d 100644 --- a/subprojects/gst-plugins-good/ext/qt6/meson.build +++ b/subprojects/gst-plugins-good/ext/qt6/meson.build @@ -105,7 +105,21 @@ endif # TODO: Android windowing -# TODO: Win32 windowing +# Win32 windowing +if host_system == 'windows' + qt6_win32 = qt6_option \ + .require(gst_gl_have_window_win32, error_message: 'win32 windowing support in gstreamer-gl is required') \ + .require(gst_gl_have_platform_wgl, error_message: 'wgl platform support in gstreamer-gl is required') + if qt6_win32.allowed() + # for wglMakeCurrent() + opengl32_dep = cc.find_library('opengl32', required : qt6_win32) + if opengl32_dep.found() + qt_defines += ['-DHAVE_QT_WIN32'] + optional_deps += opengl32_dep + have_qt_windowing = true + endif + endif +endif # macOS windowing if host_system == 'darwin' -- 2.7.4