NVIDIA DeepStream SDK API Reference

6.4 Release
ds3d::GuardDataRender Class Reference

Detailed Description

GuardDataRender is the safe access entry for abiDataRender.

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

For example: abiRefDataRender* rawRefRender = createRender(); GuardDataRender guardRender(rawRefRender, true); // take the ownership of rawRefRender guardRender.setUserData(userdata, [](void*){ ...free... }); guardRender.setErrorCallback([](ErrCode c, const char* msg){ stderr << msg; }); ErrCode c = guardRender.start(config, path); DS_ASSERT(isGood(c)); c = guardRender.start(config, path); // invoke abiDataRender::start_i(...) GuardDataMap data = ...; c = guardRender.preroll(data); // invoke abiDataRender::preroll_i(...) DS_ASSERT(isGood(c)); // invoke abiDataRender::render_i(...) c = guardRender.render(data, [](ErrCode c, const abiRefDataMap* d){ GuardDataMap doneData(*d); // check ErrCode and data. }); DS_ASSERT(isGood(c)); c = guardRender.flush(); // flush all data in queue c = guardRender.stop(); // invoke abiDataRender::stop_i(...) guardRender.reset(); // destroy abiRefDataRender, when all reference // destroyed, abiDataRender would be freed.

Definition at line 53 of file datarender.hpp.

Inheritance diagram for ds3d::GuardDataRender:
Collaboration diagram for ds3d::GuardDataRender:

Public Types

using abiRefType = abiRefT< abiDataRender >
 

Public Member Functions

template<typename... Args>
 GuardDataRender (Args &&... args)
 
 ~GuardDataRender ()=default
 
ErrCode preroll (GuardDataMap datamap)
 
ErrCode render (GuardDataMap datamap, abiOnDataCB::CppFunc dataDoneCB)
 
GuardWindow getWindow () const
 
void setUserData (void *data, DelF delF)
 
virtual void * getUserData () const
 
void setErrorCallback (abiErrorCB::CppFunc errCb)
 
ErrCode start (const std::string &content, const std::string &path="")
 
ErrCode flush ()
 
ErrCode stop ()
 
State state () const
 
std::string getCaps (CapsPort port)
 
std::string getOutputCaps ()
 
std::string getInputCaps ()
 
GuardTy cast ()
 
abiDataRenderptr () const
 
abiDataRenderoperator-> () const
 
 operator bool () const
 
 operator ShrdPtr< abiDataRender > ()
 
abiRefT< abiDataRender > * release ()
 
void reset (abiRefT< abiDataRender > *abiref=nullptr)
 
abiRefT< abiDataRender > * abiRef () const
 

Member Typedef Documentation

◆ abiRefType

Definition at line 333 of file obj.hpp.

Constructor & Destructor Documentation

◆ GuardDataRender()

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

Definition at line 58 of file datarender.hpp.

◆ ~GuardDataRender()

ds3d::GuardDataRender::~GuardDataRender ( )
default

Member Function Documentation

◆ abiRef()

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

Definition at line 269 of file obj.hpp.

◆ cast()

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

Definition at line 356 of file obj.hpp.

◆ flush()

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

Definition at line 76 of file dataprocess.hpp.

◆ getCaps()

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

Definition at line 94 of file dataprocess.hpp.

◆ getInputCaps()

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

Definition at line 101 of file dataprocess.hpp.

◆ getOutputCaps()

std::string ds3d::GuardDataProcess< abiDataRender , >::getOutputCaps
inlineinherited

Definition at line 100 of file dataprocess.hpp.

◆ getUserData()

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

Definition at line 55 of file dataprocess.hpp.

◆ getWindow()

GuardWindow ds3d::GuardDataRender::getWindow ( ) const
inline

◆ operator bool()

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

Definition at line 370 of file obj.hpp.

◆ operator ShrdPtr< abiDataRender >()

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

Definition at line 372 of file obj.hpp.

◆ operator->()

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

Definition at line 368 of file obj.hpp.

◆ preroll()

ErrCode ds3d::GuardDataRender::preroll ( GuardDataMap  datamap)
inline

◆ ptr()

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

Definition at line 361 of file obj.hpp.

◆ release()

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

Definition at line 253 of file obj.hpp.

◆ render()

◆ reset()

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

Definition at line 260 of file obj.hpp.

◆ setErrorCallback()

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

Definition at line 62 of file dataprocess.hpp.

◆ setUserData()

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

Definition at line 44 of file dataprocess.hpp.

◆ start()

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

Definition at line 70 of file dataprocess.hpp.

◆ state()

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

Definition at line 88 of file dataprocess.hpp.

◆ stop()

ErrCode ds3d::GuardDataProcess< abiDataRender , >::stop
inlineinherited

Definition at line 82 of file dataprocess.hpp.


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