NVIDIA DeepStream SDK API Reference

7.0 Release
infer_custom_process.h
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 __NVDSINFERSERVER_CUSTOM_PROCESSOR_H__
14 #define __NVDSINFERSERVER_CUSTOM_PROCESSOR_H__
15 
16 #include <infer_datatypes.h>
17 
18 #include <condition_variable>
19 #include <functional>
20 #include <list>
21 #include <memory>
22 #include <queue>
23 
24 namespace nvdsinferserver {
25 
35 public:
38  virtual ~IInferCustomProcessor() = default;
39 
47  virtual void supportInputMemType(InferMemType& type) { type = InferMemType::kCpu; }
48 
57  virtual bool requireInferLoop() const { return false; }
58 
75  const std::vector<IBatchBuffer*>& primaryInputs, std::vector<IBatchBuffer*>& extraInputs,
76  const IOptions* options) = 0;
77 
92  const IBatchArray* outputs, const IOptions* inOptions) = 0;
93 
99  virtual void notifyError(NvDsInferStatus status) = 0;
100 };
101 
102 } // namespace nvdsinferserver
103 
104 extern "C" {
105 
113 typedef nvdsinferserver::IInferCustomProcessor* (*CreateCustomProcessorFunc)(
114  const char* config, uint32_t configLen);
115 }
116 
117 #endif
nvdsinferserver::IInferCustomProcessor
Interface of Custom processor which is created and loaded at runtime through CreateCustomProcessorFun...
Definition: infer_custom_process.h:34
nvdsinferserver
This is a header file for pre-processing cuda kernels with normalization and mean subtraction require...
Definition: infer_custom_process.h:24
nvdsinferserver::IInferCustomProcessor::inferenceDone
virtual NvDsInferStatus inferenceDone(const IBatchArray *outputs, const IOptions *inOptions)=0
Inference done callback for custom postpocessing.
infer_datatypes.h
Header file for the data types used in the inference processing.
nvdsinferserver::IInferCustomProcessor::requireInferLoop
virtual bool requireInferLoop() const
Indicate whether this custom processor requires inference loop, in which nvdsinferserver lib guarante...
Definition: infer_custom_process.h:57
nvdsinferserver::IInferCustomProcessor::notifyError
virtual void notifyError(NvDsInferStatus status)=0
Notification of an error to the interface implementation.
nvdsinferserver::IInferCustomProcessor::supportInputMemType
virtual void supportInputMemType(InferMemType &type)
Query the memory type, extraInputProcess() implementation supports.
Definition: infer_custom_process.h:47
nvdsinferserver::IOptions
Definition: infer_ioptions.h:54
nvdsinferserver::InferMemType
InferMemType
The memory types of inference buffers.
Definition: infer_datatypes.h:56
nvdsinferserver::IInferCustomProcessor::~IInferCustomProcessor
virtual ~IInferCustomProcessor()=default
IInferCustomProcessor will be deleted by nvdsinferserver lib.
nvdsinferserver::InferMemType::kCpu
@ kCpu
Host (CPU) memory.
nvdsinferserver::IBatchArray
Interface class for an array of batch buffers.
Definition: infer_datatypes.h:228
nvdsinferserver::IInferCustomProcessor::extraInputProcess
virtual NvDsInferStatus extraInputProcess(const std::vector< IBatchBuffer * > &primaryInputs, std::vector< IBatchBuffer * > &extraInputs, const IOptions *options)=0
Custom processor for extra input data.
NvDsInferStatus
NvDsInferStatus
Enum for the status codes returned by NvDsInferContext.
Definition: nvdsinfer.h:218