Definition at line 62 of file nvds3d_pipeline_context.h.
Public Member Functions | |
PipelineContext () | |
virtual | ~PipelineContext () |
void | setMainloop (GMainLoop *loop) |
void | setEosAutoQuit (bool enable) |
virtual ErrCode | init (const std::string &name) |
PipelineContext & | add (const gst::ElePtr &ele) |
virtual ErrCode | start (std::function< void()> loopQuitCb) |
virtual ErrCode | stop () |
virtual void | deinit () |
bool | isRunning (size_t timeout=0) |
void | quitMainLoop () |
void | waitLoopQuit () |
ErrCode | playPipeline () |
ErrCode | stopPipeline () |
ErrCode | runMainLoop (std::function< void()> loopQuitCb) |
ErrCode | sendEOS () |
GstPipeline * | pipeline () const |
GstBus * | bus () const |
GMainLoop * | mainLoop () const |
Static Public Member Functions | |
static gboolean | GSourceCb (gpointer user_data) |
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 (PipelineContext) | |
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 |
std::atomic_bool | _mainStopped {false} |
std::atomic_bool | _eosReceived {false} |
std::mutex | _pipelineMutex |
std::condition_variable | _StatusCond |
|
inline |
Definition at line 64 of file nvds3d_pipeline_context.h.
|
inlinevirtual |
Definition at line 65 of file nvds3d_pipeline_context.h.
References deinit().
|
inline |
Definition at line 83 of file nvds3d_pipeline_context.h.
References _elementList, _pipeline, ds3d::gst::GstPtr< GstObjT, ObjFunc >::copy(), DS3D_THROW_ERROR, DS_ASSERT, ds3d::kGst, and pipeline().
|
inline |
Definition at line 305 of file nvds3d_pipeline_context.h.
References _bus, and ds3d::gst::GstPtr< GstObjT, ObjFunc >::get().
Referenced by deinit(), init(), and sBusCall().
|
inlinevirtual |
Definition at line 120 of file nvds3d_pipeline_context.h.
References _bus, _elementList, _mainLoop, _pipeline, bus(), LOG_DEBUG, and ds3d::gst::GstPtr< GstObjT, ObjFunc >::reset().
Referenced by ~PipelineContext().
|
protected |
|
inlineprotected |
Definition at line 372 of file nvds3d_pipeline_context.h.
References DS_ASSERT, ds3d::kGood, ds3d::kGst, and ds3d::kUnknown.
Referenced by stopPipeline().
|
inlinestatic |
Definition at line 225 of file nvds3d_pipeline_context.h.
References DS_ASSERT.
Referenced by runMainLoop().
|
inlinevirtual |
Definition at line 70 of file nvds3d_pipeline_context.h.
References _bus, _busWatchId, _mainLoop, _pipeline, bus(), DS3D_FAILED_RETURN, DS_ASSERT, ds3d::kGood, ds3d::kGst, pipeline(), ds3d::gst::GstPtr< GstObjT, ObjFunc >::reset(), sBusCall(), and ds3d::gst::GstPtr< GstObjT, ObjFunc >::setName().
|
inline |
Definition at line 134 of file nvds3d_pipeline_context.h.
References _eosAutoQuit, _eosReceived, _mainStopped, mainLoop(), mutex(), and pipeline().
Referenced by stop().
|
inline |
Definition at line 306 of file nvds3d_pipeline_context.h.
References _mainLoop.
Referenced by isRunning(), quitMainLoop(), runMainLoop(), stop(), and waitLoopQuit().
|
inlineprotected |
Definition at line 397 of file nvds3d_pipeline_context.h.
References _pipelineMutex.
Referenced by isRunning(), playPipeline(), quitMainLoop(), runMainLoop(), stop(), and waitLoopQuit().
|
inline |
Definition at line 304 of file nvds3d_pipeline_context.h.
References _pipeline, and ds3d::gst::GstPtr< GstObjT, ObjFunc >::get().
Referenced by add(), init(), isRunning(), and sendEOS().
|
inline |
Definition at line 192 of file nvds3d_pipeline_context.h.
References _eosReceived, _pipeline, DS_ASSERT, mutex(), and setPipelineState().
Referenced by start().
|
inline |
Definition at line 165 of file nvds3d_pipeline_context.h.
References _StatusCond, mainLoop(), and mutex().
Referenced by runMainLoop(), and stop().
|
inline |
Definition at line 232 of file nvds3d_pipeline_context.h.
References _mainLoopThread, _mainStopped, _StatusCond, DS3D_FAILED_RETURN, DS_ASSERT, GSourceCb(), ds3d::kGood, ds3d::kTimeOut, ds3d::kUnknown, LOG_ERROR, LOG_WARNING, mainLoop(), mutex(), and quitMainLoop().
Referenced by start().
|
inlinestaticprotected |
Definition at line 390 of file nvds3d_pipeline_context.h.
References bus(), and DS_ASSERT.
Referenced by init().
|
inline |
Definition at line 283 of file nvds3d_pipeline_context.h.
References ds3d::kGood, LOG_DEBUG, LOG_INFO, pipeline(), and ds3d::gst::SendEosOnSrc().
Referenced by stop().
|
inline |
Definition at line 68 of file nvds3d_pipeline_context.h.
References _eosAutoQuit.
|
inline |
Definition at line 67 of file nvds3d_pipeline_context.h.
References _mainLoop.
|
inlineprotected |
Definition at line 355 of file nvds3d_pipeline_context.h.
References _pipeline, DS_ASSERT, ds3d::gst::GstPtr< GstObjT, ObjFunc >::get(), and setState().
Referenced by playPipeline(), and stopPipeline().
|
inlineprotected |
Definition at line 361 of file nvds3d_pipeline_context.h.
References DS3D_FAILED_RETURN, DS_ASSERT, ds3d::kGood, and ds3d::kGst.
Referenced by setPipelineState(), and stopPipeline().
|
inlinevirtual |
Definition at line 92 of file nvds3d_pipeline_context.h.
References DS3D_ERROR_RETURN, ds3d::kGood, LOG_DEBUG, playPipeline(), and runMainLoop().
|
inlinevirtual |
Definition at line 101 of file nvds3d_pipeline_context.h.
References _StatusCond, isRunning(), LOG_DEBUG, mainLoop(), mutex(), quitMainLoop(), sendEOS(), stopPipeline(), and waitLoopQuit().
|
inline |
Definition at line 203 of file nvds3d_pipeline_context.h.
References _elementList, _pipeline, ds3d::gst::GstPtr< GstObjT, ObjFunc >::get(), getState(), ds3d::isGood(), ds3d::kGood, LOG_WARNING, setPipelineState(), and setState().
Referenced by stop().
|
inline |
Definition at line 174 of file nvds3d_pipeline_context.h.
References _mainLoopThread, _mainStopped, _StatusCond, LOG_DEBUG, mainLoop(), and mutex().
Referenced by stop().
|
protected |
Definition at line 401 of file nvds3d_pipeline_context.h.
|
protected |
Definition at line 402 of file nvds3d_pipeline_context.h.
Referenced by init().
|
protected |
Definition at line 403 of file nvds3d_pipeline_context.h.
Referenced by add(), deinit(), and stopPipeline().
|
protected |
Definition at line 405 of file nvds3d_pipeline_context.h.
Referenced by isRunning(), and setEosAutoQuit().
|
protected |
Definition at line 408 of file nvds3d_pipeline_context.h.
Referenced by isRunning(), and playPipeline().
|
protected |
Definition at line 404 of file nvds3d_pipeline_context.h.
Referenced by deinit(), init(), mainLoop(), and setMainloop().
|
protected |
Definition at line 406 of file nvds3d_pipeline_context.h.
Referenced by runMainLoop(), and waitLoopQuit().
|
protected |
Definition at line 407 of file nvds3d_pipeline_context.h.
Referenced by isRunning(), runMainLoop(), and waitLoopQuit().
|
protected |
Definition at line 400 of file nvds3d_pipeline_context.h.
Referenced by add(), deinit(), init(), pipeline(), playPipeline(), setPipelineState(), and stopPipeline().
|
mutableprotected |
Definition at line 409 of file nvds3d_pipeline_context.h.
Referenced by mutex().
|
protected |
Definition at line 410 of file nvds3d_pipeline_context.h.
Referenced by quitMainLoop(), runMainLoop(), stop(), and waitLoopQuit().