NVIDIA DeepStream SDK API Reference

6.4 Release
gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp
Go to the documentation of this file.
1 
23 #ifndef __NVDSCUSTOMLIB_INTERFACE_HPP__
24 #define __NVDSCUSTOMLIB_INTERFACE_HPP__
25 
26 #include <string>
27 #include <gst/gstbuffer.h>
28 
29 enum class BufferResult {
30  Buffer_Ok, // Push the buffer from submit_input function
31  Buffer_Drop, // Drop the buffer inside submit_input function
32  Buffer_Async, // Return from submit_input function, custom lib to push the buffer
33  Buffer_Error // Error occured
34 };
35 
36 struct DSCustom_CreateParams {
37  GstBaseTransform *m_element;
38  GstCaps *m_inCaps;
39  GstCaps *m_outCaps;
40  guint m_gpuId;
41  guint m_batchSize;
42 };
43 
44 struct Property
45 {
46  Property(std::string arg_key, std::string arg_value) : key(arg_key), value(arg_value)
47  {
48  }
49 
50  std::string key;
51  std::string value;
52 };
53 
54 class IDSCustomLibrary
55 {
56 public:
57  virtual bool SetInitParams (DSCustom_CreateParams *params) = 0;
58  virtual bool HandleEvent (GstEvent *event) = 0;
59  virtual char* QueryProperties () = 0;
60  virtual bool SetProperty (Property &prop) = 0;
61  virtual GstCaps* GetCompatibleCaps (GstPadDirection direction, GstCaps* in_caps, GstCaps* othercaps) = 0;
62  virtual BufferResult ProcessBuffer (GstBuffer *inbuf) = 0;
63  virtual ~IDSCustomLibrary() {};
64 };
65 
66 #endif
DSCustom_CreateParams
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:39
BufferResult::Buffer_Async
@ Buffer_Async
BufferResult::Buffer_Drop
@ Buffer_Drop
IDSCustomLibrary::ProcessBuffer
virtual BufferResult ProcessBuffer(GstAudio2Video *base, GstBuffer *audio, GstVideoFrame *video)=0
DSCustom_CreateParams::m_batchSize
guint m_batchSize
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:41
Property::key
std::string key
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:49
IDSCustomLibrary::SetInitParams
virtual bool SetInitParams(DSCustom_CreateParams *params)=0
BufferResult
BufferResult
Copyright (c) 2023, NVIDIA CORPORATION.
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:32
Property::value
std::string value
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:50
IDSCustomLibrary
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:53
IDSCustomLibrary::SetProperty
virtual bool SetProperty(Property &prop)=0
DSCustom_CreateParams::m_inCaps
GstCaps * m_inCaps
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:38
Property
Definition: gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:43
DSCustom_CreateParams::m_outCaps
GstCaps * m_outCaps
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:39
DSCustom_CreateParams::m_gpuId
guint m_gpuId
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:40
IDSCustomLibrary::HandleEvent
virtual bool HandleEvent(GstEvent *event)=0
Property::Property
Property(std::string arg_key, std::string arg_value)
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:46
IDSCustomLibrary::~IDSCustomLibrary
virtual ~IDSCustomLibrary()
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:63
GstBuffer
struct _GstBuffer GstBuffer
Definition: idatatype.h:19
DSCustom_CreateParams::m_element
GstBaseTransform * m_element
Definition: gst-nvdsaudiotemplate/common/nvdscustomlib_interface.hpp:37
IDSCustomLibrary::GetCompatibleCaps
virtual GstCaps * GetCompatibleCaps(GstPadDirection direction, GstCaps *in_caps, GstCaps *othercaps)=0
BufferResult::Buffer_Error
@ Buffer_Error
BufferResult::Buffer_Ok
@ Buffer_Ok
IDSCustomLibrary::QueryProperties
virtual char * QueryProperties()=0