mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-28 19:20:35 +00:00
d024ee4303
This attempts to implement the gtkglsink element on Windows using WGL, as there were some more gotchas that are along the way, since we need to juggle with libepoxy along the way, meaning that we need a recent GTK+-3.24.x for this to work properly, i.e. the upcoming GTK+-3.24.43. Since we are essentially using an overlay compositor only during rendering, move its initialization and destruction into the gtk_gst_gl_widget_render() function, so that things are safer as we are doing things across threads between gstreamer (gst-gl) and GTK, as GL operations, as above, have more gotchas on Windows. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4289>
67 lines
1.9 KiB
Meson
67 lines
1.9 KiB
Meson
gtk_sources = [
|
|
'gstgtkbasesink.c',
|
|
'gstgtksink.c',
|
|
'gstgtkutils.c',
|
|
'gstplugin.c',
|
|
'gtkgstbasewidget.c',
|
|
'gtkgstwidget.c',
|
|
]
|
|
|
|
gtk_defines = []
|
|
optional_deps = []
|
|
|
|
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3'))
|
|
if gtk_dep.found()
|
|
# FIXME: automagic
|
|
if have_gstgl and gtk_dep.version().version_compare('>=3.15.0')
|
|
have_gtk3_gl_windowing = false
|
|
|
|
if gst_gl_have_window_x11 and gst_gl_have_platform_glx
|
|
# FIXME: automagic
|
|
gtk_x11_dep = dependency('gtk+-x11-3.0', required : false)
|
|
if gtk_x11_dep.found()
|
|
optional_deps += [gtk_x11_dep, gstglx11_dep]
|
|
have_gtk3_gl_windowing = true
|
|
endif
|
|
endif
|
|
|
|
if gst_gl_have_window_wayland and gst_gl_have_platform_egl
|
|
# FIXME: automagic
|
|
gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false)
|
|
if gtk_wayland_dep.found()
|
|
optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep]
|
|
have_gtk3_gl_windowing = true
|
|
endif
|
|
endif
|
|
|
|
if gst_gl_have_window_win32 and gst_gl_have_platform_wgl
|
|
# FIXME: automagic
|
|
gtk_win32_dep = dependency('gtk+-win32-3.0', required : false)
|
|
if gtk_win32_dep.found() and gtk_win32_dep.version().version_compare('>=3.24.43')
|
|
optional_deps += [gtk_win32_dep]
|
|
have_gtk3_gl_windowing = true
|
|
endif
|
|
endif
|
|
|
|
if have_gtk3_gl_windowing
|
|
gtk_sources += [
|
|
'gstgtkglsink.c',
|
|
'gtkgstglwidget.c',
|
|
]
|
|
optional_deps += [gstgl_dep, gstglproto_dep]
|
|
gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL']
|
|
endif
|
|
endif
|
|
|
|
gstgtk = library('gstgtk',
|
|
gtk_sources,
|
|
c_args : gst_plugins_good_args + gtk_defines,
|
|
link_args : noseh_link_args,
|
|
include_directories : [configinc],
|
|
dependencies : [gtk_dep, gstvideo_dep, gstbase_dep, libm] + optional_deps,
|
|
install : true,
|
|
install_dir : plugins_install_dir,
|
|
)
|
|
plugins += [gstgtk]
|
|
endif
|
|
|