NVIDIA DeepStream SDK API Reference

6.4 Release
infer_custom_process.h
Go to the documentation of this file.
1 
17 #ifndef __NVDSINFERSERVER_CUSTOM_PROCESSOR_H__
18 #define __NVDSINFERSERVER_CUSTOM_PROCESSOR_H__
19 
20 #include <infer_datatypes.h>
21 
22 #include <condition_variable>
23 #include <functional>
24 #include <list>
25 #include <memory>
26 #include <queue>
27 
28 namespace nvdsinferserver {
29 
39 public:
42  virtual ~IInferCustomProcessor() = default;
43 
51  virtual void supportInputMemType(InferMemType& type) { type = InferMemType::kCpu; }
52 
61  virtual bool requireInferLoop() const { return false; }
62 
79  const std::vector<IBatchBuffer*>& primaryInputs, std::vector<IBatchBuffer*>& extraInputs,
80  const IOptions* options) = 0;
81 
96  const IBatchArray* outputs, const IOptions* inOptions) = 0;
97 
103  virtual void notifyError(NvDsInferStatus status) = 0;
104 };
105 
106 } // namespace nvdsinferserver
107 
108 extern "C" {
109 
117 typedef nvdsinferserver::IInferCustomProcessor* (*CreateCustomProcessorFunc)(
118  const char* config, uint32_t configLen);
119 }
120 
121 #endif
122 
nvdsinferserver::IInferCustomProcessor
Interface of Custom processor which is created and loaded at runtime through CreateCustomProcessorFun...
Definition: infer_custom_process.h:38
nvdsinferserver
Copyright (c) 2021, NVIDIA CORPORATION.
Definition: infer_custom_process.h:28
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:61
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:51
nvdsinferserver::IOptions
Definition: infer_ioptions.h:57
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