NVIDIA DeepStream SDK API Reference

6.2 Release
infer_custom_process.h
Go to the documentation of this file.
1 
12 #ifndef __NVDSINFERSERVER_CUSTOM_PROCESSOR_H__
13 #define __NVDSINFERSERVER_CUSTOM_PROCESSOR_H__
14 
15 #include <infer_datatypes.h>
16 
17 #include <condition_variable>
18 #include <functional>
19 #include <list>
20 #include <memory>
21 #include <queue>
22 
23 namespace nvdsinferserver {
24 
34 public:
37  virtual ~IInferCustomProcessor() = default;
38 
46  virtual void supportInputMemType(InferMemType& type) { type = InferMemType::kCpu; }
47 
56  virtual bool requireInferLoop() const { return false; }
57 
74  const std::vector<IBatchBuffer*>& primaryInputs, std::vector<IBatchBuffer*>& extraInputs,
75  const IOptions* options) = 0;
76 
91  const IBatchArray* outputs, const IOptions* inOptions) = 0;
92 
98  virtual void notifyError(NvDsInferStatus status) = 0;
99 };
100 
101 } // namespace nvdsinferserver
102 
103 extern "C" {
104 
112 typedef nvdsinferserver::IInferCustomProcessor* (*CreateCustomProcessorFunc)(
113  const char* config, uint32_t configLen);
114 }
115 
116 #endif
nvdsinferserver::IInferCustomProcessor
Interface of Custom processor which is created and loaded at runtime through CreateCustomProcessorFun...
Definition: infer_custom_process.h:33
nvdsinferserver
Copyright (c) 2021, NVIDIA CORPORATION.
Definition: infer_custom_process.h:23
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:56
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:46
nvdsinferserver::IOptions
Definition: infer_ioptions.h:53
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:227
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:217