NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2022-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 DEEPSTREAM_UCX_TEST_APP_H
19 #define DEEPSTREAM_UCX_TEST_APP_H
20 
21 #include <glib.h>
22 #include <stdio.h>
23 
24 /* Constants definitions */
25 #define MUXER_OUTPUT_WIDTH 1920
26 #define MUXER_OUTPUT_HEIGHT 1080
27 #define MUXER_BATCH_TIMEOUT_USEC 40000
28 #define GST_CAPS_FEATURES_NVMM "memory:NVMM"
29 #define NVINFER_PLUGIN "nvinfer"
30 #define NVINFERSERVER_PLUGIN "nvinferserver"
31 
32 
33 /* Server Arguments */
34 
35 typedef struct {
36  gchar *addr;
37  gint64 port;
38  gint64 width;
39  gint64 height;
40  gchar *uri;
42 
43 typedef struct {
44  gchar *addr;
45  gint64 port;
46  gint64 width;
47  gint64 height;
48  gchar *libpath;
49  gchar *output;
51 
52 typedef struct {
53  gchar *addr;
54  gint64 port;
55  gchar *libpath;
56  gchar *uri;
58 
59 /* Client Arguments */
60 
61 typedef struct {
62  gchar *addr;
63  gint64 port;
64  gint64 width;
65  gint64 height;
66  gchar *outfile;
68 
69 typedef struct {
70  gchar *addr;
71  gint64 port;
72  gchar *inferpath;
73  gchar *libpath;
74  gchar *uri;
76 
77 typedef struct {
78  gchar *addr;
79  gint64 port;
80  gchar *libpath;
81  gchar *outfile;
83 
84 /* Common Structs */
85 
86 typedef enum {
90 } Role;
91 
92 typedef struct {
93  int test_id;
94  GMainLoop *loop;
95  GstElement *pipeline;
96  Role role;
97  gboolean is_nvinfer_server;
98 
99  union {
100  ServerTest1Args server_test1;
101  ServerTest2Args server_test2;
102  ServerTest3Args server_test3;
103  ClientTest1Args client_test1;
104  ClientTest2Args client_test2;
105  ClientTest3Args client_test3;
106  } args;
107 } UcxTest;
108 
109 /* Function prototypes */
110 
111 // Test 1
112 int test1_client_parse_args(int argc, char *argv[], UcxTest *t);
114 
115 int test1_server_parse_args(int argc, char *argv[], UcxTest *t);
117 
118 // Test 2
119 int test2_client_parse_args(int argc, char *argv[], UcxTest *t);
121 
122 int test2_server_parse_args(int argc, char *argv[], UcxTest *t);
124 
125 // Test 3
126 int test3_client_parse_args(int argc, char *argv[], UcxTest *t);
128 
129 int test3_server_parse_args(int argc, char *argv[], UcxTest *t);
131 
132 
133 typedef struct {
134  int (*parse_args)(int argc, char *argv[], UcxTest *t);
135  int (*setup_pipeline)(UcxTest *t);
137 
138 typedef struct {
139  OperationFunctions client;
140  OperationFunctions server;
141 } TestOps;
142 
144  {
147  },
148  {
151  },
152  {
155  }
156 };
157 
158 
159 
160 #endif // DEEPSTREAM_UCX_TEST_APP_H
SERVER
@ SERVER
Definition: 9.1/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:87
ServerTest1Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:35
OperationFunctions
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:133
UcxTest
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:92
test2_client_setup_pipeline
int test2_client_setup_pipeline(UcxTest *t)
ClientTest1Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:61
INIT
@ INIT
Definition: 9.1/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:89
ServerTest3Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:52
ClientTest3Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:77
CLIENT
@ CLIENT
Definition: 9.1/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:88
Role
Role
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:86
test1_client_setup_pipeline
int test1_client_setup_pipeline(UcxTest *t)
test2_server_parse_args
int test2_server_parse_args(int argc, char *argv[], UcxTest *t)
test3_server_setup_pipeline
int test3_server_setup_pipeline(UcxTest *t)
test2_server_setup_pipeline
int test2_server_setup_pipeline(UcxTest *t)
ServerTest2Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:43
test2_client_parse_args
int test2_client_parse_args(int argc, char *argv[], UcxTest *t)
test1_server_parse_args
int test1_server_parse_args(int argc, char *argv[], UcxTest *t)
test3_client_parse_args
int test3_client_parse_args(int argc, char *argv[], UcxTest *t)
TestOps
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:138
Role
Role
Definition: 9.1/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:86
test3_server_parse_args
int test3_server_parse_args(int argc, char *argv[], UcxTest *t)
test1_client_parse_args
int test1_client_parse_args(int argc, char *argv[], UcxTest *t)
testOperations
TestOps testOperations[]
Definition: 9.1/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:143
ClientTest2Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:69
test3_client_setup_pipeline
int test3_client_setup_pipeline(UcxTest *t)
test1_server_setup_pipeline
int test1_server_setup_pipeline(UcxTest *t)