Merge pull request #21230 from sivanov-work:gapi_win32_vpl_fix

G-API: Fix Win32 build: uint64_t ->size_t

* Fix Win32 build: uint64_t ->size_t

* Fix for MAC
pull/21238/head
Sergey Ivanov 3 years ago committed by GitHub
parent 9bcb006ec7
commit b70370f3fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/gapi/include/opencv2/gapi/streaming/onevpl/cfg_params.hpp
  2. 4
      modules/gapi/samples/onevpl_infer_single_roi.cpp
  3. 8
      modules/gapi/src/streaming/onevpl/cfg_params.cpp

@ -61,7 +61,7 @@ struct GAPI_EXPORTS CfgParam {
*
*/
static constexpr const char *frames_pool_size_name() { return "frames_pool_size"; }
static CfgParam create_frames_pool_size(uint64_t value);
static CfgParam create_frames_pool_size(size_t value);
/**
* @brief acceleration_mode_name

@ -196,8 +196,8 @@ int main(int argc, char *argv[]) {
std::string file_path = cmd.get<std::string>("input");
const std::string output = cmd.get<std::string>("output");
const auto face_model_path = cmd.get<std::string>("facem");
const auto streaming_queue_capacity = cmd.get<uint64_t>("streaming_queue_capacity");
const auto source_queue_capacity = cmd.get<uint64_t>("frames_pool_size");
const auto streaming_queue_capacity = cmd.get<uint32_t>("streaming_queue_capacity");
const auto source_queue_capacity = cmd.get<uint32_t>("frames_pool_size");
// check ouput file extension
if (!output.empty()) {

@ -86,8 +86,12 @@ CfgParam::CfgParam (const std::string& param_name, value_t&& param_value, bool i
CfgParam::~CfgParam() = default;
CfgParam CfgParam::create_frames_pool_size(uint64_t value) {
return CfgParam::create(CfgParam::frames_pool_size_name(), value, false);
CfgParam CfgParam::create_frames_pool_size(size_t value) {
// NB: cast to uint64_t because CfgParam inner variant works over
// uint64_t instead of size_t and mirrored VPL types variety
// but size_t looks more friendly for C++ high-level development
return CfgParam::create(CfgParam::frames_pool_size_name(),
static_cast<uint64_t>(value), false);
}
CfgParam CfgParam::create_acceleration_mode(uint32_t value) {

Loading…
Cancel
Save