mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-15 04:46:32 +00:00
7b4e1fd602
Adding Direct3D11 backend Qt6 QML videosink element, qml6d3d11sink. Implementation details are similar to the qt6 plugin in -good but there are a few notable differences. * qml6d3d11sink accepts all GstD3D11 supported video formats (e.g., NV12). * Scene graph (owned by qml6d3d11sink) will hold dedicated and sharable RGBA texture which belongs to Qt6's Direct3D11 device, instead of sharing GStreamer's own texture with Qt6. * All rendering operations will be done by using GStreamer's Direct3D11 device. Specifically, upstream texture will be copied (in case of RGBA) or converted to the above mentioned Qt6's sharable texture. Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/3707>
53 lines
1.3 KiB
Meson
53 lines
1.3 KiB
Meson
gstqt6d3d11_sources = [
|
|
'gstqml6d3d11sink.cpp',
|
|
'gstqsg6d3d11node.cpp',
|
|
'gstqt6d3d11videoitem.cpp',
|
|
'plugin.cpp',
|
|
]
|
|
|
|
moc_headers = [
|
|
'gstqsg6d3d11node.h',
|
|
'gstqt6d3d11videoitem.h'
|
|
]
|
|
|
|
have_qt6d3d11 = false
|
|
|
|
qt6_option = get_option('qt6d3d11')
|
|
if qt6_option.disabled()
|
|
subdir_done()
|
|
endif
|
|
|
|
if not gstd3d11_dep.found()
|
|
if qt6_option.enabled()
|
|
error('qt6 plugin was enabled explicitly, but required d3d11 dep was not found')
|
|
else
|
|
subdir_done()
|
|
endif
|
|
endif
|
|
|
|
qt6_mod = import('qt6')
|
|
if not qt6_mod.has_tools()
|
|
if qt6_option.enabled()
|
|
error('qt6 plugin was enabled, but qt specific tools were not found')
|
|
endif
|
|
subdir_done()
|
|
endif
|
|
|
|
qt6qml_dep = dependency('qt6', modules : ['Core', 'Gui', 'Qml', 'Quick'],
|
|
required: qt6_option)
|
|
if not qt6qml_dep.found()
|
|
subdir_done()
|
|
endif
|
|
|
|
have_qt6d3d11 = true
|
|
moc_files = qt6_mod.preprocess(moc_headers : moc_headers)
|
|
gstqt6d3d11 = library('gstqt6d3d11', gstqt6d3d11_sources, moc_files,
|
|
c_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
|
|
cpp_args : gst_plugins_bad_args + ['-DGST_USE_UNSTABLE_API'],
|
|
include_directories: [configinc, libsinc],
|
|
dependencies : [gst_dep, gstvideo_dep, gstd3d11_dep, qt6qml_dep],
|
|
override_options : ['cpp_std=c++17'],
|
|
install: true,
|
|
install_dir : plugins_install_dir
|
|
)
|
|
plugins += [gstqt6d3d11]
|