NVIDIA DeepStream SDK API Reference

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