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.


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 333 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inherited |
Definition at line 333 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inline |
Definition at line 52 of file sources/includes/ds3d/common/hpp/dataloader.hpp.
|
default |
|
inline |
Definition at line 52 of file 9.0/sources/includes/ds3d/common/hpp/dataloader.hpp.
|
default |
|
inlineinherited |
Definition at line 269 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 269 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 356 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 356 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 76 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 76 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 94 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 94 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 101 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 101 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inline |
Definition at line 57 of file 9.0/sources/includes/ds3d/common/hpp/dataloader.hpp.
References ds3d::cppString(), DS_ASSERT, ds3d::kOutput, and ds3d::GuardDataT< abiDataLoader >::ptr().
|
inline |
Definition at line 57 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 55 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlinevirtualinherited |
Definition at line 55 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 370 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 370 of file 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 372 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 368 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 368 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 361 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 361 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inline |
Definition at line 63 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 63 of file 9.0/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 72 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 72 of file 9.0/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 253 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 253 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 260 of file sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 260 of file 9.0/sources/includes/ds3d/common/hpp/obj.hpp.
|
inlineinherited |
Definition at line 62 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 62 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 44 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 44 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 70 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 70 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 88 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 88 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 82 of file 9.0/sources/includes/ds3d/common/hpp/dataprocess.hpp.
|
inlineinherited |
Definition at line 82 of file sources/includes/ds3d/common/hpp/dataprocess.hpp.