NVIDIA DeepStream SDK API Reference
6.4 Release
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp
Go to the documentation of this file.
1
23
#ifndef __NVDS_SPEECH_CUSTOMLIB_INTERFACE_HPP__
24
#define __NVDS_SPEECH_CUSTOMLIB_INTERFACE_HPP__
25
26
#include <gst/base/gstbasetransform.h>
27
#include <gst/gstbuffer.h>
28
#include <string>
29
30
#define NVDS_CONFIG_FILE_PROPERTY "config-file"
31
32
namespace
nvdsspeech
{
33
34
enum class
BufferResult
{
35
Buffer_Ok
,
// Push the buffer from submit_input function
36
Buffer_Drop
,
// Drop the buffer inside submit_input function
37
Buffer_Async
,
// Return from submit_input function, custom lib to push the
38
// buffer
39
Buffer_Error
// Error occured
40
};
41
42
struct
DSCustom_CreateParams
{
43
GstBaseTransform*
m_element
;
44
GstCaps*
m_inCaps
;
45
GstCaps*
m_outCaps
;
46
};
47
48
struct
Property
{
49
Property
(std::string arg_key, std::string arg_value)
50
:
key
(arg_key),
value
(arg_value)
51
{
52
}
53
54
std::string
key
;
55
std::string
value
;
56
};
57
58
enum class
CapsType
: int {
59
kNone
= 0,
60
kAudio
,
61
kText
,
62
};
63
64
class
IDSCustomLibrary
{
65
public
:
66
virtual
bool
SetProperty
(
const
Property
& prop) = 0;
67
virtual
bool
Initialize
() = 0;
68
virtual
GstCaps*
GetCompatibleCaps
(
69
GstPadDirection direction, GstCaps* in_caps, GstCaps* othercaps) = 0;
70
virtual
bool
StartWithParams
(
DSCustom_CreateParams
* params) = 0;
71
virtual
bool
HandleEvent
(GstEvent* event) = 0;
72
virtual
BufferResult
ProcessBuffer
(
GstBuffer
* inbuf) = 0;
73
virtual
~IDSCustomLibrary
(){};
74
};
75
76
}
// namespace nvdsspeech
77
78
#endif
nvdsspeech::CapsType::kText
@ kText
nvdsspeech::DSCustom_CreateParams::m_outCaps
GstCaps * m_outCaps
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:45
nvdsspeech::BufferResult
BufferResult
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:34
nvdsspeech::IDSCustomLibrary::Initialize
virtual bool Initialize()=0
nvdsspeech::Property
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:48
nvdsspeech::BufferResult::Buffer_Error
@ Buffer_Error
nvdsspeech::IDSCustomLibrary::GetCompatibleCaps
virtual GstCaps * GetCompatibleCaps(GstPadDirection direction, GstCaps *in_caps, GstCaps *othercaps)=0
nvdsspeech::DSCustom_CreateParams::m_element
GstBaseTransform * m_element
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:43
nvdsspeech::IDSCustomLibrary::SetProperty
virtual bool SetProperty(const Property &prop)=0
nvdsspeech::DSCustom_CreateParams::m_inCaps
GstCaps * m_inCaps
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:44
nvdsspeech::CapsType
CapsType
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:58
nvdsspeech::IDSCustomLibrary::~IDSCustomLibrary
virtual ~IDSCustomLibrary()
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:73
nvdsspeech
Copyright (c) 2020-2021, NVIDIA CORPORATION.
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:32
nvdsspeech::IDSCustomLibrary
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:64
nvdsspeech::IDSCustomLibrary::StartWithParams
virtual bool StartWithParams(DSCustom_CreateParams *params)=0
nvdsspeech::Property::key
std::string key
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:54
nvdsspeech::BufferResult::Buffer_Ok
@ Buffer_Ok
nvdsspeech::IDSCustomLibrary::ProcessBuffer
virtual BufferResult ProcessBuffer(GstBuffer *inbuf)=0
nvdsspeech::BufferResult::Buffer_Async
@ Buffer_Async
nvdsspeech::Property::value
std::string value
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:55
nvdsspeech::CapsType::kNone
@ kNone
nvdsspeech::Property::Property
Property(std::string arg_key, std::string arg_value)
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:49
GstBuffer
struct _GstBuffer GstBuffer
Definition:
idatatype.h:19
nvdsspeech::CapsType::kAudio
@ kAudio
nvdsspeech::DSCustom_CreateParams
Definition:
gst-nvdsspeech/includes/nvdscustomlib_interface.hpp:42
nvdsspeech::IDSCustomLibrary::HandleEvent
virtual bool HandleEvent(GstEvent *event)=0
nvdsspeech::BufferResult::Buffer_Drop
@ Buffer_Drop
Advance Information | Subject to Change | Generated by NVIDIA | Mon Dec 11 2023 17:51:25 | PR-09318-R32