build: Remove an old workaround

The workaround only triggered in GStreamer < 1.19.1 but we require 1.23
now.
This commit is contained in:
Benjamin Otte 2024-04-29 14:18:55 +02:00 committed by Benjamin Otte
parent ce352b5538
commit 2096a29b06
2 changed files with 1 additions and 20 deletions

View File

@ -685,20 +685,8 @@ gtk_gst_sink_initialize_gl (GtkGstSink *self)
if (gl_api & (GST_GL_API_OPENGL3 | GST_GL_API_OPENGL)) if (gl_api & (GST_GL_API_OPENGL3 | GST_GL_API_OPENGL))
{ {
#ifdef HAVE_GST_GL_DISPLAY_NEW_WITH_TYPE
self->gst_display = gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_WIN32); self->gst_display = gst_gl_display_new_with_type (GST_GL_DISPLAY_TYPE_WIN32);
#else
#if GST_GL_HAVE_PLATFORM_EGL
g_message ("If media fails to play, set the envvar `GST_DEBUG=1`, and if GstGL context creation fails");
g_message ("due to \"Couldn't create GL context: Cannot share context with non-EGL context\",");
g_message ("set in the environment `GST_GL_PLATFORM=wgl` and `GST_GL_WINDOW=win32`,");
g_message ("and restart the GTK application");
#endif
self->gst_display = gst_gl_display_new ();
#endif
} }
#if GST_GL_HAVE_PLATFORM_EGL #if GST_GL_HAVE_PLATFORM_EGL
else else
{ {

View File

@ -6,13 +6,6 @@ extra_c_args = ['-DGTK_COMPILATION']
extra_c_args += common_cflags extra_c_args += common_cflags
if gstplayer_dep.found() and gstgl_dep.found() and gstallocators_dep.found() if gstplayer_dep.found() and gstgl_dep.found() and gstallocators_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'
endif
media_backends += 'gstreamer' media_backends += 'gstreamer'
cdata.set('HAVE_GSTREAMER', 1) cdata.set('HAVE_GSTREAMER', 1)
media_gst_deps = [ libm, libgtk_dep, gstplayer_dep, gstgl_dep, gstallocators_dep ] media_gst_deps = [ libm, libgtk_dep, gstplayer_dep, gstgl_dep, gstallocators_dep ]
@ -23,7 +16,7 @@ if gstplayer_dep.found() and gstgl_dep.found() and gstallocators_dep.found()
'gtkgstpaintable.c', 'gtkgstpaintable.c',
'gtkgstsink.c', 'gtkgstsink.c',
], ],
c_args: extra_c_args + extra_win_cflags, c_args: extra_c_args,
dependencies: media_gst_deps, dependencies: media_gst_deps,
name_suffix: module_suffix, name_suffix: module_suffix,
install_dir: media_install_dir, install_dir: media_install_dir,