Sample implementation of the custom library.
Definition at line 65 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.


Public Member Functions | |
| SampleAlgorithm () | |
| Constructor. More... | |
| void | Initialize () |
| Initialize the custom library. More... | |
| virtual bool | SetInitParams (DSCustom_CreateParams *params) |
| Set initialization parameters. More... | |
| virtual bool | SetProperty (Property &prop) |
| Set custom properties of the library. More... | |
| virtual bool | HandleEvent (GstEvent *event) |
| Handle GStreamer events. More... | |
| virtual char * | QueryProperties () |
| Query properties. More... | |
| virtual BufferResult | ProcessBuffer (GstBuffer *inbuf) |
| Process incoming buffer. More... | |
| virtual GstCaps * | GetCompatibleCaps (GstPadDirection direction, GstCaps *in_caps, GstCaps *othercaps) |
| Get compatible caps. More... | |
| ~SampleAlgorithm () | |
| Destructor. More... | |
| SampleAlgorithm () | |
| Constructor. More... | |
| void | Initialize () |
| Initialize the custom library. More... | |
| virtual bool | SetInitParams (DSCustom_CreateParams *params) |
| Set initialization parameters. More... | |
| virtual bool | SetProperty (Property &prop) |
| Set custom properties of the library. More... | |
| virtual bool | HandleEvent (GstEvent *event) |
| Handle GStreamer events. More... | |
| virtual char * | QueryProperties () |
| Query properties. More... | |
| virtual BufferResult | ProcessBuffer (GstBuffer *inbuf) |
| Process incoming buffer. More... | |
| virtual GstCaps * | GetCompatibleCaps (GstPadDirection direction, GstCaps *in_caps, GstCaps *othercaps) |
| Get compatible caps. More... | |
| ~SampleAlgorithm () | |
| Destructor. More... | |
| NvBufSurface * | getNvBufSurface (GstBuffer *inbuf) |
| NvBufSurface * | getNvBufSurface (GstBuffer *inbuf) |
| GstBufferPool * | CreateBufferPool (BufferPoolConfig *pool_config, GstCaps *outcaps) |
| GstBufferPool * | CreateBufferPool (BufferPoolConfig *pool_config, GstCaps *outcaps) |
Data Fields | |
| gboolean | hw_caps |
| Hardware capabilities flag. More... | |
| guint | source_id = 0 |
| Source ID. More... | |
| guint | m_FrameNum = 0 |
| Frame number (increments for all frames including skipped) More... | |
| guint | m_ProcessedFrameNum = 0 |
| Processed frame number (only increments for actually processed frames) More... | |
| guint | m_DumpedFrameNum = 0 |
| Dumped frame number. More... | |
| bool | m_TransformMode = false |
| Transform mode flag. More... | |
| GstBufferPool * | m_dsBufferPool = NULL |
| DeepStream buffer pool. More... | |
| GstBufferPool * | m_swbufpool = NULL |
| Software buffer pool. More... | |
| guint | swbuffersize |
| Software buffer size. More... | |
| NvBufSurfTransformConfigParams | m_ConfigParams |
| Transform config parameters. More... | |
| void * | m_scratchNvBufSurface = NULL |
| Scratch NvBufSurface. More... | |
| int | dump_max_frames = 5 |
| Maximum frames to dump. More... | |
| bool | m_dummyMetaInsert = false |
| Dummy metadata insertion flag. More... | |
| bool | m_fillDummyBatchMeta = false |
| Fill dummy batch metadata flag. More... | |
| ConfigProperties | m_ConfigProperties |
| Structure to store all configuration properties loaded from YAML config file. More... | |
| std::unique_ptr< ConfigParser > | m_configParser |
| Config parser. More... | |
| bool | m_CustomConfigLoaded = false |
| Custom config loaded flag. More... | |
| std::vector< Property > | m_VectorProperty |
| Vector containing key:value pair of custom lib properties. More... | |
| PrettyLogger * | m_Logger |
| std::vector< std::string > | m_SensorNames |
| TensorCache * | m_TensorCache |
| std::unique_ptr< TensorRTEngine > | m_TensorRTEngine |
| std::map< std::string, Matrix4f > | m_CameraProjectionMatrices |
| std::map< std::string, Matrix4f > | m_CameraTransformedProjectionMatrices |
| bool | m_eosReceived = false |
| GstBaseTransform * | m_element |
| guint | m_gpuId |
| GPU ID on which we expect to execute the algorithm. More... | |
| GstVideoInfo | m_inVideoInfo |
| GstVideoInfo | m_outVideoInfo |
| GstVideoFormat | m_inVideoFmt |
| GstVideoFormat | m_outVideoFmt |
| GstCaps * | m_inCaps |
| GstCaps * | m_outCaps |
|
inline |
Constructor.
Definition at line 71 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
References Initialize(), m_CustomConfigLoaded, m_Logger, m_SensorNames, m_TensorCache, and m_VectorProperty.
| SampleAlgorithm::~SampleAlgorithm | ( | ) |
Destructor.
|
inline |
Constructor.
Definition at line 71 of file 9.2/sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
References Initialize(), m_CustomConfigLoaded, m_Logger, m_SensorNames, m_TensorCache, and m_VectorProperty.
| SampleAlgorithm::~SampleAlgorithm | ( | ) |
Destructor.
|
inherited |
Definition at line 193 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
References BufferPoolConfig::batch_size, BufferPoolConfig::cuda_mem_type, BufferPoolConfig::gpu_id, gst_nvds_buffer_pool_new(), BufferPoolConfig::max_buffers, and TRUE.
|
inherited |
|
virtual |
Get compatible caps.
| direction | Pad direction |
| in_caps | Input caps |
| othercaps | Other caps |
Reimplemented from DSCustomLibraryBase.
|
virtual |
Get compatible caps.
| direction | Pad direction |
| in_caps | Input caps |
| othercaps | Other caps |
Reimplemented from DSCustomLibraryBase.
|
inherited |
|
inherited |
Definition at line 231 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
References DSCustomLibraryBase::m_element.
|
virtual |
Handle GStreamer events.
| event | GStreamer event |
Implements DSCustomLibraryBase.
|
virtual |
Handle GStreamer events.
| event | GStreamer event |
Implements DSCustomLibraryBase.
| void SampleAlgorithm::Initialize | ( | ) |
Initialize the custom library.
| void SampleAlgorithm::Initialize | ( | ) |
Initialize the custom library.
Referenced by SampleAlgorithm().
|
virtual |
Process incoming buffer.
| inbuf | Input GStreamer buffer |
Implements DSCustomLibraryBase.
|
virtual |
Process incoming buffer.
| inbuf | Input GStreamer buffer |
Implements DSCustomLibraryBase.
|
virtual |
|
virtual |
|
virtual |
Set initialization parameters.
| params | Creation parameters |
Reimplemented from DSCustomLibraryBase.
|
virtual |
Set initialization parameters.
| params | Creation parameters |
Reimplemented from DSCustomLibraryBase.
|
virtual |
Set custom properties of the library.
| prop | Property to set |
Implements DSCustomLibraryBase.
|
virtual |
Set custom properties of the library.
| prop | Property to set |
Implements DSCustomLibraryBase.
| int SampleAlgorithm::dump_max_frames = 5 |
Maximum frames to dump.
Definition at line 179 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| gboolean SampleAlgorithm::hw_caps |
Hardware capabilities flag.
Definition at line 145 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| std::map< std::string, Matrix4f > SampleAlgorithm::m_CameraProjectionMatrices |
Definition at line 204 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| std::map< std::string, Matrix4f > SampleAlgorithm::m_CameraTransformedProjectionMatrices |
Definition at line 207 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| NvBufSurfTransformConfigParams SampleAlgorithm::m_ConfigParams |
Transform config parameters.
Definition at line 173 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| std::unique_ptr< ConfigParser > SampleAlgorithm::m_configParser |
Config parser.
Definition at line 187 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| ConfigProperties SampleAlgorithm::m_ConfigProperties |
Structure to store all configuration properties loaded from YAML config file.
Definition at line 186 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| bool SampleAlgorithm::m_CustomConfigLoaded = false |
Custom config loaded flag.
Definition at line 188 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
Referenced by SampleAlgorithm().
| GstBufferPool * SampleAlgorithm::m_dsBufferPool = NULL |
DeepStream buffer pool.
Definition at line 169 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| bool SampleAlgorithm::m_dummyMetaInsert = false |
Dummy metadata insertion flag.
Definition at line 182 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| guint SampleAlgorithm::m_DumpedFrameNum = 0 |
Dumped frame number.
Definition at line 165 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
|
inherited |
Definition at line 72 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::GetCompatibleCaps(), DSCustomLibraryBase::getNvBufSurface(), and DSCustomLibraryBase::SetInitParams().
| bool SampleAlgorithm::m_eosReceived = false |
Definition at line 210 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| bool SampleAlgorithm::m_fillDummyBatchMeta = false |
Fill dummy batch metadata flag.
Definition at line 183 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| guint SampleAlgorithm::m_FrameNum = 0 |
Frame number (increments for all frames including skipped)
Definition at line 163 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
|
inherited |
GPU ID on which we expect to execute the algorithm.
Definition at line 75 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::DSCustomLibraryBase(), and DSCustomLibraryBase::SetInitParams().
|
inherited |
Definition at line 90 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::DSCustomLibraryBase(), and DSCustomLibraryBase::SetInitParams().
|
inherited |
Definition at line 86 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::SetInitParams().
|
inherited |
Definition at line 82 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::SetInitParams().
| PrettyLogger * SampleAlgorithm::m_Logger |
Definition at line 192 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
Referenced by SampleAlgorithm().
|
inherited |
Definition at line 91 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::DSCustomLibraryBase(), and DSCustomLibraryBase::SetInitParams().
|
inherited |
Definition at line 87 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::SetInitParams().
|
inherited |
Definition at line 83 of file sources/gst-plugins/gst-nvdsvideotemplate/includes/nvdscustomlib_base.hpp.
Referenced by DSCustomLibraryBase::SetInitParams().
| guint SampleAlgorithm::m_ProcessedFrameNum = 0 |
Processed frame number (only increments for actually processed frames)
Definition at line 164 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| void * SampleAlgorithm::m_scratchNvBufSurface = NULL |
Scratch NvBufSurface.
Definition at line 175 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| std::vector< std::string > SampleAlgorithm::m_SensorNames |
Definition at line 195 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
Referenced by SampleAlgorithm().
| GstBufferPool * SampleAlgorithm::m_swbufpool = NULL |
Software buffer pool.
Definition at line 170 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| TensorCache * SampleAlgorithm::m_TensorCache |
Definition at line 198 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
Referenced by SampleAlgorithm().
| std::unique_ptr< TensorRTEngine > SampleAlgorithm::m_TensorRTEngine |
Definition at line 201 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| bool SampleAlgorithm::m_TransformMode = false |
Transform mode flag.
Definition at line 166 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| std::vector< Property > SampleAlgorithm::m_VectorProperty |
Vector containing key:value pair of custom lib properties.
Definition at line 189 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
Referenced by SampleAlgorithm().
| guint SampleAlgorithm::source_id = 0 |
Source ID.
Definition at line 162 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.
| guint SampleAlgorithm::swbuffersize |
Software buffer size.
Definition at line 171 of file sources/gst-plugins/gst-nvdsvideotemplate/ds-sparse4d/customlib_impl.h.