NVIDIA DeepStream SDK API Reference
7.1 Release
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2021 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3
* SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4
*
5
* NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6
* property and proprietary rights in and to this material, related
7
* documentation and any modifications thereto. Any use, reproduction,
8
* disclosure or distribution of this material and related documentation
9
* without an express license agreement from NVIDIA CORPORATION or
10
* its affiliates is strictly prohibited.
11
*/
12
13
#ifndef __NVDS_TTS_CUSTOMLIB_BASE_HPP__
14
#define __NVDS_TTS_CUSTOMLIB_BASE_HPP__
15
16
#include <gst/audio/audio.h>
17
#include <gst/base/gstbasetransform.h>
18
19
#include "
nvdscustomlib_interface.hpp
"
20
21
22
namespace
nvdstts
{
23
24
class
DSCustomLibraryBase
:
public
IDSCustomLibrary
{
25
public
:
26
DSCustomLibraryBase
() =
default
;
27
virtual
~DSCustomLibraryBase
()
override
;
28
29
bool
Initialize
()
override
;
30
31
/* Set Init Parameters */
32
bool
StartWithParams
(
DSCustom_CreateParams
* params)
override
;
33
34
/* Set Each Property */
35
bool
SetProperty
(
const
Property
& prop)
override
;
36
37
/* Get Compatible Input/Output Caps */
38
GstCaps*
GetCompatibleCaps
(
39
GstPadDirection direction, GstCaps* inCaps,
40
GstCaps* otherCaps)
override
;
41
42
/* Handle event, e.g. EOS... */
43
bool
HandleEvent
(GstEvent* event)
override
{
return
true
; }
44
45
/* Process Input Buffer */
46
BufferResult
ProcessBuffer
(
GstBuffer
* inbuf)
override
= 0;
47
48
protected
:
49
/* Gstreamer dstts plugin's base class reference */
50
GstBaseTransform*
m_element
{
nullptr
};
51
/* Gst Caps Information */
52
GstCaps*
m_inCaps
{
nullptr
};
53
GstCaps*
m_outCaps
{
nullptr
};
54
std::string
m_configFile
;
55
56
/* Audio Information */
57
/* Output Information */
58
CapsType
m_OutType
=
CapsType::kNone
;
59
GstAudioInfo
m_outAudioInfo
{
nullptr
, GST_AUDIO_FLAG_NONE};
60
GstAudioFormat
m_outAudioFmt
= GST_AUDIO_FORMAT_UNKNOWN;
61
};
62
63
}
// namespace nvdstts
64
65
#endif
nvdstts::IDSCustomLibrary
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:54
nvdstts::DSCustomLibraryBase::StartWithParams
bool StartWithParams(DSCustom_CreateParams *params) override
nvdstts::DSCustomLibraryBase::m_element
GstBaseTransform * m_element
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:50
nvdstts::Property
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:38
nvdstts::DSCustomLibraryBase::HandleEvent
bool HandleEvent(GstEvent *event) override
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:43
nvdstts::CapsType
CapsType
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:48
nvdstts::DSCustomLibraryBase::SetProperty
bool SetProperty(const Property &prop) override
nvdstts::DSCustomLibraryBase::ProcessBuffer
BufferResult ProcessBuffer(GstBuffer *inbuf) override=0
nvdstts::DSCustomLibraryBase::GetCompatibleCaps
GstCaps * GetCompatibleCaps(GstPadDirection direction, GstCaps *inCaps, GstCaps *otherCaps) override
nvdscustomlib_interface.hpp
nvdstts::CapsType::kNone
@ kNone
nvdstts::BufferResult
BufferResult
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:24
nvdstts::DSCustomLibraryBase
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:24
nvdstts::DSCustomLibraryBase::DSCustomLibraryBase
DSCustomLibraryBase()=default
nvdstts::DSCustomLibraryBase::m_outAudioInfo
GstAudioInfo m_outAudioInfo
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:59
nvdstts::DSCustomLibraryBase::~DSCustomLibraryBase
virtual ~DSCustomLibraryBase() override
nvdstts::DSCustomLibraryBase::m_OutType
CapsType m_OutType
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:58
nvdstts
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_factory.h:24
nvdstts::DSCustomLibraryBase::m_outAudioFmt
GstAudioFormat m_outAudioFmt
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:60
GstBuffer
struct _GstBuffer GstBuffer
Definition:
idatatype.h:19
nvdstts::DSCustomLibraryBase::Initialize
bool Initialize() override
nvdstts::DSCustomLibraryBase::m_configFile
std::string m_configFile
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:54
nvdstts::DSCustomLibraryBase::m_outCaps
GstCaps * m_outCaps
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:53
nvdstts::DSCustomLibraryBase::m_inCaps
GstCaps * m_inCaps
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_base.hpp:52
nvdstts::DSCustom_CreateParams
Definition:
gst-nvdstexttospeech/includes/nvdscustomlib_interface.hpp:32
Advance Information | Subject to Change | Generated by NVIDIA | Mon Oct 14 2024 13:27:45 | PR-09318-R32