gapi(ie): replace deprecated calls
authorAlexander Alekhin <alexander.a.alekhin@gmail.com>
Thu, 1 Jul 2021 13:48:11 +0000 (13:48 +0000)
committerAlexander Alekhin <alexander.a.alekhin@gmail.com>
Thu, 1 Jul 2021 13:49:29 +0000 (13:49 +0000)
modules/gapi/src/backends/ie/giebackend/giewrapper.cpp

index ba0632d4f0f25dd810fc30bf3d8844b006e7fc0c..d4ec806e4846d92ba971bd188d52179ae2ab61d3 100644 (file)
@@ -124,7 +124,11 @@ IE::Core giewrap::getPlugin(const GIEParam& params) {
         {
             try
             {
+#if INF_ENGINE_RELEASE >= 2021040000
+                plugin.AddExtension(std::make_shared<IE::Extension>(extlib), params.device_id);
+#else
                 plugin.AddExtension(IE::make_so_pointer<IE::IExtension>(extlib), params.device_id);
+#endif
                 CV_LOG_INFO(NULL, "DNN-IE: Loaded extension plugin: " << extlib);
                 break;
             }