NVIDIA DeepStream SDK API Reference

8.0 Release
ds3d::GuardDataLoader Class Reference

Detailed Description

GuardDataLoader is the safe access entry for abiDataLoader.

Applications can use it to make C-based APIs safer. it would manage abiRefDataLoader automatically. with that, App user do not need to refCopy_i or destroy abiRefDataLoader manually.

For example: abiRefDataLoader* rawRefLoader = creator(); GuardDataLoader guardLoader(rawRefLoader, true); // take the ownership of rawRefLoader guardLoader.setUserData(userdata, [](void*){ ...free... }); guardLoader.setErrorCallback([](ErrCode c, const char* msg){ stderr << msg; }); ErrCode c = guardLoader.start(config, path); DS_ASSERT(isGood(c)); c = guardLoader.start(config, path); // invoke abiDataLoader::start_i(...) GuardDataMap data; c = guardLoader.read(data); // invoke abiDataLoader::read_i(...) DS_ASSERT(isGood(c)); DS_ASSERT(data); ... // access data c = guardLoader.stop(); // invoke abiDataLoader::stop_i(...) guardLoader.reset(); // destroy abiRefDataLoader, when all reference // destroyed, abiDataLoader would be freed.

Definition at line 46 of file sources/includes/ds3d/common/hpp/dataloader.hpp.

Inheritance diagram for ds3d::GuardDataLoader:
Collaboration diagram for ds3d::GuardDataLoader:

Public Types

using abiRefType = abiRefT< abiDataLoader >
 
using abiRefType = abiRefT< abiDataLoader >
 

Public Member Functions

template<typename... Args>
 GuardDataLoader (Args &&... args)
 
 ~GuardDataLoader ()=default
 
std::string getOutputCaps ()
 
ErrCode readData (GuardDataMap &datamap)
 
ErrCode readDataAsync (abiOnDataCB::CppFunc dataReadyCB)
 
template<typename... Args>
 GuardDataLoader (Args &&... args)
 
 ~GuardDataLoader ()=default
 
std::string getOutputCaps ()
 
ErrCode readData (GuardDataMap &datamap)
 
ErrCode readDataAsync (abiOnDataCB::CppFunc dataReadyCB)
 
void setUserData (void *data, DelF delF)
 
void setUserData (void *data, DelF delF)
 
virtual void * getUserData () const
 
virtual void * getUserData () const
 
void setErrorCallback (abiErrorCB::CppFunc errCb)
 
void setErrorCallback (abiErrorCB::CppFunc errCb)
 
ErrCode start (const std::string &content, const std::string &path="")
 
ErrCode start (const std::string &content, const std::string &path="")
 
ErrCode flush ()
 
ErrCode flush ()
 
ErrCode stop ()
 
ErrCode stop ()
 
State state () const
 
State state () const
 
std::string getCaps (CapsPort port)
 
std::string getCaps (CapsPort port)
 
std::string getInputCaps ()
 
std::string getInputCaps ()
 
GuardTy cast ()
 
GuardTy cast ()
 
abiDataLoaderptr () const
 
abiDataLoaderptr () const
 
abiDataLoaderoperator-> () const
 
abiDataLoaderoperator-> () const
 
 operator bool () const
 
 operator bool () const
 
 operator ShrdPtr< abiDataLoader > ()
 
 operator ShrdPtr< abiDataLoader > ()
 
abiRefT< abiDataLoader > * release ()
 
abiRefT< abiDataLoader > * release ()
 
void reset (abiRefT< abiDataLoader > *abiref=nullptr)
 
void reset (abiRefT< abiDataLoader > *abiref=nullptr)
 
abiRefT< abiDataLoader > * abiRef () const
 
abiRefT< abiDataLoader > * abiRef () const
 

Member Typedef Documentation

◆ abiRefType [1/2]

◆ abiRefType [2/2]

Constructor & Destructor Documentation

◆ GuardDataLoader() [1/2]

template<typename... Args>
ds3d::GuardDataLoader::GuardDataLoader ( Args &&...  args)
inline

◆ ~GuardDataLoader() [1/2]

ds3d::GuardDataLoader::~GuardDataLoader ( )
default

◆ GuardDataLoader() [2/2]

template<typename... Args>
ds3d::GuardDataLoader::GuardDataLoader ( Args &&...  args)
inline

◆ ~GuardDataLoader() [2/2]

ds3d::GuardDataLoader::~GuardDataLoader ( )
default

Member Function Documentation

◆ abiRef() [1/2]

abiRefT< abiDataLoader > * ds3d::GuardRef< abiRefT< abiDataLoader > , >::abiRef
inlineinherited

Definition at line 269 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ abiRef() [2/2]

abiRefT< abiDataLoader > * ds3d::GuardRef< abiRefT< abiDataLoader > , >::abiRef
inlineinherited

◆ cast() [1/2]

GuardTy ds3d::GuardDataT< abiDataLoader >::cast
inlineinherited

Definition at line 356 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ cast() [2/2]

GuardTy ds3d::GuardDataT< abiDataLoader >::cast
inlineinherited

◆ flush() [1/2]

◆ flush() [2/2]

ErrCode ds3d::GuardDataProcess< abiDataLoader , >::flush
inlineinherited

◆ getCaps() [1/2]

std::string ds3d::GuardDataProcess< abiDataLoader , >::getCaps ( CapsPort  port)
inlineinherited

◆ getCaps() [2/2]

std::string ds3d::GuardDataProcess< abiDataLoader , >::getCaps ( CapsPort  port)
inlineinherited

◆ getInputCaps() [1/2]

std::string ds3d::GuardDataProcess< abiDataLoader , >::getInputCaps
inlineinherited

◆ getInputCaps() [2/2]

std::string ds3d::GuardDataProcess< abiDataLoader , >::getInputCaps
inlineinherited

◆ getOutputCaps() [1/2]

std::string ds3d::GuardDataLoader::getOutputCaps ( )
inline

◆ getOutputCaps() [2/2]

std::string ds3d::GuardDataLoader::getOutputCaps ( )
inline

◆ getUserData() [1/2]

virtual void* ds3d::GuardDataProcess< abiDataLoader , >::getUserData
inlinevirtualinherited

◆ getUserData() [2/2]

virtual void* ds3d::GuardDataProcess< abiDataLoader , >::getUserData
inlinevirtualinherited

◆ operator bool() [1/2]

ds3d::GuardDataT< abiDataLoader >::operator bool
inlineinherited

◆ operator bool() [2/2]

ds3d::GuardDataT< abiDataLoader >::operator bool
inlineinherited

Definition at line 370 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ operator ShrdPtr< abiDataLoader >() [1/2]

ds3d::GuardDataT< abiDataLoader >::operator ShrdPtr< abiDataLoader >
inlineinherited

Definition at line 372 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ operator ShrdPtr< abiDataLoader >() [2/2]

ds3d::GuardDataT< abiDataLoader >::operator ShrdPtr< abiDataLoader >
inlineinherited

◆ operator->() [1/2]

abiDataLoader * ds3d::GuardDataT< abiDataLoader >::operator->
inlineinherited

◆ operator->() [2/2]

abiDataLoader * ds3d::GuardDataT< abiDataLoader >::operator->
inlineinherited

Definition at line 368 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ ptr() [1/2]

abiDataLoader * ds3d::GuardDataT< abiDataLoader >::ptr
inlineinherited

Definition at line 361 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ ptr() [2/2]

abiDataLoader * ds3d::GuardDataT< abiDataLoader >::ptr
inlineinherited

◆ readData() [1/2]

◆ readData() [2/2]

◆ readDataAsync() [1/2]

◆ readDataAsync() [2/2]

◆ release() [1/2]

abiRefT< abiDataLoader > * ds3d::GuardRef< abiRefT< abiDataLoader > , >::release
inlineinherited

◆ release() [2/2]

abiRefT< abiDataLoader > * ds3d::GuardRef< abiRefT< abiDataLoader > , >::release
inlineinherited

Definition at line 253 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ reset() [1/2]

void ds3d::GuardRef< abiRefT< abiDataLoader > , >::reset ( abiRefT< abiDataLoader > *  abiref = nullptr)
inlineinherited

Definition at line 260 of file sources/includes/ds3d/common/hpp/obj.hpp.

◆ reset() [2/2]

void ds3d::GuardRef< abiRefT< abiDataLoader > , >::reset ( abiRefT< abiDataLoader > *  abiref = nullptr)
inlineinherited

◆ setErrorCallback() [1/2]

void ds3d::GuardDataProcess< abiDataLoader , >::setErrorCallback ( abiErrorCB::CppFunc  errCb)
inlineinherited

◆ setErrorCallback() [2/2]

void ds3d::GuardDataProcess< abiDataLoader , >::setErrorCallback ( abiErrorCB::CppFunc  errCb)
inlineinherited

◆ setUserData() [1/2]

void ds3d::GuardDataProcess< abiDataLoader , >::setUserData ( void *  data,
DelF  delF 
)
inlineinherited

◆ setUserData() [2/2]

void ds3d::GuardDataProcess< abiDataLoader , >::setUserData ( void *  data,
DelF  delF 
)
inlineinherited

◆ start() [1/2]

ErrCode ds3d::GuardDataProcess< abiDataLoader , >::start ( const std::string &  content,
const std::string &  path = "" 
)
inlineinherited

◆ start() [2/2]

ErrCode ds3d::GuardDataProcess< abiDataLoader , >::start ( const std::string &  content,
const std::string &  path = "" 
)
inlineinherited

◆ state() [1/2]

◆ state() [2/2]

State ds3d::GuardDataProcess< abiDataLoader , >::state
inlineinherited

◆ stop() [1/2]

◆ stop() [2/2]


The documentation for this class was generated from the following file: