G-API: oneVPL (simplification) Add data adapter & Cfg params#20570
G-API: oneVPL (simplification) Add data adapter & Cfg params#20570alalek merged 15 commits intoopencv:masterfrom
Conversation
|
Simple question - is a machine in OpenCV buildbot with Harder question - I doubt if file source and configs are the right thing for this step - the source itself doesn't work isn't it? |
I found a comment from @alalek about possibility for introducing oneAPI in next 2-3 weeks Looks like it' might be answer and looks like my further PRs code would be inactivated until this time @alalek could you confirm or reject please? |
modules/gapi/include/opencv2/gapi/streaming/onevpl/onevpl_cfg_params.hpp
Outdated
Show resolved
Hide resolved
| void*, | ||
| std::string>; | ||
| template<typename ValueType> | ||
| static oneVPL_cfg_param create(const std::string& name, ValueType&& value, bool is_major = true) { |
There was a problem hiding this comment.
what does is_major mean? Also, I'd suggest writing doxygen comments at some early point since we always forget to add em later
modules/gapi/include/opencv2/gapi/streaming/onevpl/onevpl_cfg_params.hpp
Outdated
Show resolved
Hide resolved
modules/gapi/include/opencv2/gapi/streaming/onevpl/onevpl_cfg_params.hpp
Outdated
Show resolved
Hide resolved
| struct GAPI_EXPORTS DataProviderException : public std::exception { | ||
| virtual ~DataProviderException() {}; | ||
| }; | ||
|
|
||
| struct GAPI_EXPORTS DataProviderSystemErrorException : public DataProviderException { | ||
| DataProviderSystemErrorException(int error_code, const std::string& desription = std::string()); | ||
| virtual ~DataProviderSystemErrorException(); | ||
| virtual const char* what() const noexcept override; | ||
|
|
||
| private: | ||
| std::string reason; | ||
| }; |
There was a problem hiding this comment.
y u need a special exception type here? usually we throw a logic_error and its string argument is enough to provide reason like here.
There was a problem hiding this comment.
in recognition reason: i believe user can recognize that and make a proper decision on explicit error.
BTW it depict explicit intention during DataProvider implementation .When i saw an abstract interface i would ask myself: how i should process an unrecoverable error here: logic_error or runtime_error or bad_alloc of filesystem error? Answer is DataProviderSystemErrorException
There was a problem hiding this comment.
We don't have a project-wide exception / error-handling policy here (except the one I mentioned above), so I'm just wondering whether it is the right time to introduce / derive a new one or keep the old approach (before the one is introduced)
modules/gapi/include/opencv2/gapi/streaming/onevpl/onevpl_data_provider_interface.hpp
Outdated
Show resolved
Hide resolved
modules/gapi/include/opencv2/gapi/streaming/onevpl/onevpl_data_provider_interface.hpp
Outdated
Show resolved
Hide resolved
|
@alalek Could you please merge it? |
…pter G-API: oneVPL (simplification) Add data adapter & Cfg params * Add cfg_param & data_provider * Fix compilation after rebase * Apply some comments * Apply default ctor outside class definition comment * Apply cfg param in source * Fix compilation: add virtual dtor * Move cfg_params in regular gapi src list * Fix compilation: add export.hpp * Add errno.h * Add errno.h * Apply namespace comment * Add several Doxygen & rename cfg_param * Fix build * Update Doxygen docs for onevpl * Fix typo
this PR is the single one in series of #20469
Introduce DataProvider adapter: to read data as either FILE or stream or custom
Introduce CFG params
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.
Build configuration