NVIDIA DeepStream SDK API Reference

6.4 Release
Ds3dAppContext Class Referenceabstract

Detailed Description

Definition at line 35 of file deepstream_can_context_priv.hpp.

Inheritance diagram for Ds3dAppContext:
Collaboration diagram for Ds3dAppContext:

Public Member Functions

 Ds3dAppContext ()
 
virtual ~Ds3dAppContext ()
 
void setMainloop (GMainLoop *loop)
 
ErrCode init (const std::string &name)
 
Ds3dAppContextadd (const gst::ElePtr &ele)
 
ErrCode play ()
 
virtual ErrCode stop ()
 
bool isRunning (size_t timeout=0)
 
void quitMainLoop ()
 
void waitLoopQuit ()
 
void runMainLoop (std::function< void()> loopQuitCb)
 
virtual void deinit ()
 
ErrCode sendEOS ()
 
GstPipeline * pipeline () const
 
GstBus * bus () const
 
GMainLoop * mainLoop () const
 

Protected Member Functions

ErrCode setPipelineState (GstState state)
 
ErrCode setState (GstElement *ele, GstState state)
 
ErrCode getState (GstElement *ele, GstState *state, GstState *pending=nullptr, size_t timeout=0)
 
std::mutex & mutex () const
 
 DS3D_DISABLE_CLASS_COPY (Ds3dAppContext)
 

Static Protected Member Functions

static gboolean sBusCall (GstBus *bus, GstMessage *msg, gpointer data)
 

Protected Attributes

gst::ElePtr _pipeline
 
gst::BusPtr _bus
 
uint32_t _busWatchId = 0
 
std::vector< gst::ElePtr_elementList
 
ds3d::UniqPtr< GMainLoop > _mainLoop {nullptr, g_main_loop_unref}
 
bool _eosAutoQuit = false
 
std::unique_ptr< std::thread > _mainLoopThread
 
bool _mainStopped = false
 
bool _eosReceived = false
 
std::mutex _streamMutex
 
std::condition_variable _stoppedCond
 
bool _isdGPU = true
 

Constructor & Destructor Documentation

◆ Ds3dAppContext()

Ds3dAppContext::Ds3dAppContext ( )
inline

Definition at line 37 of file deepstream_can_context_priv.hpp.

◆ ~Ds3dAppContext()

virtual Ds3dAppContext::~Ds3dAppContext ( )
inlinevirtual

Definition at line 38 of file deepstream_can_context_priv.hpp.

References deinit().

Member Function Documentation

◆ add()

◆ bus()

GstBus* Ds3dAppContext::bus ( ) const
inline

Definition at line 193 of file deepstream_can_context_priv.hpp.

References _bus, and ds3d::gst::GstPtr< GstObjT, ObjFunc >::get().

Referenced by deinit(), init(), and sBusCall().

◆ deinit()

virtual void Ds3dAppContext::deinit ( )
inlinevirtual

◆ DS3D_DISABLE_CLASS_COPY()

Ds3dAppContext::DS3D_DISABLE_CLASS_COPY ( Ds3dAppContext  )
protected

◆ getState()

ErrCode Ds3dAppContext::getState ( GstElement *  ele,
GstState *  state,
GstState *  pending = nullptr,
size_t  timeout = 0 
)
inlineprotected

Definition at line 217 of file deepstream_can_context_priv.hpp.

References DS_ASSERT.

Referenced by stop().

◆ init()

◆ isRunning()

bool Ds3dAppContext::isRunning ( size_t  timeout = 0)
inline

◆ mainLoop()

GMainLoop* Ds3dAppContext::mainLoop ( ) const
inline

Definition at line 194 of file deepstream_can_context_priv.hpp.

References _mainLoop.

Referenced by isRunning(), quitMainLoop(), runMainLoop(), and waitLoopQuit().

◆ mutex()

std::mutex& Ds3dAppContext::mutex ( ) const
inlineprotected

Definition at line 242 of file deepstream_can_context_priv.hpp.

References _streamMutex.

Referenced by isRunning(), play(), quitMainLoop(), runMainLoop(), and waitLoopQuit().

◆ pipeline()

GstPipeline* Ds3dAppContext::pipeline ( ) const
inline

◆ play()

ErrCode Ds3dAppContext::play ( )
inline

◆ quitMainLoop()

void Ds3dAppContext::quitMainLoop ( )
inline

Definition at line 133 of file deepstream_can_context_priv.hpp.

References mainLoop(), and mutex().

◆ runMainLoop()

void Ds3dAppContext::runMainLoop ( std::function< void()>  loopQuitCb)
inline

◆ sBusCall()

static gboolean Ds3dAppContext::sBusCall ( GstBus *  bus,
GstMessage *  msg,
gpointer  data 
)
inlinestaticprotected

Definition at line 235 of file deepstream_can_context_priv.hpp.

References bus(), and DS_ASSERT.

Referenced by init().

◆ sendEOS()

ErrCode Ds3dAppContext::sendEOS ( )
inline

Definition at line 184 of file deepstream_can_context_priv.hpp.

References DS3D_FAILED_RETURN, and pipeline().

◆ setMainloop()

void Ds3dAppContext::setMainloop ( GMainLoop *  loop)
inline

Definition at line 40 of file deepstream_can_context_priv.hpp.

References _mainLoop.

◆ setPipelineState()

ErrCode Ds3dAppContext::setPipelineState ( GstState  state)
inlineprotected

◆ setState()

ErrCode Ds3dAppContext::setState ( GstElement *  ele,
GstState  state 
)
inlineprotected

Definition at line 207 of file deepstream_can_context_priv.hpp.

References DS3D_FAILED_RETURN, and DS_ASSERT.

Referenced by setPipelineState(), and stop().

◆ stop()

virtual ErrCode Ds3dAppContext::stop ( )
inlinevirtual

◆ waitLoopQuit()

void Ds3dAppContext::waitLoopQuit ( )
inline

Field Documentation

◆ _bus

gst::BusPtr Ds3dAppContext::_bus
protected

Definition at line 246 of file deepstream_can_context_priv.hpp.

Referenced by bus(), deinit(), and init().

◆ _busWatchId

uint32_t Ds3dAppContext::_busWatchId = 0
protected

Definition at line 247 of file deepstream_can_context_priv.hpp.

Referenced by init().

◆ _elementList

std::vector<gst::ElePtr> Ds3dAppContext::_elementList
protected

Definition at line 248 of file deepstream_can_context_priv.hpp.

Referenced by add(), deinit(), and stop().

◆ _eosAutoQuit

bool Ds3dAppContext::_eosAutoQuit = false
protected

Definition at line 250 of file deepstream_can_context_priv.hpp.

◆ _eosReceived

bool Ds3dAppContext::_eosReceived = false
protected

Definition at line 253 of file deepstream_can_context_priv.hpp.

Referenced by isRunning(), and play().

◆ _isdGPU

bool Ds3dAppContext::_isdGPU = true
protected

Definition at line 256 of file deepstream_can_context_priv.hpp.

Referenced by init().

◆ _mainLoop

ds3d::UniqPtr<GMainLoop> Ds3dAppContext::_mainLoop {nullptr, g_main_loop_unref}
protected

Definition at line 249 of file deepstream_can_context_priv.hpp.

Referenced by deinit(), init(), mainLoop(), and setMainloop().

◆ _mainLoopThread

std::unique_ptr<std::thread> Ds3dAppContext::_mainLoopThread
protected

Definition at line 251 of file deepstream_can_context_priv.hpp.

Referenced by runMainLoop(), and waitLoopQuit().

◆ _mainStopped

bool Ds3dAppContext::_mainStopped = false
protected

Definition at line 252 of file deepstream_can_context_priv.hpp.

Referenced by isRunning(), runMainLoop(), and waitLoopQuit().

◆ _pipeline

gst::ElePtr Ds3dAppContext::_pipeline
protected

Definition at line 245 of file deepstream_can_context_priv.hpp.

Referenced by add(), deinit(), init(), pipeline(), play(), setPipelineState(), and stop().

◆ _stoppedCond

std::condition_variable Ds3dAppContext::_stoppedCond
protected

Definition at line 255 of file deepstream_can_context_priv.hpp.

Referenced by runMainLoop(), and waitLoopQuit().

◆ _streamMutex

std::mutex Ds3dAppContext::_streamMutex
mutableprotected

Definition at line 254 of file deepstream_can_context_priv.hpp.

Referenced by mutex().


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