NVIDIA DeepStream SDK API Reference
7.1 Release
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp
Go to the documentation of this file.
1
/*
2
* SPDX-FileCopyrightText: Copyright (c) 2023 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 __NVDSCUSTOMLIB_INTERFACE_HPP__
14
#define __NVDSCUSTOMLIB_INTERFACE_HPP__
15
16
#include <string>
17
#include <gst/gstbuffer.h>
18
#include <cuda_runtime.h>
19
#include "../gstaudio2video.h"
20
#include <gst/video/video.h>
21
22
enum class
BufferResult
{
23
Buffer_Ok
,
// Push the buffer from submit_input function
24
Buffer_Drop
,
// Drop the buffer inside submit_input function
25
Buffer_Async
,
// Return from submit_input function, custom lib to push the buffer
26
Buffer_Error
// Error occured
27
};
28
29
struct
DSCustom_CreateParams
{
30
GstElement *
m_element
;
31
};
32
33
struct
Property
34
{
35
Property
(std::string arg_key, std::string arg_value) :
key
(arg_key),
value
(arg_value)
36
{
37
}
38
39
std::string
key
;
40
std::string
value
;
41
};
42
43
class
IDSCustomLibrary
44
{
45
public
:
46
virtual
bool
SetInitParams
(
DSCustom_CreateParams
*params) = 0;
47
virtual
bool
SetProperty
(
Property
&prop) = 0;
48
virtual
bool
HandleEvent
(GstEvent *event) = 0;
49
virtual
BufferResult
ProcessBuffer
(
GstAudio2Video
* base,
GstBuffer
* audio, GstVideoFrame * video) = 0;
50
virtual
char
*
QueryProperties
() = 0;
51
virtual
~IDSCustomLibrary
() {};
52
};
53
54
#endif
DSCustom_CreateParams
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:29
BufferResult::Buffer_Async
@ Buffer_Async
BufferResult::Buffer_Drop
@ Buffer_Drop
IDSCustomLibrary::ProcessBuffer
virtual BufferResult ProcessBuffer(GstAudio2Video *base, GstBuffer *audio, GstVideoFrame *video)=0
Property::key
std::string key
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:39
IDSCustomLibrary::SetInitParams
virtual bool SetInitParams(DSCustom_CreateParams *params)=0
BufferResult
BufferResult
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:22
Property::value
std::string value
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:40
DSCustom_CreateParams::m_element
GstElement * m_element
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:30
IDSCustomLibrary
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:43
IDSCustomLibrary::SetProperty
virtual bool SetProperty(Property &prop)=0
Property
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:33
IDSCustomLibrary::HandleEvent
virtual bool HandleEvent(GstEvent *event)=0
Property::Property
Property(std::string arg_key, std::string arg_value)
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:35
IDSCustomLibrary::~IDSCustomLibrary
virtual ~IDSCustomLibrary()
Definition:
gst-nvdsA2Vtemplate/includes/nvdscustomlib_interface.hpp:51
GstBuffer
struct _GstBuffer GstBuffer
Definition:
idatatype.h:19
BufferResult::Buffer_Error
@ Buffer_Error
BufferResult::Buffer_Ok
@ Buffer_Ok
IDSCustomLibrary::QueryProperties
virtual char * QueryProperties()=0
_GstAudio2Video
Definition:
gstaudio2video.h:33
Advance Information | Subject to Change | Generated by NVIDIA | Mon Oct 14 2024 13:27:45 | PR-09318-R32