NVIDIA DeepStream SDK API Reference

9.2 Release
sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: Apache-2.0
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
38 #ifndef __GST_NVDSCUSTOMEVENT_H__
39 #define __GST_NVDSCUSTOMEVENT_H__
40 
41 #include <gst/gst.h>
42 
43 #ifdef __cplusplus
44 extern "C"
45 {
46 #endif
47 
48 
50  typedef struct RoiDimension
51  {
52  gchar roi_id[128];
53  guint left;
54  guint top;
55  guint width;
56  guint height;
57  } RoiDimension;
58 
59 #define FLAG(name) GST_EVENT_TYPE_##name
60 
62  typedef enum
63  {
67  = GST_EVENT_MAKE_TYPE (406, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
71  = GST_EVENT_MAKE_TYPE (407, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
75  = GST_EVENT_MAKE_TYPE (408, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
79  = GST_EVENT_MAKE_TYPE (409, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
80 
84  = GST_EVENT_MAKE_TYPE (410, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
85 
92  = GST_EVENT_MAKE_TYPE (411, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
96  = GST_EVENT_MAKE_TYPE (412, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
102  = GST_EVENT_MAKE_TYPE (413, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
108  = GST_EVENT_MAKE_TYPE (414, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
114  = GST_EVENT_MAKE_TYPE (415, FLAG (DOWNSTREAM) | FLAG (SERIALIZED))
116 #undef FLAG
117 
125  GstEvent *gst_nvevent_new_roi_update (gchar * stream_id, guint roi_count,
126  RoiDimension * roi_dim);
127 
140  void gst_nvevent_parse_roi_update (GstEvent * event, gchar ** stream_id,
141  guint * roi_count, RoiDimension ** roi_dim);
142 
149  GstEvent *gst_nvevent_infer_interval_update (gchar * stream_id,
150  guint interval);
151 
162  void gst_nvevent_parse_infer_interval_update (GstEvent * event,
163  gchar ** stream_id, guint * interval);
164 
165 
172  GstEvent *gst_nvevent_nvtracker_config_update (gchar * stream_id, gchar * configStr);
173 
184  void gst_nvevent_parse_nvtracker_config_update (GstEvent * event,
185  gchar ** stream_id, gchar ** configStr);
186 
187 
194  GstEvent *gst_nvevent_osd_process_mode_update (gchar * stream_id,
195  guint process_mode);
196 
207  void gst_nvevent_parse_osd_process_mode_update (GstEvent * event,
208  gchar ** stream_id, guint * process_mode);
214 GstEvent *gst_nvevent_analytics_reload_config_update (gchar * config_file_path);
215 
223  gchar ** config_file_path);
224 
235 GstEvent *gst_nvevent_new_model_load (const gchar * value_json);
236 
239 void gst_nvevent_parse_model_load (GstEvent * event, gchar ** value_json);
240 
242 GstEvent *gst_nvevent_new_model_unload (const gchar * value_json);
243 
245 void gst_nvevent_parse_model_unload (GstEvent * event, gchar ** value_json);
246 
249 GstEvent *gst_nvevent_new_model_update (const gchar * value_json);
250 
252 void gst_nvevent_parse_model_update (GstEvent * event, gchar ** value_json);
253 
257 GstEvent *gst_nvevent_new_model_routing (const gchar * value_json);
258 
260 void gst_nvevent_parse_model_routing (GstEvent * event, gchar ** value_json);
261 
268 GstEvent *gst_nvevent_new_stream_model_bind (guint source_id,
269  const gchar * camera_id, const gchar * camera_name,
270  const gchar * metadata_json);
271 
273 void gst_nvevent_parse_stream_model_bind (GstEvent * event, guint * source_id,
274  gchar ** camera_id, gchar ** camera_name, gchar ** metadata_json);
275 
276 #ifdef __cplusplus
277 }
278 #endif
279 
280 #endif
281 
gst_nvevent_new_model_unload
GstEvent * gst_nvevent_new_model_unload(const gchar *value_json)
Creates a new "nv-model-unload" event (verbatim JSON payload).
RoiDimension::roi_id
gchar roi_id[128]
Definition: includes/gst-nvdscustomevent.h:52
gst_nvevent_nvtracker_config_update
GstEvent * gst_nvevent_nvtracker_config_update(gchar *stream_id, gchar *configStr)
Creates a new "nv-tracker-config-update" event.
RoiDimension
Defines Roi structure for GST_NVCUSTOMEVENT_ROI_UPDATE custom event.
Definition: includes/gst-nvdscustomevent.h:50
GST_NVEVENT_MODEL_UPDATE
@ GST_NVEVENT_MODEL_UPDATE
Specifies a custom event carrying a REST model/update request: an IN-PLACE checkpoint transition on t...
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:101
GST_NVEVENT_STREAM_MODEL_BIND
@ GST_NVEVENT_STREAM_MODEL_BIND
Specifies a custom event carrying a REST stream/add per-stream model binding (source_id + camera_id +...
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:107
gst_nvevent_parse_stream_model_bind
void gst_nvevent_parse_stream_model_bind(GstEvent *event, guint *source_id, gchar **camera_id, gchar **camera_name, gchar **metadata_json)
Parses a "nv-stream-model-bind" event.
gst_nvevent_parse_infer_interval_update
void gst_nvevent_parse_infer_interval_update(GstEvent *event, gchar **stream_id, guint *interval)
Parses a "nv-infer-interval-update" event received on the sinkpad.
RoiDimension::height
guint height
Definition: includes/gst-nvdscustomevent.h:56
gst_nvevent_new_roi_update
GstEvent * gst_nvevent_new_roi_update(gchar *stream_id, guint roi_count, RoiDimension *roi_dim)
Creates a new "roi-update" event.
RoiDimension::left
guint left
Definition: includes/gst-nvdscustomevent.h:53
GST_NVEVENT_MODEL_LOAD
@ GST_NVEVENT_MODEL_LOAD
Specifies a custom event carrying a REST model/load request to a downstream model-managing element (e...
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:91
gst_nvevent_parse_osd_process_mode_update
void gst_nvevent_parse_osd_process_mode_update(GstEvent *event, gchar **stream_id, guint *process_mode)
Parses a "nv-osd-process-mode-update" event received on the sinkpad.
RoiDimension::width
guint width
Definition: includes/gst-nvdscustomevent.h:55
gst_nvevent_parse_model_update
void gst_nvevent_parse_model_update(GstEvent *event, gchar **value_json)
Parses a "nv-model-update" event.
gst_nvevent_new_stream_model_bind
GstEvent * gst_nvevent_new_stream_model_bind(guint source_id, const gchar *camera_id, const gchar *camera_name, const gchar *metadata_json)
Creates a new "nv-stream-model-bind" event carrying a stream/add's per-stream binding: the assigned s...
gst_nvevent_parse_model_routing
void gst_nvevent_parse_model_routing(GstEvent *event, gchar **value_json)
Parses a "nv-model-routing" event.
GST_NVEVENT_OSD_PROCESS_MODE_UPDATE
@ GST_NVEVENT_OSD_PROCESS_MODE_UPDATE
Specifies a custom event to indicate osd process mode update of a particular stream in a batch.
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:74
GST_NVEVENT_ROI_UPDATE
@ GST_NVEVENT_ROI_UPDATE
Specifies a custom event to indicate ROI update for preprocess of a particular stream in a batch.
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:66
GstNvDsCustomEventType
GstNvDsCustomEventType
Defines supported types of custom events.
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:62
RoiDimension::top
guint top
Definition: includes/gst-nvdscustomevent.h:54
gst_nvevent_new_model_update
GstEvent * gst_nvevent_new_model_update(const gchar *value_json)
Creates a new "nv-model-update" event: IN-PLACE checkpoint transition (model plane only – never route...
gst_nvevent_parse_nvtracker_config_update
void gst_nvevent_parse_nvtracker_config_update(GstEvent *event, gchar **stream_id, gchar **configStr)
Parses a "nv-tracker-config-update" event received on the sinkpad.
gst_nvevent_analytics_reload_config_update
GstEvent * gst_nvevent_analytics_reload_config_update(gchar *config_file_path)
Creates a new "nv-analytics-reload_config-update" event.
GST_NVEVENT_ANALYTICS_RELOAD_CONFIG_UPDATE
@ GST_NVEVENT_ANALYTICS_RELOAD_CONFIG_UPDATE
Specifies a custom event to indicate analytics reload_config update of a particular stream in a batch...
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:78
FLAG
#define FLAG(name)
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:59
gst_nvevent_osd_process_mode_update
GstEvent * gst_nvevent_osd_process_mode_update(gchar *stream_id, guint process_mode)
Creates a new "nv-osd-process-mode-update" event.
gst_nvevent_new_model_load
GstEvent * gst_nvevent_new_model_load(const gchar *value_json)
Model-plane + stream-routing control events carry ONE payload: the request "value" object as verbatim...
gst_nvevent_parse_model_unload
void gst_nvevent_parse_model_unload(GstEvent *event, gchar **value_json)
Parses a "nv-model-unload" event.
gst_nvevent_infer_interval_update
GstEvent * gst_nvevent_infer_interval_update(gchar *stream_id, guint interval)
Creates a new "nv-infer-interval-update" event.
GST_NVEVENT_MODEL_ROUTING
@ GST_NVEVENT_MODEL_ROUTING
Specifies a custom event carrying a REST model/routing request: the declarative routing document (rou...
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:113
GST_NVEVENT_MODEL_UNLOAD
@ GST_NVEVENT_MODEL_UNLOAD
Specifies a custom event carrying a REST model/unload request (verbatim JSON payload).
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:95
gst_nvevent_parse_analytics_reload_config_update
void gst_nvevent_parse_analytics_reload_config_update(GstEvent *event, gchar **config_file_path)
Parses a "nv-analytics-reload_config-update" event.
gst_nvevent_new_model_routing
GstEvent * gst_nvevent_new_model_routing(const gchar *value_json)
Creates a new "nv-model-routing" event: the declarative routing document (routes[] + default{}),...
GST_NVEVENT_NVTRACKER_CONFIG_UPDATE
@ GST_NVEVENT_NVTRACKER_CONFIG_UPDATE
Specifies a custom event to indicate nvTracker config update for all streams .
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:83
RoiDimension
struct RoiDimension RoiDimension
Defines Roi structure for GST_NVCUSTOMEVENT_ROI_UPDATE custom event.
gst_nvevent_parse_model_load
void gst_nvevent_parse_model_load(GstEvent *event, gchar **value_json)
Parses a "nv-model-load" event.
gst_nvevent_parse_roi_update
void gst_nvevent_parse_roi_update(GstEvent *event, gchar **stream_id, guint *roi_count, RoiDimension **roi_dim)
Parses a "roi-update" event received on the sinkpad.
GST_NVEVENT_INFER_INTERVAL_UPDATE
@ GST_NVEVENT_INFER_INTERVAL_UPDATE
Specifies a custom event to indicate infer interval update of a particular stream in a batch.
Definition: sources/libs/gstnvdscustomhelper/gst-nvdscustomevent.h:70