NVIDIA DeepStream SDK API Reference

6.4 Release
includes/gst-nvdscustomevent.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-2023 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: MIT
4  *
5  * Permission is hereby granted, free of charge, to any person obtaining a
6  * copy of this software and associated documentation files (the "Software"),
7  * to deal in the Software without restriction, including without limitation
8  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
9  * and/or sell copies of the Software, and to permit persons to whom the
10  * Software is furnished to do so, subject to the following conditions:
11  *
12  * The above copyright notice and this permission notice shall be included in
13  * all copies or substantial portions of the Software.
14  *
15  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18  * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20  * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
21  * DEALINGS IN THE SOFTWARE.
22  */
23 
44 #ifndef __GST_NVDSCUSTOMEVENT_H__
45 #define __GST_NVDSCUSTOMEVENT_H__
46 
47 #include <gst/gst.h>
48 
49 #ifdef __cplusplus
50 extern "C"
51 {
52 #endif
53 
54 
56  typedef struct RoiDimension
57  {
58  gchar roi_id[128];
59  guint left;
60  guint top;
61  guint width;
62  guint height;
63  } RoiDimension;
64 
65 #define FLAG(name) GST_EVENT_TYPE_##name
66 
68  typedef enum
69  {
73  = GST_EVENT_MAKE_TYPE (406, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
77  = GST_EVENT_MAKE_TYPE (407, FLAG (DOWNSTREAM) | FLAG (SERIALIZED)),
81  = GST_EVENT_MAKE_TYPE (408, FLAG (DOWNSTREAM) | FLAG (SERIALIZED))
83 #undef FLAG
84 
92  GstEvent *gst_nvevent_new_roi_update (gchar * stream_id, guint roi_count,
93  RoiDimension * roi_dim);
94 
107  void gst_nvevent_parse_roi_update (GstEvent * event, gchar ** stream_id,
108  guint * roi_count, RoiDimension ** roi_dim);
109 
116  GstEvent *gst_nvevent_infer_interval_update (gchar * stream_id,
117  guint interval);
118 
129  void gst_nvevent_parse_infer_interval_update (GstEvent * event,
130  gchar ** stream_id, guint * interval);
131 
132 
139  GstEvent *gst_nvevent_osd_process_mode_update (gchar * stream_id,
140  guint process_mode);
141 
152  void gst_nvevent_parse_osd_process_mode_update (GstEvent * event,
153  gchar ** stream_id, guint * process_mode);
154 
155 #ifdef __cplusplus
156 }
157 #endif
158 
159 #endif
160 
RoiDimension::roi_id
gchar roi_id[128]
Definition: libs/gstnvdscustomhelper/gst-nvdscustomevent.h:58
RoiDimension
Defines Roi structure for GST_NVCUSTOMEVENT_ROI_UPDATE custom event.
Definition: libs/gstnvdscustomhelper/gst-nvdscustomevent.h:56
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: libs/gstnvdscustomhelper/gst-nvdscustomevent.h:62
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: libs/gstnvdscustomhelper/gst-nvdscustomevent.h:59
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: libs/gstnvdscustomhelper/gst-nvdscustomevent.h:61
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: includes/gst-nvdscustomevent.h:80
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: includes/gst-nvdscustomevent.h:72
GstNvDsCustomEventType
GstNvDsCustomEventType
Defines supported types of custom events.
Definition: includes/gst-nvdscustomevent.h:68
RoiDimension::top
guint top
Definition: libs/gstnvdscustomhelper/gst-nvdscustomevent.h:60
FLAG
#define FLAG(name)
Definition: includes/gst-nvdscustomevent.h:65
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_infer_interval_update
GstEvent * gst_nvevent_infer_interval_update(gchar *stream_id, guint interval)
Creates a new "nv-infer-interval-update" event.
RoiDimension
struct RoiDimension RoiDimension
Defines Roi structure for GST_NVCUSTOMEVENT_ROI_UPDATE custom 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: includes/gst-nvdscustomevent.h:76