opencv/modules/gapi/src/streaming/onevpl/cfg_params_parser.hpp
Sergey Ivanov 5c91f5b71d
Merge pull request #21049 from sivanov-work:vpl_dx11_merge
G-API: oneVPL merge DX11 acceleration

* Merge DX11 initial

* Fold conditions row in MACRO in utils

* Inject DeviceSelector

* Turn on DeviceSelector in DX11

* Change sharedLock logic & Move FMT checking in FrameAdapter c-tor

* Move out NumSuggestFrame to configure params

* Drain file source fix

* Fix compilation

* Force zero initializetion of SharedLock

* Fix some compiler warnings

* Fix integer comparison warnings

* Fix integers in sample

* Integrate Demux

* Fix compilation

* Add predefined names for some CfgParam

* Trigger CI

* Fix MultithreadCtx bug, Add Dx11 GetBlobParam(), Get rif of ATL CComPtr

* Fix UT: remove unit test with deprecated video from opencv_extra

* Add creators for most usable CfgParam

* Eliminate some warnings

* Fix warning in GAPI_Assert

* Apply comments

* Add VPL wrapped header with MSVC pragma to get rid of global warning masking
2021-12-08 07:09:33 +00:00

43 lines
1.1 KiB
C++

// This file is part of OpenCV project.
// It is subject to the license terms in the LICENSE file found in the top-level directory
// of this distribution and at http://opencv.org/license.html.
//
// Copyright (C) 2021 Intel Corporation
#ifndef GAPI_STREAMING_ONEVPL_CFG_PARAM_PARSER_HPP
#define GAPI_STREAMING_ONEVPL_CFG_PARAM_PARSER_HPP
#ifdef HAVE_ONEVPL
#include "streaming/onevpl/onevpl_export.hpp"
#include <map>
#include <string>
#include <opencv2/gapi/streaming/onevpl/source.hpp>
namespace cv {
namespace gapi {
namespace wip {
namespace onevpl {
template<typename ValueType>
std::vector<ValueType> get_params_from_string(const std::string& str);
template <typename ReturnType>
struct ParamCreator {
template<typename ValueType>
ReturnType create(const std::string& name, ValueType&& value, bool is_major = false);
};
mfxVariant cfg_param_to_mfx_variant(const CfgParam& value);
size_t strtoull_or_throw(const char* str);
int64_t strtoll_or_throw(const char* str);
} // namespace onevpl
} // namespace wip
} // namespace gapi
} // namespace cv
#endif // HAVE_ONEVPL
#endif // GAPI_STREAMING_ONEVPL_CFG_PARAM_PARSER_HPP