NVIDIA DeepStream SDK API Reference

8.0 Release
9.0/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: 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 {
68  NvDsSinkType type;
69  NvDsContainerType container;
70  NvDsEncoderType codec;
71  NvDsEncHwSwType enc_type;
72  guint compute_hw;
73  gint bitrate;
74  guint profile;
75  gint sync;
76  gchar *output_file_path;
77  guint gpu_id;
78  guint rtsp_port;
79  guint udp_port;
80  guint64 udp_buffer_size;
81  guint iframeinterval;
82  guint copy_meta;
83  NvDsEncOutputIOMode output_io_mode;
84  gint sw_preset;
86 
87 typedef struct
88 {
89  NvDsSinkType type;
90  gint width;
91  gint height;
92  gint sync;
93  gboolean qos;
94  gboolean qos_value_specified;
95  guint gpu_id;
96  guint nvbuf_memory_type;
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;
109  gchar* config_file_path;
110  guint conv_payload_type;
111  gchar* conv_msg2p_lib;
112  guint conv_comp_id;
113  gchar* debug_payload_dir;
114  gboolean multiple_payloads;
115  gboolean conv_msg2p_new_api;
116  guint conv_frame_interval;
117  gboolean conv_dummy_payload;
118  gchar *embedding_filter;
120  gchar* proto_lib;
121  gchar* conn_str;
122  gchar* topic;
123  gchar* broker_config_file_path;
124  guint broker_comp_id;
125  gboolean disable_msgconv;
126  gint sync;
127  gboolean new_api;
128  guint broker_sleep_time;
130 
131 typedef struct
132 {
133  gboolean enable;
134  guint source_id;
135  gboolean link_to_demux;
136  gboolean nvdslogger;
137  gboolean show_fps;
138  gboolean show_latency;
139  NvDsSinkType type;
140  gint sync;
141  NvDsSinkEncoderConfig encoder_config;
142  NvDsSinkRenderConfig render_config;
143  NvDsSinkMsgConvBrokerConfig msg_conv_broker_config;
145 
146 typedef struct
147 {
148  GstElement *bin;
149  GstElement *queue;
150  GstElement *transform;
151  GstElement *cap_filter;
152  GstElement *enc_caps_filter;
153  GstElement *encoder;
154  GstElement *codecparse;
155  GstElement *mux;
156  GstElement *sink;
157  GstElement *rtppay;
158  gulong sink_buffer_probe;
160 
161 typedef struct
162 {
163  GstElement *bin;
164  GstElement *queue;
165  GstElement *tee;
166  GstElement *nvdslogger;
167  GstElement *nvdslogger_queue;
168 
169  gint num_bins;
171 } NvDsSinkBin;
172 
187 gboolean create_sink_bin (guint num_sub_bins,
188  NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index);
189 
190 void destroy_sink_bin (void);
191 gboolean create_demux_sink_bin (guint num_sub_bins,
192  NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index);
193 
194 void set_rtsp_udp_port_num (guint rtsp_port_num, guint udp_port_num);
195 
196 #ifdef __cplusplus
197 }
198 #endif
199 
200 #endif
NvDsSinkEncoderConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:66
set_rtsp_udp_port_num
void set_rtsp_udp_port_num(guint rtsp_port_num, guint udp_port_num)
NV_DS_ENCODER_OUTPUT_IO_MODE_MMAP
@ NV_DS_ENCODER_OUTPUT_IO_MODE_MMAP
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:62
NV_DS_SINK_UDPSINK
@ NV_DS_SINK_UDPSINK
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:36
NV_DS_ENCODER_MPEG4
@ NV_DS_ENCODER_MPEG4
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:51
NV_DS_SINK_MSG_CONV_BROKER
@ NV_DS_SINK_MSG_CONV_BROKER
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:38
NvDsEncHwSwType
NvDsEncHwSwType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:54
NvDsSinkSubBinConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:131
NV_DS_CONTAINER_MP4
@ NV_DS_CONTAINER_MP4
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:43
create_demux_sink_bin
gboolean create_demux_sink_bin(guint num_sub_bins, NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index)
NV_DS_ENCODER_TYPE_SW
@ NV_DS_ENCODER_TYPE_SW
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:57
NV_DS_CONTAINER_MKV
@ NV_DS_CONTAINER_MKV
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:44
NvDsEncOutputIOMode
NvDsEncOutputIOMode
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:60
NV_DS_ENCODER_OUTPUT_IO_MODE_DMABUF_IMPORT
@ NV_DS_ENCODER_OUTPUT_IO_MODE_DMABUF_IMPORT
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:63
NvDsSinkMsgConvBrokerConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:105
NvDsSinkRenderConfig
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:87
destroy_sink_bin
void destroy_sink_bin(void)
NV_DS_SINK_RENDER_EGL
@ NV_DS_SINK_RENDER_EGL
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:31
NV_DS_ENCODER_H264
@ NV_DS_ENCODER_H264
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:49
NV_DS_ENCODER_TYPE_HW
@ NV_DS_ENCODER_TYPE_HW
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:56
MAX_SINK_BINS
#define MAX_SINK_BINS
Definition: sources/apps/apps-common/includes/deepstream_config.h:87
NvDsSinkBinSubBin
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:146
NvDsEncHwSwType
NvDsEncHwSwType
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:54
NvDsSinkType
NvDsSinkType
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:27
NV_DS_SINK_RENDER_DRM
@ NV_DS_SINK_RENDER_DRM
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:37
NV_DS_SINK_ENCODE_FILE
@ NV_DS_SINK_ENCODE_FILE
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:35
create_sink_bin
gboolean create_sink_bin(guint num_sub_bins, NvDsSinkSubBinConfig *config_array, NvDsSinkBin *bin, guint index)
Initialize NvDsSinkBin.
NvDsContainerType
NvDsContainerType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:41
NvDsEncOutputIOMode
NvDsEncOutputIOMode
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:60
NvDsSinkType
NvDsSinkType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:27
NvDsSinkBin
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:161
NV_DS_ENCODER_H265
@ NV_DS_ENCODER_H265
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:50
NvDsEncoderType
NvDsEncoderType
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:47
NvDsContainerType
NvDsContainerType
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:41
NV_DS_SINK_FAKE
@ NV_DS_SINK_FAKE
Definition: 9.0/sources/apps/apps-common/includes/deepstream_sinks.h:29
NvDsEncoderType
NvDsEncoderType
Definition: sources/apps/apps-common/includes/deepstream_sinks.h:47