NVIDIA DeepStream SDK API Reference

6.4 Release
gst-nvdsA2Vtemplate/includes/nvdscustomlib_base.hpp
Go to the documentation of this file.
1 
23 #ifndef __NVDSCUSTOMLIB_BASE_HPP__
24 #define __NVDSCUSTOMLIB_BASE_HPP__
25 
26 #include <gst/base/gstbasetransform.h>
27 
29 
30 /* Buffer Pool Configuration Parameters */
31 struct BufferPoolConfig {
32  gint cuda_mem_type;
33  guint gpu_id;
34  guint max_buffers;
35  gint batch_size;
36 };
37 
39 {
40 public:
41  explicit DSCustomLibraryBase(GstElement* bscope = nullptr);
42 
43  /* Set Init Parameters */
44  virtual bool SetInitParams(DSCustom_CreateParams *params);
45 
46  virtual ~DSCustomLibraryBase();
47 
48  /* Set Custom Properties of the library */
49  virtual bool SetProperty(Property &prop) = 0;
50 
51  virtual bool HandleEvent (GstEvent *event) = 0;
52  // TODO: Add getProperty as well
53 
54  virtual char* QueryProperties () = 0;
55 
56  virtual BufferResult ProcessBuffer(GstAudio2Video * base, GstBuffer * audio, GstVideoFrame * video) = 0;
57 
58 public:
59  /* Gstreamer dsexaple2 plugin's base class reference */
60  GstElement *m_element;
61 
63 };
64 
65 
66 DSCustomLibraryBase::DSCustomLibraryBase(GstElement* bscope) : m_element(bscope) {
67 }
68 
70  m_element = params->m_element;
71 
72  return true;
73 }
74 
76 }
77 
78 #endif
DSCustomLibraryBase::ProcessBuffer
virtual BufferResult ProcessBuffer(GstBuffer *inbuf)=0
DSCustom_CreateParams
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:39
BufferPoolConfig::batch_size
gint batch_size
Definition: nvdscustomlib_base.h:36
BufferResult
BufferResult
Copyright (c) 2023, NVIDIA CORPORATION.
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:32
DSCustomLibraryBase::m_element
GstBaseTransform * m_element
Definition: nvdscustomlib_base.h:65
DSCustom_CreateParams::m_element
GstElement * m_element
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:40
DSCustomLibraryBase::SetProperty
virtual bool SetProperty(Property &prop)=0
DSCustomLibraryBase::QueryProperties
virtual char * QueryProperties()=0
DSCustomLibraryBase::m_element
GstElement * m_element
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_base.hpp:60
IDSCustomLibrary
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:53
BufferPoolConfig
Copyright (c) 2021, NVIDIA CORPORATION.
Definition: nvdscustomlib_base.h:32
DSCustomLibraryBase::~DSCustomLibraryBase
virtual ~DSCustomLibraryBase()
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_base.hpp:75
Property
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:43
DSCustomLibraryBase::DSCustomLibraryBase
DSCustomLibraryBase(GstBaseTransform *btrans=nullptr)
Definition: gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp:96
BufferPoolConfig::max_buffers
guint max_buffers
Definition: nvdscustomlib_base.h:35
BufferPoolConfig::cuda_mem_type
gint cuda_mem_type
Definition: nvdscustomlib_base.h:33
BufferPoolConfig::gpu_id
guint gpu_id
Definition: nvdscustomlib_base.h:34
DSCustomLibraryBase::HandleEvent
virtual bool HandleEvent(GstEvent *event)=0
GstBuffer
struct _GstBuffer GstBuffer
Definition: idatatype.h:19
DSCustomLibraryBase::SetInitParams
virtual bool SetInitParams(DSCustom_CreateParams *params)
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_base.hpp:69
nvdscustomlib_interface.hpp
_GstAudio2Video
Definition: gstaudio2video.h:43
DSCustomLibraryBase
Definition: nvdscustomlib_base.h:39