Merge pull request #22393 from TolyaTalamanov:at/fix-gapi-vpl-windows-build

* Fix G-API OneVPL compilation

* Fix macro

__WIN32__ -> _WIN32
pull/22408/head^2
Anatoliy Talamanov 2 years ago committed by GitHub
parent e14c3cff85
commit 925ff6241f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      modules/gapi/src/streaming/onevpl/cfg_param_device_selector.cpp
  2. 2
      modules/gapi/test/streaming/gapi_streaming_tests.cpp

@ -250,7 +250,7 @@ CfgParamDeviceSelector::CfgParamDeviceSelector(const CfgParams& cfg_params) :
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current linux configuration"); GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current linux configuration");
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL) #endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
#else // #ifdef __linux__ #else // #ifdef __linux__
GAPI_Assert(false && "MFX_IMPL_VIA_VAAPI is supported on linux only") GAPI_Assert(false && "MFX_IMPL_VIA_VAAPI is supported on linux only");
#endif // #ifdef __linux__ #endif // #ifdef __linux__
break; break;
} }
@ -341,7 +341,7 @@ CfgParamDeviceSelector::CfgParamDeviceSelector(Device::Ptr device_ptr,
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current linux configuration"); GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current linux configuration");
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL) #endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
#else // #ifdef __linux__ #else // #ifdef __linux__
GAPI_Assert(false && "MFX_IMPL_VIA_VAAPI is supported on linux only") GAPI_Assert(false && "MFX_IMPL_VIA_VAAPI is supported on linux only");
#endif // #ifdef __linux__ #endif // #ifdef __linux__
break; break;
} }
@ -400,7 +400,7 @@ CfgParamDeviceSelector::CfgParamDeviceSelector(const Device &device,
GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current linux configuration"); GAPI_Assert(false && "VPLVAAPIAccelerationPolicy unavailable in current linux configuration");
#endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL) #endif // defined(HAVE_VA) || defined(HAVE_VA_INTEL)
#else // #ifdef __linux__ #else // #ifdef __linux__
GAPI_Assert(false && "MFX_IMPL_VIA_VAAPI is supported on linux only") GAPI_Assert(false && "MFX_IMPL_VIA_VAAPI is supported on linux only");
#endif // #ifdef __linux__ #endif // #ifdef __linux__
break; break;
case AccelType::HOST: case AccelType::HOST:

@ -2440,7 +2440,7 @@ TEST(OneVPL_Source, Init)
std::vector<CfgParam> src_params; std::vector<CfgParam> src_params;
src_params.push_back(CfgParam::create_implementation(MFX_IMPL_TYPE_HARDWARE)); src_params.push_back(CfgParam::create_implementation(MFX_IMPL_TYPE_HARDWARE));
#ifdef __WIN32 #ifdef _WIN32
src_params.push_back(CfgParam::create_acceleration_mode(MFX_ACCEL_MODE_VIA_D3D11)); src_params.push_back(CfgParam::create_acceleration_mode(MFX_ACCEL_MODE_VIA_D3D11));
#elif defined(__linux__) #elif defined(__linux__)
src_params.push_back(CfgParam::create_acceleration_mode(MFX_ACCEL_MODE_VIA_VAAPI)); src_params.push_back(CfgParam::create_acceleration_mode(MFX_ACCEL_MODE_VIA_VAAPI));

Loading…
Cancel
Save