NVIDIA DeepStream SDK API Reference

9.0 Release
9.0/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-2023 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 DEEPSTREAM_UCX_TEST_APP_H
14 #define DEEPSTREAM_UCX_TEST_APP_H
15 
16 #include <glib.h>
17 #include <stdio.h>
18 
19 /* Constants definitions */
20 #define MUXER_OUTPUT_WIDTH 1920
21 #define MUXER_OUTPUT_HEIGHT 1080
22 #define MUXER_BATCH_TIMEOUT_USEC 40000
23 #define GST_CAPS_FEATURES_NVMM "memory:NVMM"
24 #define NVINFER_PLUGIN "nvinfer"
25 #define NVINFERSERVER_PLUGIN "nvinferserver"
26 
27 
28 /* Server Arguments */
29 
30 typedef struct {
31  gchar *addr;
32  gint64 port;
33  gint64 width;
34  gint64 height;
35  gchar *uri;
37 
38 typedef struct {
39  gchar *addr;
40  gint64 port;
41  gint64 width;
42  gint64 height;
43  gchar *libpath;
44  gchar *output;
46 
47 typedef struct {
48  gchar *addr;
49  gint64 port;
50  gchar *libpath;
51  gchar *uri;
53 
54 /* Client Arguments */
55 
56 typedef struct {
57  gchar *addr;
58  gint64 port;
59  gint64 width;
60  gint64 height;
61  gchar *outfile;
63 
64 typedef struct {
65  gchar *addr;
66  gint64 port;
67  gchar *inferpath;
68  gchar *libpath;
69  gchar *uri;
71 
72 typedef struct {
73  gchar *addr;
74  gint64 port;
75  gchar *libpath;
76  gchar *outfile;
78 
79 /* Common Structs */
80 
81 typedef enum {
85 } Role;
86 
87 typedef struct {
88  int test_id;
89  GMainLoop *loop;
90  GstElement *pipeline;
91  Role role;
92  gboolean is_nvinfer_server;
93 
94  union {
95  ServerTest1Args server_test1;
96  ServerTest2Args server_test2;
97  ServerTest3Args server_test3;
98  ClientTest1Args client_test1;
99  ClientTest2Args client_test2;
100  ClientTest3Args client_test3;
101  } args;
102 } UcxTest;
103 
104 /* Function prototypes */
105 
106 // Test 1
107 int test1_client_parse_args(int argc, char *argv[], UcxTest *t);
109 
110 int test1_server_parse_args(int argc, char *argv[], UcxTest *t);
112 
113 // Test 2
114 int test2_client_parse_args(int argc, char *argv[], UcxTest *t);
116 
117 int test2_server_parse_args(int argc, char *argv[], UcxTest *t);
119 
120 // Test 3
121 int test3_client_parse_args(int argc, char *argv[], UcxTest *t);
123 
124 int test3_server_parse_args(int argc, char *argv[], UcxTest *t);
126 
127 
128 typedef struct {
129  int (*parse_args)(int argc, char *argv[], UcxTest *t);
130  int (*setup_pipeline)(UcxTest *t);
132 
133 typedef struct {
134  OperationFunctions client;
135  OperationFunctions server;
136 } TestOps;
137 
139  {
142  },
143  {
146  },
147  {
150  }
151 };
152 
153 
154 
155 #endif // DEEPSTREAM_UCX_TEST_APP_H
test2_client_parse_args
int test2_client_parse_args(int argc, char *argv[], UcxTest *t)
ServerTest1Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:30
OperationFunctions
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:128
UcxTest
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:87
ClientTest1Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:56
testOperations
TestOps testOperations[]
Definition: 9.0/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:138
test3_client_parse_args
int test3_client_parse_args(int argc, char *argv[], UcxTest *t)
test1_server_parse_args
int test1_server_parse_args(int argc, char *argv[], UcxTest *t)
ServerTest3Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:47
test1_server_setup_pipeline
int test1_server_setup_pipeline(UcxTest *t)
test3_server_setup_pipeline
int test3_server_setup_pipeline(UcxTest *t)
ClientTest3Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:72
INIT
@ INIT
Definition: 9.0/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:84
test3_server_parse_args
int test3_server_parse_args(int argc, char *argv[], UcxTest *t)
Role
Role
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:81
SERVER
@ SERVER
Definition: 9.0/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:82
test1_client_parse_args
int test1_client_parse_args(int argc, char *argv[], UcxTest *t)
test3_client_setup_pipeline
int test3_client_setup_pipeline(UcxTest *t)
Role
Role
Definition: 9.0/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:81
test1_client_setup_pipeline
int test1_client_setup_pipeline(UcxTest *t)
CLIENT
@ CLIENT
Definition: 9.0/sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:83
ServerTest2Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:38
test2_server_setup_pipeline
int test2_server_setup_pipeline(UcxTest *t)
test2_server_parse_args
int test2_server_parse_args(int argc, char *argv[], UcxTest *t)
TestOps
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:133
test2_client_setup_pipeline
int test2_client_setup_pipeline(UcxTest *t)
ClientTest2Args
Definition: sources/apps/sample_apps/deepstream-ucx-test/deepstream_ucx_test_app.h:64