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