NVIDIA DeepStream SDK API Reference

9.0 Release
sources/apps/apps-common/includes/deepstream_config_file_parser.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __NVGSTDS_CONFIG_PARSER_H__
14 #define __NVGSTDS_CONFIG_PARSER_H__
15 
16 #include <gst/gst.h>
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "deepstream_config.h"
24 #include "deepstream_sources.h"
25 #include "deepstream_preprocess.h"
26 #include "deepstream_primary_gie.h"
29 #include "deepstream_gie.h"
30 #include "deepstream_sinks.h"
31 #include "deepstream_osd.h"
32 #include "deepstream_segvisual.h"
33 #include "deepstream_sources.h"
34 #include "deepstream_dsanalytics.h"
35 #include "deepstream_dsexample.h"
36 #include "deepstream_streammux.h"
37 #include "deepstream_tracker.h"
40 #include "deepstream_replay.h"
41 #include "deepstream_dewarper.h"
42 #include "deepstream_c2d_msg.h"
43 #include "deepstream_image_save.h"
44 
45 #define CONFIG_GROUP_SOURCE_LIST "source-list"
46 #define CONFIG_GROUP_SOURCE_LIST_NUM_SOURCE_BINS "num-source-bins"
47 #define CONFIG_GROUP_SOURCE_LIST_URI_LIST "list"
48 
49 #define CONFIG_GROUP_SOURCE_LIST_SENSOR_ID_LIST "sensor-id-list"
50 #define CONFIG_GROUP_SOURCE_LIST_SENSOR_NAME_LIST "sensor-name-list"
51 
53 #define CONFIG_GROUP_SOURCE_LIST_USE_NVMULTIURISRCBIN "use-nvmultiurisrcbin"
54 #define CONFIG_GROUP_SOURCE_LIST_DUMMY_PAYLOAD "dummy-payload"
55 #define CONFIG_GROUP_SOURCE_LIST_CUSTOM_TS_TO_RFC "custom-ts-to-rfc"
56 #define CONFIG_GROUP_SOURCE_LIST_BATCHED_SENSOR_NAME "batched-sensor-name"
57 #define CONFIG_GROUP_SOURCE_LIST_STREAM_NAME_DISPLAY "stream-name-display"
58 #define CONFIG_GROUP_SOURCE_LIST_MAX_BATCH_SIZE "max-batch-size"
59 #define CONFIG_GROUP_SOURCE_LIST_HTTP_IP "http-ip"
60 #define CONFIG_GROUP_SOURCE_LIST_HTTP_PORT "http-port"
61 #define CONFIG_GROUP_SOURCE_EXTRACT_SEI_TYPE5_DATA "extract-sei-type5-data"
62 #define CONFIG_GROUP_SOURCE_SEI_UUID "sei-uuid"
63 #define CONFIG_GROUP_SOURCE_LIST_LOW_LATENCY_MODE "low-latency-mode"
64 
66 #define CONFIG_GROUP_SOURCE_LIST_ENABLE_ERROR_PROPAGATION "enable-error-propagation"
67 #define CONFIG_GROUP_SOURCE_LIST_PROTO_LIB "proto-lib"
68 #define CONFIG_GROUP_SOURCE_LIST_CONN_STR "conn-str"
69 #define CONFIG_GROUP_SOURCE_LIST_TOPIC "topic"
70 
71 
72 #define CONFIG_GROUP_SOURCE_ALL "source-attr-all"
73 
74 #define CONFIG_GROUP_SOURCE "source"
75 #define CONFIG_GROUP_OSD "osd"
76 #define CONFIG_GROUP_SEGVISUAL "segvisual"
77 #define CONFIG_GROUP_PREPROCESS "pre-process"
78 #define CONFIG_GROUP_SECONDARY_PREPROCESS "secondary-pre-process"
79 #define CONFIG_GROUP_PRIMARY_GIE "primary-gie"
80 #define CONFIG_GROUP_SECONDARY_GIE "secondary-gie"
81 #define CONFIG_GROUP_TRACKER "tracker"
82 
83 #define CONFIG_GROUP_TEXT_EMBEDDER "text-embedder"
84 
85 #define CONFIG_GROUP_VISIONENCODER "visionencoder"
86 
87 #define CONFIG_GROUP_REPLAY "replay"
88 #define CONFIG_GROUP_SINK "sink"
89 #define CONFIG_GROUP_TILED_DISPLAY "tiled-display"
90 #define CONFIG_GROUP_DSANALYTICS "nvds-analytics"
91 #define CONFIG_GROUP_DSEXAMPLE "ds-example"
92 #define CONFIG_GROUP_STREAMMUX "streammux"
93 #define CONFIG_GROUP_DEWARPER "dewarper"
94 #define CONFIG_GROUP_MSG_CONVERTER "message-converter"
95 #define CONFIG_GROUP_MSG_CONSUMER "message-consumer"
96 #define CONFIG_GROUP_IMG_SAVE "img-save"
97 #define CONFIG_GROUP_AUDIO_TRANSFORM "audio-transform"
98 #define CONFIG_GROUP_AUDIO_CLASSIFIER "audio-classifier"
99 
100 #define CONFIG_GROUP_SOURCE_GPU_ID "gpu-id"
101 #define CONFIG_GROUP_SOURCE_TYPE "type"
102 #define CONFIG_GROUP_SOURCE_CUDA_MEM_TYPE "nvbuf-memory-type"
103 #define CONFIG_GROUP_SOURCE_CAMERA_WIDTH "camera-width"
104 #define CONFIG_GROUP_SOURCE_CAMERA_HEIGHT "camera-height"
105 #define CONFIG_GROUP_SOURCE_CAMERA_FPS_N "camera-fps-n"
106 #define CONFIG_GROUP_SOURCE_CAMERA_FPS_D "camera-fps-d"
107 #define CONFIG_GROUP_SOURCE_CAMERA_CSI_SID "camera-csi-sensor-id"
108 #define CONFIG_GROUP_SOURCE_CAMERA_V4L2_DEVNODE "camera-v4l2-dev-node"
109 #define CONFIG_GROUP_SOURCE_URI "uri"
110 #define CONFIG_GROUP_SOURCE_LIVE_SOURCE "live-source"
111 #define CONFIG_GROUP_SOURCE_FILE_LOOP "file-loop"
112 #define CONFIG_GROUP_SOURCE_LATENCY "latency"
113 #define CONFIG_GROUP_SOURCE_NUM_SOURCES "num-sources"
114 #define CONFIG_GROUP_SOURCE_INTRA_DECODE "intra-decode-enable"
115 #define CONFIG_GROUP_SOURCE_DEC_SKIP_FRAMES "dec-skip-frames"
116 #define CONFIG_GROUP_SOURCE_NUM_DECODE_SURFACES "num-decode-surfaces"
117 #define CONFIG_GROUP_SOURCE_NUM_EXTRA_SURFACES "num-extra-surfaces"
118 #define CONFIG_GROUP_SOURCE_DROP_FRAME_INTERVAL "drop-frame-interval"
119 #define CONFIG_GROUP_SOURCE_DROP_ON_LATENCY "drop-on-latency"
120 #define CONFIG_GROUP_SOURCE_CAMERA_ID "camera-id"
121 #define CONFIG_GROUP_SOURCE_ID "source-id"
122 #define CONFIG_GROUP_SOURCE_SELECT_RTP_PROTOCOL "select-rtp-protocol"
123 #define CONFIG_GROUP_SOURCE_LEAKY "leaky"
124 #define CONFIG_GROUP_SOURCE_MAX_SIZE_BUFFERS "max-size-buffers"
125 #define CONFIG_GROUP_SOURCE_RTSP_RECONNECT_INTERVAL_SEC "rtsp-reconnect-interval-sec"
126 #define CONFIG_GROUP_SOURCE_RTSP_RECONNECT_ATTEMPTS "rtsp-reconnect-attempts"
127 #define CONFIG_GROUP_SOURCE_RTSP_INIT_RECONNECT_INTERVAL_SEC "init-rtsp-reconnect-interval-sec"
128 #define CONFIG_GROUP_SOURCE_RTSP_BUFFER_MODE "buffer-mode"
129 #define CONFIG_GROUP_SOURCE_SMART_RECORD_ENABLE "smart-record"
130 #define CONFIG_GROUP_SOURCE_SMART_RECORD_DIRPATH "smart-rec-dir-path"
131 #define CONFIG_GROUP_SOURCE_SMART_RECORD_FILE_PREFIX "smart-rec-file-prefix"
132 #define CONFIG_GROUP_SOURCE_SMART_RECORD_CACHE_SIZE_LEGACY "smart-rec-video-cache"
133 #define CONFIG_GROUP_SOURCE_SMART_RECORD_CACHE_SIZE "smart-rec-cache"
134 #define CONFIG_GROUP_SOURCE_SMART_RECORD_CONTAINER "smart-rec-container"
135 #define CONFIG_GROUP_SOURCE_SMART_RECORD_START_TIME "smart-rec-start-time"
136 #define CONFIG_GROUP_SOURCE_SMART_RECORD_DEFAULT_DURATION "smart-rec-default-duration"
137 #define CONFIG_GROUP_SOURCE_SMART_RECORD_DURATION "smart-rec-duration"
138 #define CONFIG_GROUP_SOURCE_SMART_RECORD_INTERVAL "smart-rec-interval"
139 
148 gboolean
150 
161 gboolean
162 parse_dewarper (NvDsDewarperConfig * config, GKeyFile * key_file, gchar *cfg_file_path, gchar * group);
163 
174 gboolean
175 parse_source (NvDsSourceConfig * config, GKeyFile * key_file,
176  gchar * group, gchar * cfg_file_path);
177 
186 gboolean parse_segvisual (NvDsSegVisualConfig * config, GKeyFile * key_file);
187 
196 gboolean parse_osd (NvDsOSDConfig * config, GKeyFile * key_file);
197 
209 gboolean
210 parse_preprocess (NvDsPreProcessConfig * config, GKeyFile * key_file,
211  gchar * group, gchar * cfg_file_path);
212 
224 gboolean
225 parse_gie (NvDsGieConfig * config, GKeyFile * key_file, gchar * group,
226  gchar * cfg_file_path);
227 
237 gboolean
238 parse_tracker (NvDsTrackerConfig * config, GKeyFile * key_file, gchar * cfg_file_path);
239 
248 gboolean
249 parse_text_embedder (NvDsTextEmbedderConfig * config, GKeyFile * key_file,
250  gchar * cfg_file_path);
251 
262 gboolean
263 parse_visionencoder (NvDsVisionEncoderConfig * config, GKeyFile * key_file,
264  gchar * group, gchar * cfg_file_path);
265 
275 gboolean
276 parse_replay (NvDsReplayConfig * config, GKeyFile * key_file, gchar * cfg_file_path);
277 
287 gboolean
288 parse_sink (NvDsSinkSubBinConfig * config, GKeyFile * key_file, gchar * group, gchar * cfg_file_path);
289 
298 gboolean
299 parse_tiled_display (NvDsTiledDisplayConfig * config, GKeyFile * key_file);
300 
309 gboolean
310 parse_dsanalytics (NvDsDsAnalyticsConfig * config, GKeyFile * key_file, gchar* cfg_file_path);
311 
320 gboolean
321 parse_dsexample (NvDsDsExampleConfig * config, GKeyFile * key_file);
322 
332 gboolean
333 parse_streammux (NvDsStreammuxConfig * config, GKeyFile * key_file, gchar * cfg_file_path);
334 
345 gboolean
346 parse_msgconv (NvDsSinkMsgConvBrokerConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path);
347 
358 gboolean
359 parse_msgconsumer (NvDsMsgConsumerConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path);
360 
371 gboolean
372 parse_image_save (NvDsImageSave *config, GKeyFile *key_file,
373  gchar *group, gchar *cfg_file_path);
374 
382 gchar *
383 get_absolute_file_path (gchar *cfg_file_path, gchar * file_path);
384 
385 #ifdef __cplusplus
386 }
387 #endif
388 
389 #endif
deepstream_gie.h
NvDsVisionEncoderConfig
Definition: sources/apps/apps-common/includes/deepstream_visionencoder.h:23
parse_dewarper
gboolean parse_dewarper(NvDsDewarperConfig *config, GKeyFile *key_file, gchar *cfg_file_path, gchar *group)
Function to read properties of source element from configuration file.
deepstream_replay.h
parse_replay
gboolean parse_replay(NvDsReplayConfig *config, GKeyFile *key_file, gchar *cfg_file_path)
Function to read properties of replay element from configuration file.
get_absolute_file_path
gchar * get_absolute_file_path(gchar *cfg_file_path, gchar *file_path)
Utility function to convert relative path in configuration file with absolute path.
deepstream_audio_classifier.h
deepstream_c2d_msg.h
parse_text_embedder
gboolean parse_text_embedder(NvDsTextEmbedderConfig *config, GKeyFile *key_file, gchar *cfg_file_path)
Function to read properties of text embedder element from configuration file.
NvDsPreProcessConfig
Definition: sources/apps/apps-common/includes/deepstream_preprocess.h:23
deepstream_tiled_display.h
deepstream_image_save.h
NvDsSinkSubBinConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:131
parse_source
gboolean parse_source(NvDsSourceConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of source element from configuration file.
parse_dsexample
gboolean parse_dsexample(NvDsDsExampleConfig *config, GKeyFile *key_file)
Function to read properties of dsexample element from configuration file.
deepstream_streammux.h
NvDsImageSave
Definition: sources/apps/apps-common/includes/deepstream_image_save.h:21
parse_visionencoder
gboolean parse_visionencoder(NvDsVisionEncoderConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of visionencoder element from configuration file.
NvDsSegVisualConfig
Definition: sources/apps/apps-common/includes/deepstream_segvisual.h:33
NvDsDsExampleConfig
Definition: sources/apps/apps-common/includes/deepstream_dsexample.h:23
NvDsTextEmbedderConfig
Definition: sources/apps/apps-common/includes/deepstream_text_embedder.h:23
deepstream_text_embedder.h
parse_sink
gboolean parse_sink(NvDsSinkSubBinConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of sink element from configuration file.
NvDsSinkMsgConvBrokerConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:105
deepstream_sources.h
deepstream_tracker.h
parse_tiled_display
gboolean parse_tiled_display(NvDsTiledDisplayConfig *config, GKeyFile *key_file)
Function to read properties of tiler element from configuration file.
NvDsDsAnalyticsConfig
Definition: sources/apps/apps-common/includes/deepstream_dsanalytics.h:23
parse_osd
gboolean parse_osd(NvDsOSDConfig *config, GKeyFile *key_file)
Function to read properties of OSD element from configuration file.
parse_preprocess
gboolean parse_preprocess(NvDsPreProcessConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of nvdspreprocess element from configuration file.
parse_tracker
gboolean parse_tracker(NvDsTrackerConfig *config, GKeyFile *key_file, gchar *cfg_file_path)
Function to read properties of tracker element from configuration file.
NvDsSourceConfig
Definition: sources/apps/apps-common/includes/deepstream_sources.h:38
deepstream_visionencoder.h
deepstream_preprocess.h
deepstream_dsexample.h
deepstream_dewarper.h
deepstream_config.h
parse_image_save
gboolean parse_image_save(NvDsImageSave *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of image save from configuration file.
NvDsTiledDisplayConfig
Definition: sources/apps/apps-common/includes/deepstream_tiled_display.h:44
NvDsStreammuxConfig
Definition: sources/apps/apps-common/includes/deepstream_streammux.h:23
deepstream_osd.h
parse_gie
gboolean parse_gie(NvDsGieConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of infer element from configuration file.
deepstream_segvisual.h
parse_segvisual
gboolean parse_segvisual(NvDsSegVisualConfig *config, GKeyFile *key_file)
Function to read properties of NvSegVisual element from configuration file.
deepstream_sinks.h
NvDsGieConfig
Definition: sources/apps/apps-common/includes/deepstream_gie.h:35
parse_msgconv
gboolean parse_msgconv(NvDsSinkMsgConvBrokerConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of message converter element from configuration file.
NvDsReplayConfig
Definition: sources/apps/apps-common/includes/deepstream_replay.h:25
parse_labels_file
gboolean parse_labels_file(NvDsGieConfig *config)
Function to parse class label file.
deepstream_dsanalytics.h
NvDsTrackerConfig
Definition: sources/apps/apps-common/includes/deepstream_tracker.h:25
NvDsMsgConsumerConfig
Definition: sources/apps/apps-common/includes/deepstream_c2d_msg.h:36
parse_streammux
gboolean parse_streammux(NvDsStreammuxConfig *config, GKeyFile *key_file, gchar *cfg_file_path)
Function to read properties of streammux element from configuration file.
NvDsOSDConfig
Definition: sources/apps/apps-common/includes/deepstream_osd.h:35
parse_msgconsumer
gboolean parse_msgconsumer(NvDsMsgConsumerConfig *config, GKeyFile *key_file, gchar *group, gchar *cfg_file_path)
Function to read properties of message consumer element from configuration file.
parse_dsanalytics
gboolean parse_dsanalytics(NvDsDsAnalyticsConfig *config, GKeyFile *key_file, gchar *cfg_file_path)
Function to read properties of dsanalytics element from configuration file.
NvDsDewarperConfig
Definition: sources/apps/apps-common/includes/deepstream_dewarper.h:35
deepstream_primary_gie.h