[gtk/wip.win32.fixes: 76/79] Revert "media: Check for gstreamer verion instead of using cc.links()"




commit b93dd2fb7f62aedd18b9b47f57a1d6a20ac8b5e0
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Mon Sep 6 12:00:10 2021 +0800

    Revert "media: Check for gstreamer verion instead of using cc.links()"
    
    Revert temporarily until gstreamer 1.20 is released.
    
    This reverts commit 2c060663cf0821de8b75b7a48ea46e66d4243777.

 modules/media/meson.build | 14 +++++++++++---
 1 file changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/modules/media/meson.build b/modules/media/meson.build
index d24f84dd86..1bd91821d8 100644
--- a/modules/media/meson.build
+++ b/modules/media/meson.build
@@ -49,9 +49,17 @@ gstgl_dep = dependency('gstreamer-gl-1.0', version: '>= 1.12.3',
 if gstplayer_dep.found() and gstgl_dep.found()
   extra_win_cflags = []
 
-  if host_machine.system() == 'windows' and gstgl_dep.version().version_compare('>=1.19.1')
-    message('libgstgl has gst_gl_display_new_with_type()')
-    extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE'
+  if host_machine.system() == 'windows'
+    new_gst_gl_display_code = \
+                '''#include <gst/gl/gstgldisplay.h>
+                   int main (int a, char ** g) {
+                     GstGLDisplay *d = gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_WIN32);
+                     return 0;
+                   }'''
+    if cc.links(new_gst_gl_display_code, dependencies : gstgl_dep)
+      message('libgstgl has gst_gl_display_new_with_type()')
+      extra_win_cflags += '-DHAVE_GST_GL_DISPLAY_NEW_WITH_TYPE'
+    endif
   endif
 
   media_backends += 'gstreamer'


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]