return bLowLatency;
}
+#include <gst/gst.h>
+
bool ConfigCtxVPL::ParseDeviceIDx86(mfxChar *cDeviceID, mfxU32 &deviceID, mfxU32 &adapterIdx) {
std::string strDevID(cDeviceID);
+ // XXX: std::regex is crashing on Windows + gcc
+#if 0
std::regex reDevIDAll("[0-9a-fA-F]+/[0-9]+");
std::regex reDevIDMin("[0-9a-fA-F]+");
+#else
+ static const gchar *reDevIDAll = "[0-9a-fA-F]+/[0-9]+";
+ static const gchar *reDevIDMin = "[0-9a-fA-F]+";
+
+ if (!cDeviceID)
+ return false;
+#endif
deviceID = DEVICE_ID_UNKNOWN;
adapterIdx = ADAPTER_IDX_UNKNOWN;
bool bHasAdapterIdx = false;
+#if 0
if (std::regex_match(strDevID, reDevIDAll)) {
// check for DeviceID in format "devID/adapterIdx"
// devID = hex value
// invalid format
return false;
}
+#else
+ if (g_regex_match_simple(reDevIDAll, cDeviceID,
+ (GRegexCompileFlags)0, (GRegexMatchFlags)0)) {
+ // check for DeviceID in format "devID/adapterIdx"
+ // devID = hex value
+ // adapterIdx = decimal integer
+ bHasAdapterIdx = true;
+ }
+ else if (g_regex_match_simple(reDevIDMin, cDeviceID,
+ (GRegexCompileFlags)0, (GRegexMatchFlags)0)) {
+ // check for DeviceID in format "devID"
+ // (no adpaterIdx)
+ bHasAdapterIdx = false;
+ }
+ else {
+ // invalid format
+ return false;
+ }
+#endif
// get deviceID (value before the slash, if present)
try {
libmfx_sources,
c_args : libmfx_extra_args,
cpp_args : libmfx_extra_args,
- dependencies : libmfx_extra_deps,
+ dependencies : libmfx_extra_deps + [gst_dep],
include_directories : libmfx_incl,
override_options: ['werror=false'],
)
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')