NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-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 
18 #ifndef __GST_NVSTREAMMUX_H__
19 #define __GST_NVSTREAMMUX_H__
20 
21 #include <gst/gst.h>
22 #include <gst/video/video.h>
23 #include <time.h>
24 #include "cuda_runtime_api.h"
25 #include "nvstreammux_debug.h"
26 #include "nvstreammux.h"
27 #include "GstNvStreamMuxCtx.h"
28 #include "gstnvstreammux_ntp.h"
29 #include "gstnvtimesynch.h"
30 #include "gstnvstreammuxdebug.h"
31 
32 G_BEGIN_DECLS
33 #define GST_TYPE_NVSTREAMMUX \
34  (gst_nvstreammux_2_get_type ())
35 #define GST_NVSTREAMMUX(obj) \
36  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVSTREAMMUX,GstNvStreamMux))
37 #define GST_NVSTREAMMUX_CLASS(klass) \
38  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVSTREAMMUX,GstNvStreamMuxClass))
39 #define GST_IS_NVSTREAMMUX(obj) \
40  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVSTREAMMUX))
41 #define GST_IS_NVSTREAMMUX_CLASS(klass) \
42  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVSTREAMMUX))
45 #define NEW_METADATA 1
46 
47 struct _GstNvStreamMux
48 {
49  GstElement element;
50 
51  GstPad *srcpad;
52 
53 
54  GstSegment segment;
55 
56  GstFlowReturn last_flow_ret;
57 
58  unsigned int width;
59 
60  unsigned int height;
61 
63 
64  bool send_eos;
65 
66  bool eos_sent;
67 
68  bool all_pads_eos;
69 
70  gboolean query_resolution;
71 
72  unsigned int batch_size;
73  gint timeout_usec;
74 
75  GstVideoInfo out_videoinfo;
76 
77  unsigned int num_surfaces_per_frame;
78 
79  bool pad_task_created;
80 
81  gulong frame_duration_nsec;
82 
83  gulong cur_frame_pts;
84  GstClockTime pts_offset;
85 
87  gchar *config_file_path;
89  gboolean config_file_available;
90 
93 
94  gboolean module_initialized;
95 
96  gboolean segment_sent;
97 
98  guint num_sink_pads;
99 
101  gboolean isAudio;
102 
105 
107  gboolean sys_ts;
109  GHashTable *sink_pad_caps;
110 
112  gboolean sync_inputs;
113 
114  GstClockTime max_latency;
115 
116  GstClockTime prev_outbuf_pts;
117 
119 
120  GstClockTime peer_latency_min;
121  GstClockTime peer_latency_max;
122  gboolean peer_latency_live;
123  gboolean has_peer_latency;
124  GMutex ctx_lock;
125 
126  gboolean frame_num_reset_on_eos;
129  GstClockTime frame_duration;
131  gboolean no_pipeline_eos;
132 
134 };
135 
137 {
138  GstElementClass parent_class;
139 };
140 
141 G_GNUC_INTERNAL GType gst_nvstreammux_2_get_type (void);
142 
143 G_END_DECLS
144 #endif
gstnvstreammuxdebug.h
_GstNvStreamMux::all_pads_eos
bool all_pads_eos
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:68
_GstNvStreamMux::out_videoinfo
GstVideoInfo out_videoinfo
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:75
_GstNvStreamMux
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:47
_GstNvStreamMux::sys_ts
gboolean sys_ts
property that specifies if the ntp timestamp is from rtspsrc or system
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:107
_GstNvStreamMux::width
unsigned int width
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:58
_GstNvStreamMux::send_eos
bool send_eos
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:64
_GstNvStreamMux::segment
GstSegment segment
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:54
_GstNvStreamMux::num_surfaces_per_frame
unsigned int num_surfaces_per_frame
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:77
_GstNvStreamMux::frame_num_reset_on_stream_reset
gboolean frame_num_reset_on_stream_reset
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:127
_GstNvStreamMux::segment_sent
gboolean segment_sent
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:96
_GstNvStreamMux::peer_latency_min
GstClockTime peer_latency_min
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:120
_GstNvStreamMux::sync_inputs
gboolean sync_inputs
whether input buffer synchronization is turned ON/OFF
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:112
_GstNvStreamMux::num_sink_pads
guint num_sink_pads
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:98
GstNvStreamMuxCtx.h
StreamMux heler context class.
gst_nvstreammux_2_get_type
G_GNUC_INTERNAL GType gst_nvstreammux_2_get_type(void)
_GstNvStreamMux::frame_duration_nsec
gulong frame_duration_nsec
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:81
_GstNvStreamMux::pad_task_created
bool pad_task_created
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:79
_GstNvStreamMux::prev_outbuf_pts
GstClockTime prev_outbuf_pts
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:116
_GstNvStreamMux::peer_latency_live
gboolean peer_latency_live
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:122
_GstNvStreamMux::sink_pad_caps
GHashTable * sink_pad_caps
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:109
_GstNvStreamMux::cur_frame_pts
gulong cur_frame_pts
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:83
_GstNvStreamMux::eos_sent
bool eos_sent
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:66
_GstNvStreamMux::has_peer_latency
gboolean has_peer_latency
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:123
_GstNvStreamMux::ctx_lock
GMutex ctx_lock
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:124
_GstNvStreamMux::timeout_usec
gint timeout_usec
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:73
GstNvStreamMuxCtx
Definition: sources/gst-plugins/gst-nvmultistream2/GstNvStreamMuxCtx.h:32
_GstNvStreamMux::query_resolution
gboolean query_resolution
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:70
_GstNvStreamMux::element
GstElement element
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:49
_GstNvStreamMux::pts_offset
GstClockTime pts_offset
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:84
_GstNvStreamMux::debug_iface
INvStreammuxDebug * debug_iface
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:133
_GstNvStreamMux::frame_num_reset_on_eos
gboolean frame_num_reset_on_eos
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:126
_GstNvStreamMux::module_initialized
gboolean module_initialized
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:94
_GstNvStreamMux::height
unsigned int height
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:60
_GstNvStreamMux::max_latency
GstClockTime max_latency
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:114
GstNvDsNtpCalculatorMode
GstNvDsNtpCalculatorMode
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux_ntp.h:30
_GstNvStreamMux::config_file_available
gboolean config_file_available
boolean TRUE if a new config_file_path setting is available
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:89
NvStreamMux
Definition: sources/libs/nvstreammux/include/nvstreammux.h:39
_GstNvStreamMux::no_pipeline_eos
gboolean no_pipeline_eos
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:131
_GstNvStreamMux::muxCtx
GstNvStreamMuxCtx * muxCtx
muxer context
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:104
gstnvtimesynch.h
_GstNvStreamMux::frame_duration
GstClockTime frame_duration
Application specified frame duration used for NTP timestamp calculaion.
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:129
_GstNvStreamMux::synch_buffer
NvTimeSync * synch_buffer
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:118
gstnvstreammux_ntp.h
_GstNvStreamMux::helper
NvStreamMux * helper
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:62
_GstNvStreamMux::ntp_calc_mode
GstNvDsNtpCalculatorMode ntp_calc_mode
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:108
_GstNvStreamMuxClass
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:136
_GstNvStreamMux::pushed_stream_start_once
bool pushed_stream_start_once
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:130
_GstNvStreamMux::peer_latency_max
GstClockTime peer_latency_max
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:121
_GstNvStreamMux::srcpad
GstPad * srcpad
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:51
_GstNvStreamMux::last_flow_ret
GstFlowReturn last_flow_ret
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:56
_GstNvStreamMuxClass::parent_class
GstElementClass parent_class
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:138
_GstNvStreamMux::config_file_path
gchar * config_file_path
Path to the configuration file for this instance of gst-nvstreammux.
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:87
NvTimeSync
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvtimesynch.h:28
_GstNvStreamMux::isAudio
gboolean isAudio
Audio support.
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:101
_GstNvStreamMux::config_file_parse_successful
gboolean config_file_parse_successful
Boolean indicating if the config parsing was successful.
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:92
_GstNvStreamMux::batch_size
unsigned int batch_size
Definition: sources/gst-plugins/gst-nvmultistream2/gstnvstreammux.h:72
INvStreammuxDebug
Definition: sources/libs/nvstreammux/include/nvstreammux_debug.h:21