NVIDIA DeepStream SDK API Reference

6.4 Release
gstnvinferserver::GstNvInferServerImpl Class Reference

Detailed Description

Class of the nvinferserver element implementation.

Definition at line 142 of file gstnvinferserver_impl.h.

Collaboration diagram for gstnvinferserver::GstNvInferServerImpl:

Public Member Functions

 GstNvInferServerImpl (GstNvInferServer *infer)
 Constructor, registers the handle of the parent GStreamer element. More...
 
 ~GstNvInferServerImpl ()
 Constructor, do nothing. More...
 
void setRawoutputCb (RawOutputCallback cb)
 Saves the callback function pointer for the raw tensor output. More...
 
NvDsInferStatus start ()
 Reads the configuration file and sets up processing context. More...
 
NvDsInferStatus stop ()
 Deletes the inference context. More...
 
NvDsInferStatus processBatchMeta (NvDsBatchMeta *batchMeta, NvBufSurface *inSurf, uint64_t seqId, void *gstBuf)
 Submits the input batch for inference. More...
 
NvDsInferStatus sync ()
 Waits for the output thread to finish processing queued operations. More...
 
NvDsInferStatus queueOperation (FuncItem func)
 Queues the inference done operation for the request to the output thread. More...
 
bool addTrackingSource (uint32_t sourceId)
 Add a new source to the object history structure. More...
 
void eraseTrackingSource (uint32_t sourceId)
 Removes a source from the object history structure. More...
 
void resetIntervalCounter ()
 Resets the inference interval used in frame process mode to 0. More...
 
uint32_t uniqueId () const
 
const std::string & classifierType () const
 
uint32_t maxBatchSize () const
 
nvtxDomainHandle_t nvtxDomain ()
 
bool isAsyncMode () const
 
bool canSupportGpu (int gpuId) const
 
NvDsInferStatus lastError () const
 
const ic::PluginControl & config () const
 
void updateInterval (guint interval)
 

Data Fields

GstNvInferServerProperties m_GstProperties
 

Constructor & Destructor Documentation

◆ GstNvInferServerImpl()

gstnvinferserver::GstNvInferServerImpl::GstNvInferServerImpl ( GstNvInferServer infer)

Constructor, registers the handle of the parent GStreamer element.

Parameters
[in]inferPointer to the nvinferserver GStreamer element.

◆ ~GstNvInferServerImpl()

gstnvinferserver::GstNvInferServerImpl::~GstNvInferServerImpl ( )

Constructor, do nothing.

Member Function Documentation

◆ addTrackingSource()

bool gstnvinferserver::GstNvInferServerImpl::addTrackingSource ( uint32_t  sourceId)

Add a new source to the object history structure.

Whenever a new source is added to the pipeline, corresponding source ID is captured in the GStreamer event on the sink pad and the object history for this source is initialized.

Parameters
[in]idSource ID.

◆ canSupportGpu()

bool gstnvinferserver::GstNvInferServerImpl::canSupportGpu ( int  gpuId) const

◆ classifierType()

const std::string& gstnvinferserver::GstNvInferServerImpl::classifierType ( ) const
inline

◆ config()

const ic::PluginControl& gstnvinferserver::GstNvInferServerImpl::config ( ) const
inline

Definition at line 357 of file gstnvinferserver_impl.h.

◆ eraseTrackingSource()

void gstnvinferserver::GstNvInferServerImpl::eraseTrackingSource ( uint32_t  sourceId)

Removes a source from the object history structure.

Whenever a source is removed from the pipeline, corresponding source ID is captured in the GStreamer event on the sink pad and the object history for this source is deleted.

Parameters
[in]idSource ID.

◆ isAsyncMode()

bool gstnvinferserver::GstNvInferServerImpl::isAsyncMode ( ) const

◆ lastError()

NvDsInferStatus gstnvinferserver::GstNvInferServerImpl::lastError ( ) const

◆ maxBatchSize()

uint32_t gstnvinferserver::GstNvInferServerImpl::maxBatchSize ( ) const

◆ nvtxDomain()

nvtxDomainHandle_t gstnvinferserver::GstNvInferServerImpl::nvtxDomain ( )
inline

Definition at line 351 of file gstnvinferserver_impl.h.

◆ processBatchMeta()

NvDsInferStatus gstnvinferserver::GstNvInferServerImpl::processBatchMeta ( NvDsBatchMeta batchMeta,
NvBufSurface inSurf,
uint64_t  seqId,
void *  gstBuf 
)

Submits the input batch for inference.

This function submits the input batch buffer for inferencing as per the configured processing mode: full frame inference, inference on detected objects or inference on attached input tensors.

Parameters
[in,out]batchMetaNvDsBatchMeta associated with the input buffer.
[in]inSurfInput batch buffer.
[in]seqIdThe sequence number of the input batch.
[in]gstBufPointer to the input GStreamer buffer.

◆ queueOperation()

NvDsInferStatus gstnvinferserver::GstNvInferServerImpl::queueOperation ( FuncItem  func)

Queues the inference done operation for the request to the output thread.

◆ resetIntervalCounter()

void gstnvinferserver::GstNvInferServerImpl::resetIntervalCounter ( )

Resets the inference interval used in frame process mode to 0.

◆ setRawoutputCb()

void gstnvinferserver::GstNvInferServerImpl::setRawoutputCb ( RawOutputCallback  cb)
inline

Saves the callback function pointer for the raw tensor output.

Parameters
[in]cbPointer to the callback function.

Definition at line 264 of file gstnvinferserver_impl.h.

◆ start()

NvDsInferStatus gstnvinferserver::GstNvInferServerImpl::start ( )

Reads the configuration file and sets up processing context.

This function reads the configuration file and validates the user provided configuration. Configuration file settings are overridden with those set by element properties. It then creates the inference context, initializes it and starts the output thread. The inference context is either InferGrpcContext (Triton Inference Server in gRPC mode) or InferTrtISContext (Triton Inference server C-API mode) depending on the configuration setting. Object history is initialized for source 0.

◆ stop()

NvDsInferStatus gstnvinferserver::GstNvInferServerImpl::stop ( )

Deletes the inference context.

This function waits for the output thread to finish and then de-initializes the inference context. The object history is cleared.

◆ sync()

NvDsInferStatus gstnvinferserver::GstNvInferServerImpl::sync ( )

Waits for the output thread to finish processing queued operations.

◆ uniqueId()

uint32_t gstnvinferserver::GstNvInferServerImpl::uniqueId ( ) const
inline

◆ updateInterval()

void gstnvinferserver::GstNvInferServerImpl::updateInterval ( guint  interval)
inline

Definition at line 358 of file gstnvinferserver_impl.h.

Field Documentation

◆ m_GstProperties

GstNvInferServerProperties gstnvinferserver::GstNvInferServerImpl::m_GstProperties

Definition at line 548 of file gstnvinferserver_impl.h.

Referenced by classifierType(), and uniqueId().


The documentation for this class was generated from the following file: