qsv: Disable non-MSVC build on Windows
authorSeungha Yang <seungha@centricular.com>
Mon, 16 May 2022 18:32:10 +0000 (03:32 +0900)
committerSeungha Yang <seungha@centricular.com>
Mon, 16 May 2022 18:32:10 +0000 (03:32 +0900)
... and remove pointless UWP consideration that will never work.

Cross-compiled binary has an issue which causes deadlock.
Although cerbero will not build this plugin for non-MSVC build,
people can still build this plugin and may complain its brokenness.

See also
https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/854

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2431>

subprojects/gst-plugins-bad/sys/qsv/libmfx/meson.build
subprojects/gst-plugins-bad/sys/qsv/meson.build

index db78fa8..fcb11f3 100644 (file)
@@ -1,24 +1,16 @@
-mfx_win_sources = [
+mfx_win32_sources = [
   'dispatcher/windows/main.cpp',
+  'dispatcher/windows/mfx_critical_section.cpp',
   'dispatcher/windows/mfx_dispatcher_log.cpp',
   'dispatcher/windows/mfx_dispatcher.cpp',
+  'dispatcher/windows/mfx_driver_store_loader.cpp',
   'dispatcher/windows/mfx_dxva2_device.cpp',
   'dispatcher/windows/mfx_function_table.cpp',
-  'dispatcher/windows/mfx_load_dll.cpp',
-]
-
-mfx_win32_sources = [
-  'dispatcher/windows/mfx_critical_section.cpp',
-  'dispatcher/windows/mfx_driver_store_loader.cpp',
   'dispatcher/windows/mfx_library_iterator.cpp',
+  'dispatcher/windows/mfx_load_dll.cpp',
   'dispatcher/windows/mfx_win_reg_key.cpp',
 ]
 
-mfx_uwp_sources = [
-  'dispatcher/windows/mfx_dispatcher_uwp.cpp',
-  'dispatcher/windows/mfx_driver_store_loader.cpp',
-]
-
 mfx_linux_sources = [
   'dispatcher/linux/mfxloader.cpp',
 ]
@@ -39,8 +31,6 @@ libmfx_extra_deps = []
 
 libmfx_sources = vpl_sources
 if host_system == 'windows'
-  libmfx_sources += mfx_win_sources
-  # FIXME: check UWP only
   libmfx_sources += mfx_win32_sources
 elif host_system == 'linux'
   libmfx_sources += mfx_linux_sources
index 45f4a63..b56b9a5 100644 (file)
@@ -31,6 +31,17 @@ endif
 
 qsv_platform_deps = []
 if host_system == 'windows'
+  # TODO: We can cross-compile this plugin using MinGW but there's an issue.
+  # Re-enable cross-compile once it's investigated and addressed
+  # https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/854
+  if cc.get_id() != 'msvc'
+    if qsv_option.enabled()
+      error('qsv plugin supports only MSVC build')
+    else
+      subdir_done()
+    endif
+  endif
+
   if not gstd3d11_dep.found()
     if qsv_option.enabled()
       error('The qsv was enabled explicitly, but required d3d11 was not found')