NVIDIA DeepStream SDK API Reference

9.1 Release
sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #ifndef __NVDSPOSTPROCESSLIB_INTERFACE_HPP__
19 #define __NVDSPOSTPROCESSLIB_INTERFACE_HPP__
20 
21 #include <string>
22 #include <gst/gstbuffer.h>
23 
24 enum class BufferResult {
25  Buffer_Ok, // Push the buffer from submit_input function
26  Buffer_Drop, // Drop the buffer inside submit_input function
27  Buffer_Async, // Return from submit_input function, postprocess lib to push the buffer
28  Buffer_Error // Error occured
29 };
30 
32  GstBaseTransform *m_element;
33  guint m_gpuId;
36 };
37 
38 struct Property
39 {
40  Property(std::string arg_key, std::string arg_value) : key(arg_key), value(arg_value)
41  {
42  }
43 
44  std::string key;
45  std::string value;
46 };
47 
49 {
50 public:
51  virtual bool HandleEvent (GstEvent *event) = 0;
52  virtual bool SetConfigFile (const gchar *config_file) = 0;
53  virtual BufferResult ProcessBuffer (GstBuffer *inbuf) = 0;
54  virtual ~IDSPostProcessLibrary() {};
55 };
56 
57 #endif
cudaStream_t
struct CUstream_st * cudaStream_t
Forward declaration of cudaStream_t.
Definition: sources/includes/nvbufsurftransform.h:35
IDSPostProcessLibrary
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:48
Property::key
std::string key
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:44
Property::value
std::string value
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:45
BufferResult::Buffer_Ok
@ Buffer_Ok
IDSPostProcessLibrary::SetConfigFile
virtual bool SetConfigFile(const gchar *config_file)=0
IDSPostProcessLibrary::ProcessBuffer
virtual BufferResult ProcessBuffer(GstBuffer *inbuf)=0
DSPostProcess_CreateParams::m_gpuId
guint m_gpuId
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:33
IDSPostProcessLibrary::~IDSPostProcessLibrary
virtual ~IDSPostProcessLibrary()
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:54
DSPostProcess_CreateParams::m_cudaStream
cudaStream_t m_cudaStream
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:34
DSPostProcess_CreateParams::m_preprocessor_support
bool m_preprocessor_support
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:35
Property
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:38
DSPostProcess_CreateParams
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:31
Property::Property
Property(std::string arg_key, std::string arg_value)
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:40
BufferResult::Buffer_Error
@ Buffer_Error
BufferResult::Buffer_Async
@ Buffer_Async
IDSPostProcessLibrary::HandleEvent
virtual bool HandleEvent(GstEvent *event)=0
DSPostProcess_CreateParams::m_element
GstBaseTransform * m_element
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:32
BufferResult::Buffer_Drop
@ Buffer_Drop
GstBuffer
struct _GstBuffer GstBuffer
Definition: sources/includes/ds3d/common/idatatype.h:24
BufferResult
BufferResult
Definition: sources/gst-plugins/gst-nvdspostprocess/includes/nvdspostprocesslib_interface.hpp:24