|
|
NVIDIA DeepStream SDK API Reference
|
9.2 Release
|
Go to the documentation of this file.
18 #ifndef __GST_NVINFERBASE_H__
19 #define __GST_NVINFERBASE_H__
21 #include <gst/base/gstbasetransform.h>
22 #include <gst/video/video.h>
23 #include <gst/audio/audio.h>
26 #include <unordered_map>
30 #include "cuda_runtime_api.h"
31 #include "nvbufsurftransform.h"
32 #include <nvdsinfer_context.h>
34 #include "gstnvdsinfer.h"
36 #include "gstnvdsmeta.h"
38 #include "nvtx3/nvToolsExt.h"
47 #define GST_TYPE_NVINFERBASE (gst_nvinferbase_get_type())
48 #define GST_NVINFERBASE(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVINFERBASE,GstNvInferBase))
49 #define GST_NVINFERBASE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVINFERBASE,GstNvInferBaseClass))
50 #define GST_NVINFERBASE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_NVINFERBASE, GstNvInferBaseClass))
51 #define GST_IS_NVINFERBASE(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVINFERBASE))
52 #define GST_IS_NVINFERBASE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVINFERBASE))
53 #define GST_NVINFERBASE_CAST(obj) ((GstNvInferBase *)(obj))
guint gst_nvinfer_signals[LAST_SIGNAL]
gboolean(* parse_other_groups)(GstNvInferBase *base, GKeyFile *key_file, NvDsInferContextInitParams *init_params)
@ PROP_FILTER_OUT_CLASS_IDS
GstBaseTransform base_trans
Should be the first member when extending from GstBaseTransform.
gst_nvinfer_raw_output_generated_callback output_generated_callback
Pointer to the callback function and userdata for application access to the bound buffer contents.
NvDsInferFormat
Defines color formats.
gchar * config_file_path
Path to the configuration file for this instance of gst-nvinfer.
void gst_nvinfer_push_to_input_queue(GstNvInferBase *nvinfer, GstNvInferBatch *batch)
gboolean(* get_classifier_async_mode)(GstNvInferBase *base)
guint unique_id
Unique ID of the element.
@ PROP_OUTPUT_TENSOR_META
@ PROP_OUTPUT_CALLBACK_USERDATA
GstFlowReturn(* process_input)(GstNvInferBase *base, GstBuffer *inbuf)
void(* finalize)(GObject *object)
typedefG_BEGIN_DECLS struct _GstNvInferBase GstNvInferBase
guint max_batch_size
Maximum batch size.
GstNvInferBase element structure.
gboolean output_tensor_meta
Boolean indicating if tensor outputs should be attached as meta on GstBuffers.
std::vector< NvDsInferLayerInfo > * output_layers_info
Vector of bound output layers information.
gboolean stop
Boolean to signal output thread to stop.
std::vector< NvDsInferLayerInfo > * layers_info
Vector of bound layers information.
struct _GstBuffer GstBuffer
gboolean(* parse_other_attributes)(GstNvInferBase *base, GKeyFile *key_file, const gchar *group_name, const gchar *key)
guint64 file_write_batch_num
Batch counter for writing buffer contents to file.
void(* clear_history)(GstNvInferBase *base)
GType gst_nvinferbase_get_type(void)
gboolean(* process_output)(GstNvInferBase *base, GstNvInferBatch *batch, NvDsInferContextBatchOutput *batch_output, GstMiniObject *tensor_out_object)
void(* model_updated)(GstNvInferBase *, gint err, const gchar *cfg_file)
Signals.
GstFlowReturn last_flow_ret
GstFlowReturn returned by the latest buffer pad push.
Holds information about the model network.
Holds information about the batch of frames to be inferred.
gboolean write_raw_buffers_to_file
Boolean indicating if the bound buffer contents should be written to file.
NvDsInferFormat(* get_input_format)(GstNvInferBase *base, GstNvInferBatch *batch)
GThread * output_thread
Output thread.
NvDsInferFormat(* get_default_infer_format)(GstNvInferBase *base)
@ PROP_OPERATE_ON_CLASS_IDS
const gchar * classifier_type
nvtxDomainHandle_t nvtx_domain
NVTX Domain.
Holds the initialization parameters required for the NvDsInferContext interface.
GQueue * process_queue
Processing Queue and related synchronization structures.
gboolean(* start)(GstNvInferBase *base, NvDsInferContextInitParams *init_params)
gboolean config_file_parse_successful
Boolean indicating if the config parsing was successful.
void(* attach_previous_metadata)(GstNvInferBase *base, GstNvInferBatch *batch)
guint gpu_id
ID of the GPU this element uses for conversions / inference.
std::vector< gboolean > * is_prop_set
Vector of booleans indicating if properties have been set through GObject set method.
gint network_width
Network input resolution.
Holds the output for all of the frames in a batch (an array of frame), and related buffer information...
G_BEGIN_DECLS typedef void(* gst_nvinfer_raw_output_generated_callback)(GstBuffer *buf, NvDsInferNetworkInfo *network_info, NvDsInferLayerInfo *layers_info, guint num_layers, guint batch_size, gpointer user_data)
Function definition for the inference raw output generated callback of Gst-NvInfer plugin.
gboolean(* set_caps)(GstNvInferBase *base, GstCaps *incaps, GstCaps *outcaps)
@ PROP_OUTPUT_WRITE_TO_FILE
unsigned int(* get_output_buffer_pool_size)(GstNvInferBase *base)
gulong current_batch_num
Current batch number of the input batch.
gpointer output_generated_userdata
GstBaseTransformClass parent_class
gboolean(* sink_event)(GstNvInferBase *base, GstEvent *event)
NvDsInferNetworkInfo network_info
Network input information.
unsigned int(* get_input_pitch)(GstNvInferBase *base, GstNvInferBatch *batch)
void(* stop)(GstNvInferBase *base)
GThread * input_queue_thread
struct _GstNvInferImpl GstNvInferImpl