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 50 of file sources/includes/ds3d/common/hpp/dataloader.hpp.


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 () |
| abiDataLoader * | ptr () const |
| abiDataLoader * | ptr () const |
| abiDataLoader * | operator-> () const |
| abiDataLoader * | operator-> () 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 |
|
inherited |
Definition at line 337 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inherited |
Definition at line 337 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inline |
Definition at line 56 of file sources/includes/ds3d/common/hpp/dataloader.hpp.
|
default |
|
inline |
Definition at line 56 of file 9.1/sources/includes/ds3d/common/hpp/dataloader.hpp.
|
default |
|
inlineinherited |
Definition at line 273 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 273 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 360 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 360 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 80 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 80 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 98 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 98 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 105 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 105 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inline |
Definition at line 61 of file 9.1/sources/includes/ds3d/common/hpp/dataloader.hpp.
References ds3d::cppString(), DS_ASSERT, ds3d::kOutput, and ds3d::GuardDataT< abiDataLoader >::ptr().
|
inline |
Definition at line 61 of file sources/includes/ds3d/common/hpp/dataloader.hpp.
References ds3d::cppString(), DS_ASSERT, ds3d::kOutput, and ds3d::GuardDataT< abiDataLoader >::ptr().
Referenced by ds3d::gst::NvDs3D_CreateDataLoaderSrc().
|
inlinevirtualinherited |
Definition at line 59 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlinevirtualinherited |
Definition at line 59 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 374 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 374 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 376 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 376 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 372 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 372 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 365 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 365 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inline |
Definition at line 67 of file sources/includes/ds3d/common/hpp/dataloader.hpp.
References DS_ASSERT, ds3d::GuardDataT< abiDataLoader >::ptr(), ds3d::abiDataLoader::readData_i(), and ds3d::GuardRef< ref, >::reset().
|
inline |
Definition at line 67 of file 9.1/sources/includes/ds3d/common/hpp/dataloader.hpp.
References DS_ASSERT, ds3d::GuardDataT< abiDataLoader >::ptr(), ds3d::abiDataLoader::readData_i(), and ds3d::GuardRef< ref, >::reset().
|
inline |
Definition at line 76 of file sources/includes/ds3d/common/hpp/dataloader.hpp.
References ds3d::GuardRef< abiCB >::abiRef(), DS_ASSERT, ds3d::GuardDataT< abiDataLoader >::ptr(), ds3d::abiDataLoader::readDataAsync_i(), and ds3d::GuardCB< abiCB >::setFn().
|
inline |
Definition at line 76 of file 9.1/sources/includes/ds3d/common/hpp/dataloader.hpp.
References ds3d::GuardRef< abiCB >::abiRef(), DS_ASSERT, ds3d::GuardDataT< abiDataLoader >::ptr(), ds3d::abiDataLoader::readDataAsync_i(), and ds3d::GuardCB< abiCB >::setFn().
|
inlineinherited |
Definition at line 257 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 257 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 264 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 264 of file 9.1/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 66 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 66 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 48 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 48 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 74 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 74 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 92 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 92 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 86 of file 9.1/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 86 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.