NVIDIA DeepStream SDK API Reference

9.1 Release
sources/libs/ds3d/gst/nvds3d_pipeline_context.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2023-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef NVDS3D_GST_NVDS3D_PIPELINE_CONTEXT_H
19 #define NVDS3D_GST_NVDS3D_PIPELINE_CONTEXT_H
20 
21 #include "gstnvdsmeta.h"
22 
23 // inlcude all ds3d hpp header files
24 #include <ds3d/common/hpp/dataloader.hpp>
25 #include <ds3d/common/hpp/datamap.hpp>
26 #include <ds3d/common/hpp/frame.hpp>
27 #include <ds3d/common/hpp/yaml_config.hpp>
28 
29 // inlucde nvds3d Gst header files
30 #include <ds3d/gst/nvds3d_gst_plugin.h>
31 #include <ds3d/gst/nvds3d_gst_ptr.h>
32 #include <ds3d/gst/nvds3d_meta.h>
33 #include <gst/gst.h>
34 
35 namespace ds3d { namespace gst {
36 
37 constexpr const char* kDs3dFilterPluginName = "nvds3dfilter";
38 constexpr const char* kDs3dBridgePluginName = "nvds3dbridge";
39 constexpr const char* kDs3dMixerPluginName = "nvds3dmixer";
40 
41 extern "C" {
42 
43 static gboolean
44 SendEosOnSrc(GstElement* element, GstPad* pad, gpointer user_data)
45 {
46  GstPad* peer = gst_pad_get_peer(pad);
47  if (!peer) {
49  "send EOS downstream [elem:%s] skipped; not linked\n",
50  GST_ELEMENT_NAME(GST_ELEMENT(gst_pad_get_parent(pad))));
51  return TRUE;
52  }
53  LOG_DEBUG(
54  "sending EOS downstream [elem:%s->%s]\n", GST_ELEMENT_NAME(GST_ELEMENT(gst_pad_get_parent(pad))),
55  GST_ELEMENT_NAME(GST_ELEMENT(gst_pad_get_parent(peer))));
56  if (gst_pad_send_event(peer, gst_event_new_eos()) == FALSE) {
58  "send EOS downstream [elem:%s->%s] failed\n", GST_ELEMENT_NAME(GST_ELEMENT(gst_pad_get_parent(pad))),
59  GST_ELEMENT_NAME(GST_ELEMENT(gst_pad_get_parent(peer))));
60  }
61  gst_object_unref(peer);
62  return TRUE;
63 }
64 }
65 
67 public:
69  virtual ~PipelineContext() { deinit(); }
70 
71  void setMainloop(GMainLoop* loop) { _mainLoop.reset(loop); }
72  void setEosAutoQuit(bool enable) { _eosAutoQuit = enable; }
73 
74  virtual ErrCode init(const std::string& name)
75  {
78  _pipeline.reset(gst_pipeline_new(name.c_str()));
79  DS3D_FAILED_RETURN(pipeline(), ErrCode::kGst, "create pipeline: %s failed", name.c_str());
80  _pipeline.setName(name);
81  _bus.reset(gst_pipeline_get_bus(pipeline()));
82  DS3D_FAILED_RETURN(bus(), ErrCode::kGst, "get bus from pipeline: %s failed", name.c_str());
83  _busWatchId = gst_bus_add_watch(bus(), sBusCall, this);
84  return ErrCode::kGood;
85  }
86 
88  {
91  gst_bin_add(GST_BIN(pipeline()), ele.copy()), ErrCode::kGst, "add element failed");
92  _elementList.emplace_back(ele);
93  return *this;
94  }
95 
96  virtual ErrCode start(std::function<void()> loopQuitCb)
97  {
98  LOG_DEBUG("starting");
99  DS3D_ERROR_RETURN(playPipeline(), "failed to start playing the pipeline");
101  runMainLoop(std::move(loopQuitCb)), "failed to run main loop on the pipeline");
102  return ErrCode::kGood;
103  }
104 
105  virtual ErrCode stop()
106  {
107  LOG_DEBUG("stopping");
108  if (mainLoop() && isRunning(1000)) {
109  LOG_DEBUG("start sending EOS");
110  sendEOS();
111  std::unique_lock<std::mutex> lock(mutex());
112  if (!_StatusCond.wait_for(lock, std::chrono::seconds(3), [this]() {
113  return _mainStopped || _eosReceived;
114  })) {
115  LOG_DEBUG("waiting for EOS timed out, force to stop");
116  }
117  }
118 
119  quitMainLoop();
120  waitLoopQuit();
121  return stopPipeline();
122  }
123 
124  virtual void deinit()
125  {
126  LOG_DEBUG("deinit");
127  if (bus()) {
128  gst_bus_remove_watch(bus());
129  }
130  _bus.reset();
131  _pipeline.reset();
132  _mainLoop.reset();
133  std::for_each(_elementList.rbegin(), _elementList.rend(), [](auto& e) { e.reset(); });
134  _elementList.clear();
135  }
136 
137  /* timeout: milliseconds, 0 means never timeout */
138  bool isRunning(size_t timeout = 0)
139  {
140  std::unique_lock<std::mutex> locker(mutex());
141  if (!mainLoop() || !pipeline() || _mainStopped || (_eosAutoQuit && _eosReceived)) {
142  return false;
143  }
144  if (!g_main_loop_is_running(mainLoop())) {
145  return false;
146  }
147  locker.unlock();
148 
149  GstState state = GST_STATE_NULL;
150  GstState pending = GST_STATE_NULL;
151  GstStateChangeReturn ret = gst_element_get_state(
152  GST_ELEMENT(pipeline()), &state, &pending,
153  (timeout ? timeout * 1000000 : GST_CLOCK_TIME_NONE));
154 
155  // multi-times try on get_state in case gstreamer is not maintening states well.
156  uint32_t times = 1;
157  while (ret == GST_STATE_CHANGE_FAILURE && times++ < 3) {
158  ret = gst_element_get_state(GST_ELEMENT(pipeline()), &state, &pending, 0);
159  }
160  if (ret == GST_STATE_CHANGE_FAILURE) {
161  return false;
162  }
163  if (state == GST_STATE_PLAYING || pending == GST_STATE_PLAYING) {
164  return true;
165  }
166  return false;
167  }
168 
170  {
171  std::unique_lock<std::mutex> locker(mutex());
172  if (mainLoop()) {
173  g_main_loop_quit(mainLoop());
174  }
175  _StatusCond.notify_all();
176  }
177 
179  {
180  std::unique_lock<std::mutex> locker(mutex());
181  if (mainLoop() && !_mainStopped && _mainLoopThread) {
182  if (_StatusCond.wait_for(locker, std::chrono::milliseconds(3000)) ==
183  std::cv_status::timeout) {
184  LOG_DEBUG("waiting loop timed out, force loop to stop");
185  }
186  }
187  _mainStopped = true;
188  if (_mainLoopThread) {
189  auto swapThread = std::move(_mainLoopThread);
190  _mainLoopThread.reset();
191  locker.unlock();
192  swapThread->join();
193  }
194  }
195 
197  {
199  {
200  std::unique_lock<std::mutex> locker(mutex());
201  _eosReceived = false;
202  }
203  auto c = setPipelineState(GST_STATE_PLAYING);
204  return c;
205  }
206 
208  {
209  if (!_pipeline) {
210  return ErrCode::kGood;
211  }
212  ErrCode c = setPipelineState(GST_STATE_NULL);
213  if (!isGood(c)) {
214  LOG_WARNING("set pipeline state to GST_STATE_NULL failed");
215  }
216  GstState end = GST_STATE_NULL;
217  c = getState(_pipeline.get(), &end, nullptr, 3000);
218  if (!isGood(c) || end != GST_STATE_NULL) {
219  LOG_WARNING("waiting for pipeline state to null failed, force to quit");
220  }
221  for (auto& each : _elementList) {
222  if (each) {
223  c = setState(each.get(), GST_STATE_NULL);
224  }
225  }
226  return c;
227  }
228 
229  static gboolean GSourceCb(gpointer user_data)
230  {
231  std::function<bool()>* f = (std::function<bool()>*)(user_data);
232  DS_ASSERT(f);
233  return (*f)();
234  }
235 
236  ErrCode runMainLoop(std::function<void()> loopQuitCb)
237  {
238  std::unique_lock<std::mutex> locker(mutex());
241  "failed to run main loop due to loop might not set or thread already running.");
242 
243  _mainStopped = false;
244  auto loopThread = std::make_unique<std::thread>([this, quitCb = std::move(loopQuitCb)]() {
245  g_main_loop_run(mainLoop());
246  quitCb();
247  std::unique_lock<std::mutex> locker(mutex());
248  _mainStopped = true;
249  _StatusCond.notify_all();
250  });
251  DS_ASSERT(loopThread);
252 
253  // check g_main_loop_run started
254  std::atomic_bool loopStarted{false};
255  std::function<bool()> loopCheck = [&loopStarted, this]() -> bool {
256  std::unique_lock<std::mutex> locker(mutex());
257  loopStarted = true;
258  _StatusCond.notify_all();
259  return false;
260  };
261  g_idle_add(GSourceCb, &loopCheck);
262 
263  // TODO, find better timeout
264  // set a larger timeout value since some model load taking long time
265  if (!_StatusCond.wait_for(locker, std::chrono::milliseconds(20000), [this, &loopStarted]() {
266  return loopStarted || _mainStopped;
267  })) {
268  locker.unlock();
269  LOG_WARNING("Starting main loop timed out");
270  quitMainLoop();
271  loopThread->join();
272  return ErrCode::kTimeOut;
273  }
274 
275  // run main loop stopped too fast
276  if (_mainStopped) {
277  LOG_ERROR("Run main loop stopped too fast, please check.");
278  locker.unlock();
279  loopThread->join();
280  return ErrCode::kUnknown;
281  }
282  _mainLoopThread = std::move(loopThread);
283 
284  return ErrCode::kGood;
285  }
286 
288  {
289  LOG_INFO("pipeline sending EOS");
290  GstIterator* itr = nullptr;
291  GValue data = {
292  0,
293  };
294  for (itr = gst_bin_iterate_sources(GST_BIN(pipeline())); gst_iterator_next(itr, &data) == GST_ITERATOR_OK;) {
295  GstElement* elem = GST_ELEMENT_CAST(g_value_get_object(&data));
296  LOG_DEBUG("sending EOS downstream from src element %s\n", GST_ELEMENT_NAME(elem));
297  // operating pads directly might lose element's state lock, each element's function must
298  // be thread-safe
299  gst_element_foreach_src_pad(elem, SendEosOnSrc, NULL);
300  g_value_reset(&data);
301  }
302  g_value_unset(&data);
303  gst_iterator_free(itr);
304 
305  return ErrCode::kGood;
306  }
307 
308  GstPipeline* pipeline() const { return GST_PIPELINE_CAST(_pipeline.get()); }
309  GstBus* bus() const { return _bus.get(); }
310  GMainLoop* mainLoop() const { return _mainLoop.get(); }
311 
312 private:
313  // default bus callback
314  virtual bool busCall(GstMessage* msg)
315  {
316  DS_ASSERT(mainLoop());
317  switch (GST_MESSAGE_TYPE(msg)) {
318  case GST_MESSAGE_EOS:
319  LOG_INFO("End of stream received");
320  {
321  std::unique_lock<std::mutex> locker(mutex());
322  _eosReceived = true;
323  _StatusCond.notify_all();
324  }
325  if (_eosAutoQuit) {
326  quitMainLoop();
327  }
328  break;
329  case GST_MESSAGE_ERROR: {
330  gchar* debug = nullptr;
331  GError* error = nullptr;
332  gst_message_parse_error(msg, &error, &debug);
333  LOG_ERROR(
334  "ERROR from element %s: %s, details: %s", GST_OBJECT_NAME(msg->src), error->message,
335  (debug ? debug : ""));
336  g_free(debug);
337  g_error_free(error);
338 
339  quitMainLoop();
340  break;
341  }
342  case GST_MESSAGE_STATE_CHANGED: {
343  GstState oldState, newState, pendingState;
344 
345  gst_message_parse_state_changed(msg, &oldState, &newState, &pendingState);
346  LOG_DEBUG(
347  "Element %s changed state from %s to %s, pending: %s.", GST_OBJECT_NAME(msg->src),
348  gst_element_state_get_name(oldState), gst_element_state_get_name(newState),
349  gst_element_state_get_name(pendingState));
350  break;
351  }
352  default:
353  break;
354  }
355  return TRUE;
356  }
357 
358 protected:
359  ErrCode setPipelineState(GstState state)
360  {
362  return setState(_pipeline.get(), state);
363  }
364 
365  ErrCode setState(GstElement* ele, GstState state)
366  {
367  DS_ASSERT(ele);
368  GstStateChangeReturn ret = gst_element_set_state(ele, state);
370  ret != GST_STATE_CHANGE_FAILURE, ErrCode::kGst, "element set state: %d failed", state);
371  return ErrCode::kGood;
372  }
373 
374  /* get element states. timeout in milliseconds.
375  */
377  GstElement* ele, GstState* state, GstState* pending = nullptr, size_t timeout = 0)
378  {
379  DS_ASSERT(ele);
380  GstStateChangeReturn ret = gst_element_get_state(
381  ele, state, pending, (timeout ? timeout * 1000000 : GST_CLOCK_TIME_NONE));
382  switch (ret) {
383  case GST_STATE_CHANGE_FAILURE:
384  return ErrCode::kGst;
385  case GST_STATE_CHANGE_SUCCESS:
386  case GST_STATE_CHANGE_NO_PREROLL:
387  return ErrCode::kGood;
388  default:
389  return ErrCode::kUnknown;
390  }
391  return ErrCode::kGood;
392  }
393 
394  static gboolean sBusCall(GstBus* bus, GstMessage* msg, gpointer data)
395  {
396  PipelineContext* ctx = static_cast<PipelineContext*>(data);
397  DS_ASSERT(ctx->bus() == bus);
398  return ctx->busCall(msg);
399  }
400 
401  std::mutex& mutex() const { return _pipelineMutex; }
402 
403  // members
406  uint32_t _busWatchId = 0;
407  std::vector<gst::ElePtr> _elementList;
408  ds3d::UniqPtr<GMainLoop> _mainLoop{nullptr, g_main_loop_unref};
409  bool _eosAutoQuit = false;
410  std::unique_ptr<std::thread> _mainLoopThread;
411  std::atomic_bool _mainStopped{false};
412  std::atomic_bool _eosReceived{false};
413  mutable std::mutex _pipelineMutex;
414  std::condition_variable _StatusCond;
416 };
417 
418 }} // namespace ds3d::gst
419 
420 #endif // NVDS3D_GST_NVDS3D_PIPELINE_CONTEXT_H
ds3d::isGood
bool isGood(ErrCode c)
Definition: sources/includes/ds3d/common/func_utils.h:32
ds3d::gst::PipelineContext::stopPipeline
ErrCode stopPipeline()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:207
ds3d::gst::PipelineContext::setMainloop
void setMainloop(GMainLoop *loop)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:71
ds3d::gst::PipelineContext::setEosAutoQuit
void setEosAutoQuit(bool enable)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:72
ds3d::gst::PipelineContext::playPipeline
ErrCode playPipeline()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:196
ds3d::gst::PipelineContext::waitLoopQuit
void waitLoopQuit()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:178
ds3d::gst::PipelineContext::setState
ErrCode setState(GstElement *ele, GstState state)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:365
ds3d::UniqPtr
std::unique_ptr< T, std::function< void(T *)> > UniqPtr
Definition: sources/includes/ds3d/common/hpp/obj.hpp:35
ds3d::gst::PipelineContext::_StatusCond
std::condition_variable _StatusCond
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:414
ds3d::gst::PipelineContext::stop
virtual ErrCode stop()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:105
ds3d::ErrCode::kGst
@ kGst
ds3d::gst::PipelineContext::mainLoop
GMainLoop * mainLoop() const
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:310
DS3D_FAILED_RETURN
#define DS3D_FAILED_RETURN(condition, ret, fmt,...)
Definition: sources/includes/ds3d/common/defines.h:69
ds3d::gst::GstPtr
Definition: sources/libs/ds3d/gst/nvds3d_gst_ptr.h:58
ds3d::gst::SendEosOnSrc
static gboolean SendEosOnSrc(GstElement *element, GstPad *pad, gpointer user_data)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:44
ds3d::gst::PipelineContext::_pipeline
gst::ElePtr _pipeline
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:404
ds3d::gst::PipelineContext::DS3D_DISABLE_CLASS_COPY
DS3D_DISABLE_CLASS_COPY(PipelineContext)
ds3d::gst::PipelineContext::_mainLoop
ds3d::UniqPtr< GMainLoop > _mainLoop
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:408
ds3d::ErrCode::kGood
@ kGood
ds3d::gst::PipelineContext::sBusCall
static gboolean sBusCall(GstBus *bus, GstMessage *msg, gpointer data)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:394
ds3d::gst::PipelineContext::mutex
std::mutex & mutex() const
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:401
ds3d::gst::ElePtr
Definition: sources/libs/ds3d/gst/nvds3d_gst_ptr.h:154
ds3d::gst::PipelineContext::~PipelineContext
virtual ~PipelineContext()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:69
ds3d::gst::PipelineContext::isRunning
bool isRunning(size_t timeout=0)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:138
ds3d::gst::PipelineContext::runMainLoop
ErrCode runMainLoop(std::function< void()> loopQuitCb)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:236
ds3d::gst::PipelineContext::start
virtual ErrCode start(std::function< void()> loopQuitCb)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:96
ds3d::gst::PipelineContext::_mainStopped
std::atomic_bool _mainStopped
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:411
DS_ASSERT
#define DS_ASSERT(...)
Definition: sources/includes/ds3d/common/defines.h:36
ds3d::ErrCode
ErrCode
Definition: sources/includes/ds3d/common/common.h:47
LOG_DEBUG
#define LOG_DEBUG(fmt,...)
Definition: sources/apps/sample_apps/deepstream-3d-action-recognition/deepstream_action.h:54
ds3d::ErrCode::kTimeOut
@ kTimeOut
ds3d::gst::GstPtr::setName
void setName(const std::string &name)
Definition: sources/libs/ds3d/gst/nvds3d_gst_ptr.h:72
ds3d::gst::PipelineContext::init
virtual ErrCode init(const std::string &name)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:74
ds3d::gst::PipelineContext::_busWatchId
uint32_t _busWatchId
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:406
ds3d::gst::PipelineContext::bus
GstBus * bus() const
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:309
LOG_ERROR
#define LOG_ERROR(fmt,...)
Definition: sources/apps/sample_apps/deepstream-3d-action-recognition/deepstream_action.h:60
ds3d::gst::PipelineContext::add
PipelineContext & add(const gst::ElePtr &ele)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:87
ds3d::gst::GstPtr::copy
GstObjT * copy() const
Definition: sources/libs/ds3d/gst/nvds3d_gst_ptr.h:102
ds3d::gst::PipelineContext::setPipelineState
ErrCode setPipelineState(GstState state)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:359
ds3d::gst::GstPtr::get
GstObjT * get() const
Definition: sources/libs/ds3d/gst/nvds3d_gst_ptr.h:114
LOG_INFO
#define LOG_INFO(fmt,...)
Definition: sources/apps/sample_apps/deepstream-3d-action-recognition/custom_sequence_preprocess/seq_process_common.h:68
ds3d::gst::PipelineContext::pipeline
GstPipeline * pipeline() const
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:308
ds3d::gst::PipelineContext::getState
ErrCode getState(GstElement *ele, GstState *state, GstState *pending=nullptr, size_t timeout=0)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:376
ds3d::gst::kDs3dFilterPluginName
constexpr const char * kDs3dFilterPluginName
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:37
ds3d::gst::PipelineContext
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:66
GValue
struct _GValue GValue
Definition: service-maker/includes/object.hpp:38
LOG_WARNING
#define LOG_WARNING
Definition: sources/gst-plugins/gst-nvtracker/logging.h:24
ds3d::gst::PipelineContext::_eosReceived
std::atomic_bool _eosReceived
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:412
ds3d::gst::PipelineContext::_mainLoopThread
std::unique_ptr< std::thread > _mainLoopThread
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:410
ds3d::gst::PipelineContext::GSourceCb
static gboolean GSourceCb(gpointer user_data)
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:229
ds3d::ErrCode::kUnknown
@ kUnknown
ds3d::gst::kDs3dMixerPluginName
constexpr const char * kDs3dMixerPluginName
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:39
ds3d::gst::PipelineContext::PipelineContext
PipelineContext()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:68
ds3d::gst::PipelineContext::sendEOS
ErrCode sendEOS()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:287
ds3d::gst::kDs3dBridgePluginName
constexpr const char * kDs3dBridgePluginName
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:38
ds3d::gst::PipelineContext::_bus
gst::BusPtr _bus
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:405
DS3D_THROW_ERROR
#define DS3D_THROW_ERROR(statement, code, msg)
Definition: sources/includes/ds3d/common/defines.h:83
DS3D_ERROR_RETURN
#define DS3D_ERROR_RETURN(code, fmt,...)
Definition: sources/includes/ds3d/common/defines.h:77
ds3d::gst::PipelineContext::_pipelineMutex
std::mutex _pipelineMutex
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:413
ds3d::gst::PipelineContext::deinit
virtual void deinit()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:124
ds3d
Definition: sources/includes/ds3d/common/abi_dataprocess.h:25
ds3d::gst::GstPtr::reset
void reset(GstObjT *obj=nullptr, bool takeOwner=true)
Definition: sources/libs/ds3d/gst/nvds3d_gst_ptr.h:93
ds3d::gst::PipelineContext::_elementList
std::vector< gst::ElePtr > _elementList
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:407
ds3d::gst::PipelineContext::_eosAutoQuit
bool _eosAutoQuit
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:409
ds3d::gst::PipelineContext::quitMainLoop
void quitMainLoop()
Definition: sources/libs/ds3d/gst/nvds3d_pipeline_context.h:169