NVIDIA DeepStream SDK API Reference

6.2 Release
gst-nvcustomevent.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022 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_NVCUSTOMEVENT_H__
45 #define __GST_NVCUSTOMEVENT_H__
46 
47 #include <gst/gst.h>
48 
49 #ifdef __cplusplus
50 extern "C" {
51 #endif
52 
53 
55 typedef struct RoiDimension{
56  gchar roi_id[128];
57  guint left;
58  guint top;
59  guint width;
60  guint height;
61 } RoiDimension;
62 
63 #define FLAG(name) GST_EVENT_TYPE_##name
64 
66 typedef enum {
70  = GST_EVENT_MAKE_TYPE (406, FLAG(DOWNSTREAM) | FLAG(SERIALIZED)),
74  = GST_EVENT_MAKE_TYPE (407, FLAG(DOWNSTREAM) | FLAG(SERIALIZED))
76 #undef FLAG
77 
85 GstEvent * gst_nvevent_new_roi_update (gchar* stream_id, guint roi_count, RoiDimension *roi_dim);
86 
99 void gst_nvevent_parse_roi_update (GstEvent * event, gchar** stream_id, guint *roi_count, RoiDimension **roi_dim);
100 
107 GstEvent * gst_nvevent_infer_interval_update (gchar* stream_id, guint interval);
108 
119 void gst_nvevent_parse_infer_interval_update (GstEvent * event, gchar** stream_id, guint *interval);
120 
121 #ifdef __cplusplus
122 }
123 #endif
124 
125 #endif
126 
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
Defines Roi structure for GST_NVCUSTOMEVENT_ROI_UPDATE custom event.
Definition: gst-nvcustomevent.h:55
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: gst-nvcustomevent.h:60
RoiDimension::left
guint left
Definition: gst-nvcustomevent.h:57
GstNvCustomEventType
GstNvCustomEventType
Defines supported types of custom events.
Definition: gst-nvcustomevent.h:66
RoiDimension::width
guint width
Definition: gst-nvcustomevent.h:59
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: gst-nvcustomevent.h:69
RoiDimension::top
guint top
Definition: gst-nvcustomevent.h:58
FLAG
#define FLAG(name)
Definition: gst-nvcustomevent.h:63
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: gst-nvcustomevent.h:73
RoiDimension::roi_id
gchar roi_id[128]
Definition: gst-nvcustomevent.h:56
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_new_roi_update
GstEvent * gst_nvevent_new_roi_update(gchar *stream_id, guint roi_count, RoiDimension *roi_dim)
Creates a new "roi-update" event.