NVIDIA DeepStream SDK API Reference

9.1 Release
sources/includes/gst-nvevent.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: 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_NVEVENT_H__
39 #define __GST_NVEVENT_H__
40 
41 #include <gst/gst.h>
42 
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46 
47 #define FLAG(name) GST_EVENT_TYPE_##name
48 
52 typedef enum {
55  = GST_EVENT_MAKE_TYPE (400, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
56  FLAG(STICKY) | FLAG(STICKY_MULTI)),
59  = GST_EVENT_MAKE_TYPE (401, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
60  FLAG(STICKY) | FLAG(STICKY_MULTI)),
64  = GST_EVENT_MAKE_TYPE (402, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
65  FLAG(STICKY) | FLAG(STICKY_MULTI)),
68  = GST_EVENT_MAKE_TYPE (403, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
69  FLAG(STICKY) | FLAG(STICKY_MULTI)),
73  = GST_EVENT_MAKE_TYPE (404, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
74  FLAG(STICKY) | FLAG(STICKY_MULTI)),
78  = GST_EVENT_MAKE_TYPE (405, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
79  FLAG(STICKY) | FLAG(STICKY_MULTI)),
83  = GST_EVENT_MAKE_TYPE (406, FLAG(DOWNSTREAM) | FLAG(SERIALIZED) |
84  FLAG(STICKY) | FLAG(STICKY_MULTI))
85 
87 #undef FLAG
88 
99 GstEvent * gst_nvevent_new_pad_added (guint source_id);
100 
111 GstEvent * gst_nvevent_new_pad_deleted (guint source_id);
112 
123 GstEvent * gst_nvevent_new_stream_eos (guint source_id);
124 
138 GstEvent * gst_nvevent_new_stream_segment (guint source_id, GstSegment *segment);
139 
150 GstEvent * gst_nvevent_new_stream_reset (guint source_id);
151 
167 GstEvent * gst_nvevent_new_update_caps (guint pad_id, guint width_val, guint height_val,
168  GstStructure *caps_str, gchar* stream_id_str, gboolean is_audio );
169 
177 void gst_nvevent_parse_pad_added (GstEvent * event, guint * source_id);
178 
186 void gst_nvevent_parse_pad_deleted (GstEvent * event, guint * source_id);
187 
195 void gst_nvevent_parse_stream_eos (GstEvent * event, guint * source_id);
196 
207 void gst_nvevent_parse_stream_segment (GstEvent * event, guint * source_id,
208  GstSegment **segment);
209 
217 void gst_nvevent_parse_stream_reset (GstEvent * event, guint * source_id);
218 
227 GstEvent * gst_nvevent_new_stream_start (guint source_id, gchar* stream_id);
228 
239 void gst_nvevent_parse_stream_start (GstEvent * event, guint * source_id, gchar** stream_id);
240 
241 #ifdef __cplusplus
242 }
243 #endif
244 
245 #endif
246 
GST_NVEVENT_STREAM_START
@ GST_NVEVENT_STREAM_START
Specifies a custom event to indicate start of a particular stream in a batch.
Definition: sources/includes/gst-nvevent.h:77
gst_nvevent_parse_pad_deleted
void gst_nvevent_parse_pad_deleted(GstEvent *event, guint *source_id)
Parses a "pad deleted" event received on the sinkpad.
gst_nvevent_new_stream_eos
GstEvent * gst_nvevent_new_stream_eos(guint source_id)
Creates a "custom EOS" event for the specified source.
gst_nvevent_parse_stream_segment
void gst_nvevent_parse_stream_segment(GstEvent *event, guint *source_id, GstSegment **segment)
Parses a "stream segment" event received on the sinkpad.
GST_NVEVENT_PAD_DELETED
@ GST_NVEVENT_PAD_DELETED
Specifies a custom event to indicate Pad Deleted.
Definition: sources/includes/gst-nvevent.h:58
gst_nvevent_parse_stream_reset
void gst_nvevent_parse_stream_reset(GstEvent *event, guint *source_id)
Parses a "stream reset" event received on the sinkpad.
GST_NVEVENT_PAD_ADDED
@ GST_NVEVENT_PAD_ADDED
Specifies a custom event to indicate Pad Added.
Definition: sources/includes/gst-nvevent.h:54
GST_NVEVENT_UPDATE_CAPS
@ GST_NVEVENT_UPDATE_CAPS
Specifies a custom event to indicate update in caps of particular stream in a batch.
Definition: sources/includes/gst-nvevent.h:82
gst_nvevent_new_stream_start
GstEvent * gst_nvevent_new_stream_start(guint source_id, gchar *stream_id)
Creates a new "stream start" event.
gst_nvevent_new_update_caps
GstEvent * gst_nvevent_new_update_caps(guint pad_id, guint width_val, guint height_val, GstStructure *caps_str, gchar *stream_id_str, gboolean is_audio)
Creates a "updated caps" event for the specified source.
gst_nvevent_new_pad_added
GstEvent * gst_nvevent_new_pad_added(guint source_id)
Creates a "custom pad added" event for the specified source.
FLAG
#define FLAG(name)
Definition: sources/includes/gst-nvevent.h:47
GST_NVEVENT_STREAM_EOS
@ GST_NVEVENT_STREAM_EOS
Specifies a custom event to indicate EOS of a particular stream in a batch.
Definition: sources/includes/gst-nvevent.h:63
gst_nvevent_new_stream_reset
GstEvent * gst_nvevent_new_stream_reset(guint source_id)
Creates a "custom reset" event for the specified source.
gst_nvevent_new_pad_deleted
GstEvent * gst_nvevent_new_pad_deleted(guint source_id)
Creates a "custom pad deleted" event for the specified source.
gst_nvevent_parse_stream_start
void gst_nvevent_parse_stream_start(GstEvent *event, guint *source_id, gchar **stream_id)
Parses a "stream start" event received on the sinkpad.
GST_NVEVENT_STREAM_RESET
@ GST_NVEVENT_STREAM_RESET
Specifies a custom event to indicate reset of a particular stream in a batch.
Definition: sources/includes/gst-nvevent.h:72
gst_nvevent_new_stream_segment
GstEvent * gst_nvevent_new_stream_segment(guint source_id, GstSegment *segment)
Creates a "custom segment" event for the specified source.
gst_nvevent_parse_stream_eos
void gst_nvevent_parse_stream_eos(GstEvent *event, guint *source_id)
Parses a "stream EOS" event received on the sinkpad.
GST_NVEVENT_STREAM_SEGMENT
@ GST_NVEVENT_STREAM_SEGMENT
Specifies a custom event to indicate a stream segment.
Definition: sources/includes/gst-nvevent.h:67
GstNvEventType
GstNvEventType
Defines supported types of custom events.
Definition: sources/includes/gst-nvevent.h:52
gst_nvevent_parse_pad_added
void gst_nvevent_parse_pad_added(GstEvent *event, guint *source_id)
Parses a "pad added" event received on the sinkpad.