NVIDIA DeepStream SDK API Reference

7.1 Release
deepstream_sinks.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
3  * SPDX-License-Identifier: LicenseRef-NvidiaProprietary
4  *
5  * NVIDIA CORPORATION, its affiliates and licensors retain all intellectual
6  * property and proprietary rights in and to this material, related
7  * documentation and any modifications thereto. Any use, reproduction,
8  * disclosure or distribution of this material and related documentation
9  * without an express license agreement from NVIDIA CORPORATION or
10  * its affiliates is strictly prohibited.
11  */
12 
13 #ifndef __NVGSTDS_SINKS_H__
14 #define __NVGSTDS_SINKS_H__
15 
16 #ifdef __aarch64__
17 #define IS_TEGRA
18 #endif
19 
20 #include <gst/gst.h>
21 
22 #ifdef __cplusplus
23 extern "C"
24 {
25 #endif
26 
27 typedef enum
28 {
30 #ifndef IS_TEGRA
32 #else
33  NV_DS_SINK_RENDER_3D,
34 #endif
39 } NvDsSinkType;
40 
41 typedef enum
42 {
46 
47 typedef enum
48 {
53 
54 typedef enum
55 {
59 
60 typedef enum
61 {
65 
66 typedef struct
67 {
72  guint compute_hw;
73  gint bitrate;
74  guint profile;
75  gint sync;
77  guint gpu_id;
78  guint rtsp_port;
79  guint udp_port;
80  guint64 udp_buffer_size;
82  guint copy_meta;
84  gint sw_preset;
86 
87 typedef struct
88 {
90  gint width;
91  gint height;
92  gint sync;
93  gboolean qos;
95  guint gpu_id;
97  guint offset_x;
98  guint offset_y;
99  guint color_range;
100  guint conn_id;
101  guint plane_id;
102  gboolean set_mode;
104 
105 typedef struct
106 {
107  gboolean enable;
119  gchar* proto_lib;
120  gchar* conn_str;
121  gchar* topic;
124  gboolean disable_msgconv;
125  gint sync;
126  gboolean new_api;
129 
130 typedef struct
131 {
132  gboolean enable;
133  guint source_id;
134  gboolean link_to_demux;
136  gint sync;
141 
142 typedef struct
143 {
144  GstElement *bin;
145  GstElement *queue;
146  GstElement *transform;
147  GstElement *cap_filter;
148  GstElement *enc_caps_filter;
149  GstElement *encoder;
150  GstElement *codecparse;
151  GstElement *mux;
152  GstElement *sink;
153  GstElement *rtppay;
156 
157 typedef struct
158 {
159  GstElement *bin;
160  GstElement *queue;
161  GstElement *tee;
162 
163  gint num_bins;
165 } NvDsSinkBin;
166 
181 gboolean create_sink_bin (guint num_sub_bins,
182  NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index);
183 
184 void destroy_sink_bin (void);
185 gboolean create_demux_sink_bin (guint num_sub_bins,
186  NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index);
187 
188 void set_rtsp_udp_port_num (guint rtsp_port_num, guint udp_port_num);
189 
190 #ifdef __cplusplus
191 }
192 #endif
193 
194 #endif
NvDsSinkEncoderConfig
Definition: deepstream_sinks.h:66
NvDsSinkMsgConvBrokerConfig::disable_msgconv
gboolean disable_msgconv
Definition: deepstream_sinks.h:124
NV_DS_SINK_UDPSINK
@ NV_DS_SINK_UDPSINK
Definition: deepstream_sinks.h:36
NvDsSinkMsgConvBrokerConfig::sync
gint sync
Definition: deepstream_sinks.h:125
NvDsSinkMsgConvBrokerConfig::conv_msg2p_lib
gchar * conv_msg2p_lib
Definition: deepstream_sinks.h:111
NvDsSinkMsgConvBrokerConfig::multiple_payloads
gboolean multiple_payloads
Definition: deepstream_sinks.h:114
NvDsSinkBinSubBin::mux
GstElement * mux
Definition: deepstream_sinks.h:151
NvDsSinkEncoderConfig::output_io_mode
NvDsEncOutputIOMode output_io_mode
Definition: deepstream_sinks.h:83
NvDsSinkEncoderConfig::enc_type
NvDsEncHwSwType enc_type
Definition: deepstream_sinks.h:71
destroy_sink_bin
void destroy_sink_bin(void)
NvDsSinkBinSubBin::sink_buffer_probe
gulong sink_buffer_probe
Definition: deepstream_sinks.h:154
NvDsSinkEncoderConfig::output_file_path
gchar * output_file_path
Definition: deepstream_sinks.h:76
NvDsSinkBinSubBin::sink
GstElement * sink
Definition: deepstream_sinks.h:152
NvDsSinkRenderConfig::qos_value_specified
gboolean qos_value_specified
Definition: deepstream_sinks.h:94
NV_DS_SINK_FAKE
@ NV_DS_SINK_FAKE
Definition: deepstream_sinks.h:29
NvDsSinkRenderConfig::type
NvDsSinkType type
Definition: deepstream_sinks.h:89
NvDsSinkSubBinConfig::render_config
NvDsSinkRenderConfig render_config
Definition: deepstream_sinks.h:138
NvDsSinkRenderConfig::width
gint width
Definition: deepstream_sinks.h:90
NvDsSinkRenderConfig::gpu_id
guint gpu_id
Definition: deepstream_sinks.h:95
NvDsSinkSubBinConfig
Definition: deepstream_sinks.h:130
NvDsSinkEncoderConfig::copy_meta
guint copy_meta
Definition: deepstream_sinks.h:82
NvDsSinkSubBinConfig::msg_conv_broker_config
NvDsSinkMsgConvBrokerConfig msg_conv_broker_config
Definition: deepstream_sinks.h:139
NvDsSinkMsgConvBrokerConfig::broker_config_file_path
gchar * broker_config_file_path
Definition: deepstream_sinks.h:122
NvDsSinkRenderConfig::set_mode
gboolean set_mode
Definition: deepstream_sinks.h:102
NvDsSinkBin::tee
GstElement * tee
Definition: deepstream_sinks.h:161
NvDsSinkType
NvDsSinkType
Definition: deepstream_sinks.h:27
create_sink_bin
gboolean create_sink_bin(guint num_sub_bins, NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index)
Initialize NvDsSinkBin.
NvDsSinkBin::queue
GstElement * queue
Definition: deepstream_sinks.h:160
NvDsSinkBin::num_bins
gint num_bins
Definition: deepstream_sinks.h:163
NvDsSinkBinSubBin::encoder
GstElement * encoder
Definition: deepstream_sinks.h:149
NvDsEncOutputIOMode
NvDsEncOutputIOMode
Definition: deepstream_sinks.h:60
NvDsSinkRenderConfig::conn_id
guint conn_id
Definition: deepstream_sinks.h:100
NvDsSinkRenderConfig::offset_y
guint offset_y
Definition: deepstream_sinks.h:98
NvDsSinkSubBinConfig::link_to_demux
gboolean link_to_demux
Definition: deepstream_sinks.h:134
NvDsSinkMsgConvBrokerConfig::new_api
gboolean new_api
Definition: deepstream_sinks.h:126
NV_DS_ENCODER_H265
@ NV_DS_ENCODER_H265
Definition: deepstream_sinks.h:50
NvDsSinkMsgConvBrokerConfig
Definition: deepstream_sinks.h:105
NvDsSinkBinSubBin::rtppay
GstElement * rtppay
Definition: deepstream_sinks.h:153
NvDsSinkRenderConfig
Definition: deepstream_sinks.h:87
NvDsSinkMsgConvBrokerConfig::debug_payload_dir
gchar * debug_payload_dir
Definition: deepstream_sinks.h:113
NvDsSinkMsgConvBrokerConfig::conv_frame_interval
guint conv_frame_interval
Definition: deepstream_sinks.h:116
NV_DS_ENCODER_OUTPUT_IO_MODE_DMABUF_IMPORT
@ NV_DS_ENCODER_OUTPUT_IO_MODE_DMABUF_IMPORT
Definition: deepstream_sinks.h:63
NV_DS_SINK_RENDER_DRM
@ NV_DS_SINK_RENDER_DRM
Definition: deepstream_sinks.h:37
NvDsSinkBinSubBin::enc_caps_filter
GstElement * enc_caps_filter
Definition: deepstream_sinks.h:148
NvDsSinkEncoderConfig::iframeinterval
guint iframeinterval
Definition: deepstream_sinks.h:81
NvDsSinkSubBinConfig::type
NvDsSinkType type
Definition: deepstream_sinks.h:135
NvDsSinkEncoderConfig::sync
gint sync
Definition: deepstream_sinks.h:75
NvDsSinkEncoderConfig::bitrate
gint bitrate
Definition: deepstream_sinks.h:73
NV_DS_ENCODER_TYPE_HW
@ NV_DS_ENCODER_TYPE_HW
Definition: deepstream_sinks.h:56
NvDsSinkMsgConvBrokerConfig::broker_sleep_time
guint broker_sleep_time
Definition: deepstream_sinks.h:127
NvDsSinkRenderConfig::plane_id
guint plane_id
Definition: deepstream_sinks.h:101
NvDsSinkMsgConvBrokerConfig::proto_lib
gchar * proto_lib
Broker settings.
Definition: deepstream_sinks.h:119
NV_DS_SINK_ENCODE_FILE
@ NV_DS_SINK_ENCODE_FILE
Definition: deepstream_sinks.h:35
NvDsSinkBinSubBin
Definition: deepstream_sinks.h:142
NV_DS_SINK_RENDER_EGL
@ NV_DS_SINK_RENDER_EGL
Definition: deepstream_sinks.h:31
NvDsSinkRenderConfig::color_range
guint color_range
Definition: deepstream_sinks.h:99
NvDsEncHwSwType
NvDsEncHwSwType
Definition: deepstream_sinks.h:54
NV_DS_CONTAINER_MKV
@ NV_DS_CONTAINER_MKV
Definition: deepstream_sinks.h:44
NvDsSinkMsgConvBrokerConfig::broker_comp_id
guint broker_comp_id
Definition: deepstream_sinks.h:123
NvDsSinkEncoderConfig::udp_buffer_size
guint64 udp_buffer_size
Definition: deepstream_sinks.h:80
NvDsSinkEncoderConfig::sw_preset
gint sw_preset
Definition: deepstream_sinks.h:84
NvDsSinkRenderConfig::nvbuf_memory_type
guint nvbuf_memory_type
Definition: deepstream_sinks.h:96
NvDsSinkRenderConfig::height
gint height
Definition: deepstream_sinks.h:91
NvDsSinkRenderConfig::qos
gboolean qos
Definition: deepstream_sinks.h:93
NV_DS_SINK_MSG_CONV_BROKER
@ NV_DS_SINK_MSG_CONV_BROKER
Definition: deepstream_sinks.h:38
NvDsSinkBinSubBin::cap_filter
GstElement * cap_filter
Definition: deepstream_sinks.h:147
NvDsSinkSubBinConfig::enable
gboolean enable
Definition: deepstream_sinks.h:132
NvDsSinkEncoderConfig::profile
guint profile
Definition: deepstream_sinks.h:74
NvDsSinkBinSubBin::queue
GstElement * queue
Definition: deepstream_sinks.h:145
NvDsSinkMsgConvBrokerConfig::conv_msg2p_new_api
gboolean conv_msg2p_new_api
Definition: deepstream_sinks.h:115
NvDsSinkRenderConfig::sync
gint sync
Definition: deepstream_sinks.h:92
NvDsSinkEncoderConfig::codec
NvDsEncoderType codec
Definition: deepstream_sinks.h:70
NvDsSinkSubBinConfig::encoder_config
NvDsSinkEncoderConfig encoder_config
Definition: deepstream_sinks.h:137
NV_DS_ENCODER_H264
@ NV_DS_ENCODER_H264
Definition: deepstream_sinks.h:49
MAX_SINK_BINS
#define MAX_SINK_BINS
Definition: deepstream_config.h:85
NvDsSinkEncoderConfig::container
NvDsContainerType container
Definition: deepstream_sinks.h:69
NvDsSinkMsgConvBrokerConfig::enable
gboolean enable
Definition: deepstream_sinks.h:107
NvDsSinkEncoderConfig::compute_hw
guint compute_hw
Definition: deepstream_sinks.h:72
NvDsSinkMsgConvBrokerConfig::conv_payload_type
guint conv_payload_type
Definition: deepstream_sinks.h:110
NvDsSinkMsgConvBrokerConfig::conn_str
gchar * conn_str
Definition: deepstream_sinks.h:120
NV_DS_CONTAINER_MP4
@ NV_DS_CONTAINER_MP4
Definition: deepstream_sinks.h:43
NvDsSinkBinSubBin::transform
GstElement * transform
Definition: deepstream_sinks.h:146
NvDsSinkBin
Definition: deepstream_sinks.h:157
NV_DS_ENCODER_TYPE_SW
@ NV_DS_ENCODER_TYPE_SW
Definition: deepstream_sinks.h:57
NvDsSinkSubBinConfig::source_id
guint source_id
Definition: deepstream_sinks.h:133
NvDsSinkMsgConvBrokerConfig::conv_dummy_payload
gboolean conv_dummy_payload
Definition: deepstream_sinks.h:117
NvDsSinkBin::bin
GstElement * bin
Definition: deepstream_sinks.h:159
NvDsSinkBinSubBin::codecparse
GstElement * codecparse
Definition: deepstream_sinks.h:150
create_demux_sink_bin
gboolean create_demux_sink_bin(guint num_sub_bins, NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index)
NvDsSinkEncoderConfig::rtsp_port
guint rtsp_port
Definition: deepstream_sinks.h:78
NvDsSinkMsgConvBrokerConfig::config_file_path
gchar * config_file_path
MsgConv settings.
Definition: deepstream_sinks.h:109
NvDsSinkBinSubBin::bin
GstElement * bin
Definition: deepstream_sinks.h:144
NvDsContainerType
NvDsContainerType
Definition: deepstream_sinks.h:41
NvDsSinkEncoderConfig::type
NvDsSinkType type
Definition: deepstream_sinks.h:68
NvDsSinkMsgConvBrokerConfig::conv_comp_id
guint conv_comp_id
Definition: deepstream_sinks.h:112
NvDsSinkSubBinConfig::sync
gint sync
Definition: deepstream_sinks.h:136
NvDsSinkEncoderConfig::udp_port
guint udp_port
Definition: deepstream_sinks.h:79
NvDsSinkEncoderConfig::gpu_id
guint gpu_id
Definition: deepstream_sinks.h:77
NV_DS_ENCODER_MPEG4
@ NV_DS_ENCODER_MPEG4
Definition: deepstream_sinks.h:51
NvDsSinkRenderConfig::offset_x
guint offset_x
Definition: deepstream_sinks.h:97
NvDsEncoderType
NvDsEncoderType
Definition: deepstream_sinks.h:47
NV_DS_ENCODER_OUTPUT_IO_MODE_MMAP
@ NV_DS_ENCODER_OUTPUT_IO_MODE_MMAP
Definition: deepstream_sinks.h:62
set_rtsp_udp_port_num
void set_rtsp_udp_port_num(guint rtsp_port_num, guint udp_port_num)
NvDsSinkMsgConvBrokerConfig::topic
gchar * topic
Definition: deepstream_sinks.h:121