NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/apps/apps-common/includes/deepstream_sinks.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 
18 #ifndef __NVGSTDS_SINKS_H__
19 #define __NVGSTDS_SINKS_H__
20 
21 #ifdef __aarch64__
22 #define IS_TEGRA
23 #endif
24 
25 #include <gst/gst.h>
26 
27 #ifdef __cplusplus
28 extern "C"
29 {
30 #endif
31 
32 typedef enum
33 {
35 #ifndef IS_TEGRA
37 #else
38  NV_DS_SINK_RENDER_3D,
39 #endif
44 } NvDsSinkType;
45 
46 typedef enum
47 {
51 
52 typedef enum
53 {
58 
59 typedef enum
60 {
64 
65 typedef enum
66 {
70 
71 typedef struct
72 {
73  NvDsSinkType type;
74  NvDsContainerType container;
75  NvDsEncoderType codec;
76  NvDsEncHwSwType enc_type;
77  guint compute_hw;
78  gint bitrate;
79  guint profile;
80  gint sync;
81  gchar *output_file_path;
82  guint gpu_id;
83  guint rtsp_port;
84  guint udp_port;
85  guint64 udp_buffer_size;
86  guint iframeinterval;
87  guint copy_meta;
88  NvDsEncOutputIOMode output_io_mode;
89  gint sw_preset;
91 
92 typedef struct
93 {
94  NvDsSinkType type;
95  gint width;
96  gint height;
97  gint sync;
98  gboolean qos;
99  gboolean qos_value_specified;
100  guint gpu_id;
101  guint nvbuf_memory_type;
102  guint offset_x;
103  guint offset_y;
104  guint color_range;
105  guint conn_id;
106  guint plane_id;
107  gboolean set_mode;
109 
110 typedef struct
111 {
112  gboolean enable;
114  gchar* config_file_path;
115  guint conv_payload_type;
116  gchar* conv_msg2p_lib;
117  guint conv_comp_id;
118  gchar* debug_payload_dir;
119  gboolean multiple_payloads;
120  gboolean conv_msg2p_new_api;
121  guint conv_frame_interval;
122  gboolean conv_dummy_payload;
123  gchar *embedding_filter;
125  gchar* proto_lib;
126  gchar* conn_str;
127  gchar* topic;
128  gchar* broker_config_file_path;
129  guint broker_comp_id;
130  gboolean disable_msgconv;
131  gint sync;
132  gboolean new_api;
133  guint broker_sleep_time;
135 
136 typedef struct
137 {
138  gboolean enable;
139  guint source_id;
140  gboolean link_to_demux;
141  gboolean nvdslogger;
142  gboolean show_fps;
143  gboolean show_latency;
144  NvDsSinkType type;
145  gint sync;
146  NvDsSinkEncoderConfig encoder_config;
147  NvDsSinkRenderConfig render_config;
148  NvDsSinkMsgConvBrokerConfig msg_conv_broker_config;
150 
151 typedef struct
152 {
153  GstElement *bin;
154  GstElement *queue;
155  GstElement *transform;
156  GstElement *cap_filter;
157  GstElement *enc_caps_filter;
158  GstElement *encoder;
159  GstElement *codecparse;
160  GstElement *mux;
161  GstElement *sink;
162  GstElement *rtppay;
163  gulong sink_buffer_probe;
165 
166 typedef struct
167 {
168  GstElement *bin;
169  GstElement *queue;
170  GstElement *tee;
171  GstElement *nvdslogger;
172  GstElement *nvdslogger_queue;
173 
174  gint num_bins;
176 } NvDsSinkBin;
177 
192 gboolean create_sink_bin (guint num_sub_bins,
193  NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index);
194 
195 void destroy_sink_bin (void);
196 gboolean create_demux_sink_bin (guint num_sub_bins,
197  NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index);
198 
199 void set_rtsp_udp_port_num (guint rtsp_port_num, guint udp_port_num);
200 
201 #ifdef __cplusplus
202 }
203 #endif
204 
205 #endif
NvDsSinkEncoderConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:71
NV_DS_SINK_MSG_CONV_BROKER
@ NV_DS_SINK_MSG_CONV_BROKER
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:43
NV_DS_ENCODER_OUTPUT_IO_MODE_MMAP
@ NV_DS_ENCODER_OUTPUT_IO_MODE_MMAP
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:67
destroy_sink_bin
void destroy_sink_bin(void)
NV_DS_ENCODER_MPEG4
@ NV_DS_ENCODER_MPEG4
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:56
NV_DS_CONTAINER_MP4
@ NV_DS_CONTAINER_MP4
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:48
NvDsEncHwSwType
NvDsEncHwSwType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:59
NvDsSinkSubBinConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:136
NV_DS_ENCODER_OUTPUT_IO_MODE_DMABUF_IMPORT
@ NV_DS_ENCODER_OUTPUT_IO_MODE_DMABUF_IMPORT
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:68
NV_DS_SINK_RENDER_EGL
@ NV_DS_SINK_RENDER_EGL
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:36
create_demux_sink_bin
gboolean create_demux_sink_bin(guint num_sub_bins, NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index)
NvDsSinkMsgConvBrokerConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:110
NV_DS_SINK_UDPSINK
@ NV_DS_SINK_UDPSINK
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:41
NV_DS_ENCODER_H264
@ NV_DS_ENCODER_H264
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:54
NvDsSinkRenderConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:92
NV_DS_CONTAINER_MKV
@ NV_DS_CONTAINER_MKV
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:49
create_sink_bin
gboolean create_sink_bin(guint num_sub_bins, NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index)
Initialize NvDsSinkBin.
NvDsContainerType
NvDsContainerType
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:46
NV_DS_ENCODER_TYPE_SW
@ NV_DS_ENCODER_TYPE_SW
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:62
NvDsEncHwSwType
NvDsEncHwSwType
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:59
NV_DS_SINK_RENDER_DRM
@ NV_DS_SINK_RENDER_DRM
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:42
MAX_SINK_BINS
#define MAX_SINK_BINS
Definition: sources/apps/apps-common/includes/deepstream_config.h:92
NvDsSinkBinSubBin
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:151
NvDsContainerType
NvDsContainerType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:46
NvDsEncOutputIOMode
NvDsEncOutputIOMode
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:65
NV_DS_SINK_ENCODE_FILE
@ NV_DS_SINK_ENCODE_FILE
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:40
NV_DS_ENCODER_TYPE_HW
@ NV_DS_ENCODER_TYPE_HW
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:61
set_rtsp_udp_port_num
void set_rtsp_udp_port_num(guint rtsp_port_num, guint udp_port_num)
NvDsSinkType
NvDsSinkType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:32
NvDsEncOutputIOMode
NvDsEncOutputIOMode
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:65
NvDsEncoderType
NvDsEncoderType
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:52
NV_DS_ENCODER_H265
@ NV_DS_ENCODER_H265
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:55
NvDsSinkBin
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:166
NvDsSinkType
NvDsSinkType
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:32
NV_DS_SINK_FAKE
@ NV_DS_SINK_FAKE
Definition: 9.1/sources/apps/apps-common/includes/deepstream_sinks.h:34
NvDsEncoderType
NvDsEncoderType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:52