13 #ifndef __NVDSCUSTOMLIB_FACTORY_HPP__
14 #define __NVDSCUSTOMLIB_FACTORY_HPP__
26 return reinterpret_cast<T*
>(dlsym(handle, name));
56 createAlgoCtx = dlsym_ptr<IDSCustomLibrary*(GObject*)>(
m_libHandle,
"CreateCustomAlgoCtx");
59 throw std::runtime_error(
"createCustomAlgoCtx function not found in library");
64 throw std::runtime_error(dlerror());
67 return createAlgoCtx ? createAlgoCtx(
object) :
nullptr;