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
This commit is contained in:
Sergey Ivanov 2021-12-10 11:58:59 +03:00 committed by GitHub
parent 9bcb006ec7
commit b70370f3fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 5 deletions

View File

@ -61,7 +61,7 @@ struct GAPI_EXPORTS CfgParam {
* *
*/ */
static constexpr const char *frames_pool_size_name() { return "frames_pool_size"; } 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 * @brief acceleration_mode_name

View File

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

View File

@ -86,8 +86,12 @@ CfgParam::CfgParam (const std::string& param_name, value_t&& param_value, bool i
CfgParam::~CfgParam() = default; CfgParam::~CfgParam() = default;
CfgParam CfgParam::create_frames_pool_size(uint64_t value) { CfgParam CfgParam::create_frames_pool_size(size_t value) {
return CfgParam::create(CfgParam::frames_pool_size_name(), value, false); // 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) { CfgParam CfgParam::create_acceleration_mode(uint32_t value) {