18 #ifndef __NVDSCUSTOMLIB_FACTORY_HPP__
19 #define __NVDSCUSTOMLIB_FACTORY_HPP__
31 return reinterpret_cast<T*
>(dlsym(handle, name));
61 createAlgoCtx = dlsym_ptr<IDSCustomLibrary*(GObject*)>(
m_libHandle,
"CreateCustomAlgoCtx");
64 throw std::runtime_error(
"createCustomAlgoCtx function not found in library");
69 throw std::runtime_error(dlerror());
72 return createAlgoCtx ? createAlgoCtx(
object) :
nullptr;