|
NVIDIA DeepStream SDK API Reference
|
6.4 Release
|
Go to the documentation of this file.
23 #ifndef __GST_NVDSPREPROCESS_H__
24 #define __GST_NVDSPREPROCESS_H__
26 #include <gst/base/gstbasetransform.h>
27 #include <gst/video/video.h>
30 #include <cuda_runtime.h>
36 #include "nvdspreprocess_interface.h"
37 #include "nvdspreprocess_meta.h"
39 #include "nvtx3/nvToolsExt.h"
41 #include <condition_variable>
44 #include <unordered_map>
48 #define PACKAGE "nvdsvideotemplate"
50 #define LICENSE "Proprietary"
51 #define DESCRIPTION "NVIDIA custom preprocessing plugin for integration with DeepStream on DGPU/Jetson"
52 #define BINARY_PACKAGE "NVIDIA DeepStream Preprocessing using custom algorithms for different streams"
53 #define URL "http://nvidia.com/"
61 #define GST_TYPE_NVDSPREPROCESS (gst_nvdspreprocess_get_type())
62 #define GST_NVDSPREPROCESS(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVDSPREPROCESS,GstNvDsPreProcess))
63 #define GST_NVDSPREPROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVDSPREPROCESS,GstNvDsPreProcessClass))
64 #define GST_NVDSPREPROCESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GST_TYPE_NVDSPREPROCESS, GstNvDsPreProcessClass))
65 #define GST_IS_NVDSPREPROCESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVDSPREPROCESS))
66 #define GST_IS_NVDSPREPROCESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVDSPREPROCESS))
67 #define GST_NVDSPREPROCESS_CAST(obj) ((GstNvDsPreProcess *)(obj))
101 gboolean process_on_roi = 0;
104 gboolean process_on_all_objects = 0;
107 gboolean draw_roi = 0;
146 GstBufferPool *m_gstpool =
nullptr;
gboolean draw_roi
for config param : draw_roi
GstBuffer * gstbuf
Gst Buffer acquired from gst allocator.
For Acquiring/releasing buffer from buffer pool.
guint64 frame_num
Frame number of the current input buffer.
guint min_input_object_width
Input object size-based filtering parameters for object processing mode.
Custom Initialization parameter for custom library.
NvBufSurfTransformConfigParams transform_config_params
Config params required by NvBufSurfTransform API.
gboolean process_on_frame
Boolean indicating if processing on frame or already cropped objects should be processed.
NvDsPreProcessCustomBuf * acquire() override
override acquire method in plugin
gboolean max_input_object_height
for config param : input-object-max-height
gboolean stop
Boolean to signal output thread to stop.
struct NvBufSurfTransformSyncObj * NvBufSurfTransformSyncObj_t
Holds the information about synchronization objects for asynchronous transform/composite APIs.
guint unique_id
Unique ID of the element.
NvBufSurfTransformSyncObj_t sync_obj
sync object for async transformation
gboolean process_on_all_objects
for config param : process-on-all-objects
GstBaseTransform base_trans
Gst Base Transform.
gboolean processing_width
for config param : processsing-width
gboolean src_ids
for config param : src-ids
std::unique_ptr< NvDsPreProcessAcquirerImpl > acquire_impl
Class for acquiring/releasing buffer from tensor pool.
GstBufferPool * scaling_pool
Internal buffer pool for memory required for scaling input frames and cropping object.
std::vector< guint64 > target_unique_ids
Target unique ids.
gboolean scaling_pool_memory_type
for config param : scaling-pool-memory-type
gboolean symmetric_padding
Boolean to indicate symmetric padding.
gboolean custom_lib_path
for config param : custom-lib-path
gint operate_on_gie_id
Gie id to process.
Holds information about batched buffers.
Holds information about the batch of frames to be inferred.
std::string custom_tensor_function_name
custom tensor function name
gboolean network_input_order
for config param : network-input-order
std::unordered_map< gint, GstNvDsPreProcessFrame > framemeta_map
Map src_id - Preprocess Frame meta.
gboolean min_input_object_width
for config param : input-object-min-width
std::vector< NvDsRoiMeta > roi_vector
list of roi vectors per frame
GCond preprocess_cond
Gcondition for process queue.
gboolean maintain_aspect_ratio
Boolean to indicate maintain aspect ratio.
gboolean process_on_roi
for config param : process-on-rois
NvBufSurface batch_insurf
Temporary NvBufSurface for input to batched transformations.
std::vector< gint > src_ids
vector of src_ids
NvDsPreProcessTensorParams tensor_params
Parameters for tensor preparation.
NvBufSurface batch_outsurf
Temporary NvBufSurface for output from batched transformations.
guint gpu_id
GPU ID on which we expect to execute the task.
gchar * custom_lib_path
Custom Library Name.
guint meta_id
meta id for differentiating between multiple tensor meta from same gst buffer
gboolean scaling_pool_interpolation_filter
for config param : scaling-pool-interpolation-filter
NvDsPreProcessStatus
Enum for the status codes returned by NvDsPreProcessImpl.
std::vector< gint > operate_on_class_ids
vector of operate_on_class_ids for sgie
NvBufSurfTransform_Compute
Specifies compute devices used by NvBufSurfTransform.
NvBufSurfTransform_Inter scaling_pool_interpolation_filter
interpolation filter for transformation
gboolean processing_height
for config param : processsing-height
gboolean network_input_shape
for config param : network-input-shape
gulong current_batch_num
Current batch number of the input batch.
GstBufferPool * tensor_pool
Internal buffer pool for memory required for tensor preparation.
gboolean enable
if disabled plugin will work in passthrough mode
NvOSD_ColorParams roi_color
color of roi
guint num_units
total rois/full-frames in a group
GMutex framemeta_map_lock
Lock for framemeta_map.
CustomCtx * custom_lib_ctx
pointer to the custom lib ctx
gint processing_width
Resolution width at which roi/full-frames should be processed.
gboolean max_input_object_width
for config param : input-object-max-width
std::unordered_map< gint, gint > * src_to_group_map
Map src-id : preprocess-group-id.
guint tensor_buf_pool_size
tensor buffer pool size
typedefG_BEGIN_DECLS struct _GstNvDsPreProcess GstNvDsPreProcess
nvtxDomainHandle_t nvtx_domain
NVTX Domain.
NvDsPreProcessPropertySet property_set
struct denoting properties set by config file
struct denoting properties set by config file
Tensor params passed to custom library for tensor preparation.
NvBufSurfaceMemType scaling_pool_memory_type
scaling pool memory type
GMutex preprocess_lock
Processing Queue and related synchronization structures.
Custom Buffer passed to the custom lib for preparing tensor.
class for acquiring and releasing a buffer from tensor pool by custom lib.
guint max_input_object_width
std::function< NvDsPreProcessStatus(NvBufSurface *, NvBufSurface *, CustomTransformParams &)> custom_transform
wrapper to custom transformation function
NvBufSurfaceMemType
Specifies memory types for NvBufSurface.
guint replicated_src_id
src-id whose rois is used by all the src within the preprocess-group (when src-ids[0]=-1)
guint min_input_object_height
Strucuture containing Preprocess info.
CustomInitParams custom_initparams
custom lib init params
gboolean release(NvDsPreProcessCustomBuf *) override
override release method in plugin
GstNvDsPreProcessMemory * memory
Memory corresponding to the gst buffer.
gboolean roi_color
for config param : roi_color
Holds model parameters for tensor preparation.
NvDsPreProcessFormat scaling_pool_format
scaling pool color format
gint processing_height
Resolution height at which roi/full-frames should be processed.
std::vector< GstNvDsPreProcessGroup * > nvdspreprocess_groups
group information as specified in config file
Used by plugin to access GstBuffer and GstNvDsPreProcessMemory acquired by Custom Library.
gchar * config_file_path
Config file path for nvdspreprocess.
GstBaseTransformClass parent_class
gst base transform class
gboolean tensor_name
for config param : tensor-name
GQueue * preprocess_queue
Queue to send data to output thread for processing.
guint max_input_object_height
NvDsPreProcessAcquirerImpl(GstBufferPool *pool)
constructor
guint max_batch_size
Maximum batch size.
Holds the color parameters of the box or text to be overlayed.
NvBufSurfTransform_Inter
Specifies video interpolation methods.
NvBufSurfTransform_Compute scaling_pool_compute_hw
compute hw for transformation
struct _GstBuffer GstBuffer
std::function< NvDsPreProcessStatus(CustomCtx *, NvDsPreProcessBatch *, NvDsPreProcessCustomBuf *&, CustomTensorParams &, NvDsPreProcessAcquirer *)> custom_tensor_function
wrapper to custom tensor function
gboolean tensor_data_type
for config param : tensor-data-type
GThread * output_thread
Output thread.
gboolean network_color_format
for config param : network-color-format
GstFlowReturn last_flow_ret
GstFlowReturn returned by the latest buffer pad push.
struct CustomCtx CustomCtx
Context for custom library.
gboolean min_input_object_height
for config param : input-object-min-height
NvDsPreProcessCustomBuf * tensor_buf
pointer to buffer provided to custom library for tensor preparation
gboolean config_file_parse_successful
Config file parsing status.
gboolean custom_tensor_function_name
for config param : custom-tensor-function-name
GType gst_nvdspreprocess_get_type(void)
This file describes the custom memory allocator for the Gstreamer TensorRT plugin.
guint scaling_buf_pool_size
Scaling buffer pool size.
cudaStream_t convert_stream
Cuda Stream to ROI crop, scale and convert.
NvDsPreProcessFormat
Defines model color formats.
gboolean roi_params_src
for config param : roi-params-src
gboolean operate_on_class_ids
for config param : operate-on-class-ids
std::string custom_transform_function_name
custom transformation function name
NvBufSurfTransformParams transform_params
Parameters to use for transforming buffers.
void * custom_lib_handle
custom lib handle