NVIDIA DeepStream SDK API Reference
6.4 Release
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp
Go to the documentation of this file.
1
23
#ifndef __NVDS_TTS_CUSTOMLIB_INTERFACE_HPP__
24
#define __NVDS_TTS_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
nvdstts
{
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 nvdstts
77
78
#endif
nvdstts::IDSCustomLibrary
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:64
nvdstts::CapsType::kAudio
@ kAudio
nvdstts::DSCustom_CreateParams::m_inCaps
GstCaps * m_inCaps
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:44
nvdstts::IDSCustomLibrary::Initialize
virtual bool Initialize()=0
nvdstts::IDSCustomLibrary::SetProperty
virtual bool SetProperty(const Property &prop)=0
nvdstts::BufferResult::Buffer_Drop
@ Buffer_Drop
nvdstts::Property
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:48
nvdstts::DSCustom_CreateParams::m_outCaps
GstCaps * m_outCaps
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:45
nvdstts::CapsType
CapsType
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:58
nvdstts::BufferResult::Buffer_Ok
@ Buffer_Ok
nvdstts::Property::value
std::string value
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:55
nvdstts::CapsType::kNone
@ kNone
nvdstts::BufferResult
BufferResult
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:34
nvdstts::DSCustom_CreateParams::m_element
GstBaseTransform * m_element
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:43
nvdstts::BufferResult::Buffer_Error
@ Buffer_Error
nvdstts::IDSCustomLibrary::HandleEvent
virtual bool HandleEvent(GstEvent *event)=0
nvdstts::CapsType::kText
@ kText
nvdstts
Copyright (c) 2021, NVIDIA CORPORATION.
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_factory.h:34
nvdstts::IDSCustomLibrary::GetCompatibleCaps
virtual GstCaps * GetCompatibleCaps(GstPadDirection direction, GstCaps *in_caps, GstCaps *othercaps)=0
nvdstts::IDSCustomLibrary::~IDSCustomLibrary
virtual ~IDSCustomLibrary()
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:73
nvdstts::IDSCustomLibrary::StartWithParams
virtual bool StartWithParams(DSCustom_CreateParams *params)=0
GstBuffer
struct _GstBuffer GstBuffer
Definition:
idatatype.h:19
nvdstts::IDSCustomLibrary::ProcessBuffer
virtual BufferResult ProcessBuffer(GstBuffer *inbuf)=0
nvdstts::Property::key
std::string key
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:54
nvdstts::Property::Property
Property(std::string arg_key, std::string arg_value)
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:49
nvdstts::BufferResult::Buffer_Async
@ Buffer_Async
nvdstts::DSCustom_CreateParams
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:42
Advance Information | Subject to Change | Generated by NVIDIA | Mon Dec 11 2023 17:51:25 | PR-09318-R32