NVIDIA DeepStream SDK API Reference

9.1 Release
sources/gst-plugins/gst-nvdsvisionencoder-c/trt_encoder.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 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 __TRT_ENCODER_H__
19 #define __TRT_ENCODER_H__
20 
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24 
33 void* nvds_triton_client_create(const char* url, const char* model_name,
34  int batch_size, const char* onnx_model);
35 
40 void nvds_triton_client_destroy(void* client);
41 
49 int nvds_triton_client_get_input_size(void* client, unsigned int* width, unsigned int* height);
50 
56 int nvds_triton_client_get_embedding_dim(void* client);
57 
63 unsigned int nvds_triton_client_get_input_width(void* client);
64 
70 unsigned int nvds_triton_client_get_input_height(void* client);
71 
80 int nvds_triton_client_infer(void* client, float* input_data, int num_images,
81  float* output_embeddings);
82 
91 int nvds_triton_client_infer_device(void* client, float* d_input_data, int num_images,
92  float* output_embeddings);
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif /* __TRT_ENCODER_H__ */
nvds_triton_client_infer
int nvds_triton_client_infer(void *client, float *input_data, int num_images, float *output_embeddings)
Run inference on host input data.
nvds_triton_client_get_input_height
unsigned int nvds_triton_client_get_input_height(void *client)
Get input height.
nvds_triton_client_infer_device
int nvds_triton_client_infer_device(void *client, float *d_input_data, int num_images, float *output_embeddings)
Run inference on device input data (GPU path)
nvds_triton_client_destroy
void nvds_triton_client_destroy(void *client)
Destroy TensorRT encoder client.
nvds_triton_client_create
void * nvds_triton_client_create(const char *url, const char *model_name, int batch_size, const char *onnx_model)
Create TensorRT encoder client.
nvds_triton_client_get_input_size
int nvds_triton_client_get_input_size(void *client, unsigned int *width, unsigned int *height)
Get input dimensions from encoder.
nvds_triton_client_get_input_width
unsigned int nvds_triton_client_get_input_width(void *client)
Get input width.
nvds_triton_client_get_embedding_dim
int nvds_triton_client_get_embedding_dim(void *client)
Get embedding dimension from encoder.