2016-09-09 06:36:03 +00:00
|
|
|
gtk_sources = [
|
|
|
|
'gstgtkbasesink.c',
|
|
|
|
'gstgtksink.c',
|
|
|
|
'gstgtkutils.c',
|
|
|
|
'gstplugin.c',
|
|
|
|
'gtkgstbasewidget.c',
|
|
|
|
'gtkgstwidget.c',
|
|
|
|
]
|
|
|
|
|
|
|
|
gtk_defines = []
|
|
|
|
optional_deps = []
|
|
|
|
|
2018-07-25 02:05:28 +00:00
|
|
|
gtk_dep = dependency('gtk+-3.0', required : get_option('gtk3'))
|
2016-09-09 06:36:03 +00:00
|
|
|
if gtk_dep.found()
|
2020-05-11 23:02:01 +00:00
|
|
|
# FIXME: automagic
|
|
|
|
if have_gstgl and gtk_dep.version().version_compare('>=3.15.0')
|
2016-09-09 06:36:03 +00:00
|
|
|
have_gtk3_gl_windowing = false
|
|
|
|
|
2017-12-17 20:54:06 +00:00
|
|
|
if gst_gl_have_window_x11 and gst_gl_have_platform_glx
|
2018-07-25 02:05:28 +00:00
|
|
|
# FIXME: automagic
|
2016-09-09 06:36:03 +00:00
|
|
|
gtk_x11_dep = dependency('gtk+-x11-3.0', required : false)
|
|
|
|
if gtk_x11_dep.found()
|
2020-07-24 06:58:34 +00:00
|
|
|
optional_deps += [gtk_x11_dep, gstglx11_dep]
|
2016-09-09 06:36:03 +00:00
|
|
|
have_gtk3_gl_windowing = true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
2017-12-17 20:54:06 +00:00
|
|
|
if gst_gl_have_window_wayland and gst_gl_have_platform_egl
|
2018-07-25 02:05:28 +00:00
|
|
|
# FIXME: automagic
|
2016-09-09 06:36:03 +00:00
|
|
|
gtk_wayland_dep = dependency('gtk+-wayland-3.0', required : false)
|
|
|
|
if gtk_wayland_dep.found()
|
2020-07-24 06:58:34 +00:00
|
|
|
optional_deps += [gtk_wayland_dep, gstglegl_dep, gstglwayland_dep]
|
2016-09-09 06:36:03 +00:00
|
|
|
have_gtk3_gl_windowing = true
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
if have_gtk3_gl_windowing
|
|
|
|
gtk_sources += [
|
|
|
|
'gstgtkglsink.c',
|
|
|
|
'gtkgstglwidget.c',
|
|
|
|
]
|
2020-07-24 06:58:34 +00:00
|
|
|
optional_deps += [gstgl_dep, gstglproto_dep]
|
2016-09-09 06:36:03 +00:00
|
|
|
gtk_defines += ['-DGST_USE_UNSTABLE_API', '-DHAVE_GTK3_GL']
|
|
|
|
endif
|
|
|
|
endif
|
|
|
|
|
|
|
|
gstgtk = library('gstgtk',
|
|
|
|
gtk_sources,
|
2018-02-12 11:02:12 +00:00
|
|
|
c_args : gst_plugins_good_args + gtk_defines,
|
2016-09-09 06:36:03 +00:00
|
|
|
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,
|
|
|
|
)
|
2018-04-24 18:06:10 +00:00
|
|
|
pkgconfig.generate(gstgtk, install_dir : plugins_pkgconfig_install_dir)
|
2019-05-29 09:58:40 +00:00
|
|
|
plugins += [gstgtk]
|
2016-09-09 06:36:03 +00:00
|
|
|
endif
|
|
|
|
|