NVIDIA DeepStream SDK API Reference

9.1 Release
sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2017-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 __DSEXAMPLE_LIB__
19 #define __DSEXAMPLE_LIB__
20 
21 #define MAX_LABEL_SIZE 128
22 #ifdef __cplusplus
23 extern "C" {
24 #endif
25 
26 typedef struct DsExampleCtx DsExampleCtx;
27 
28 // Init parameters structure as input, required for instantiating dsexample_lib
29 typedef struct
30 {
31  // Width at which frame/object will be scaled
33  // height at which frame/object will be scaled
35  // Flag to indicate whether operating on crops of full frame
36  int fullFrame;
38 
39 // Detected/Labelled object structure, stores bounding box info along with label
40 typedef struct
41 {
42  float left;
43  float top;
44  float width;
45  float height;
46  char label[MAX_LABEL_SIZE];
48 
49 // Output data returned after processing
50 typedef struct
51 {
53  DsExampleObject object[4];
55 
56 // Initialize library context
58 
59 // Dequeue processed output
60 DsExampleOutput *DsExampleProcess (DsExampleCtx *ctx, unsigned char *data);
61 
62 // Deinitialize library context
64 
65 #ifdef __cplusplus
66 }
67 #endif
68 
69 #endif
DsExampleInitParams::fullFrame
int fullFrame
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:36
DsExampleObject::left
float left
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:42
DsExampleCtxInit
DsExampleCtx * DsExampleCtxInit(DsExampleInitParams *init_params)
DsExampleObject::top
float top
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:43
DsExampleObject
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:40
DsExampleCtx
struct DsExampleCtx DsExampleCtx
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:26
DsExampleProcess
DsExampleOutput * DsExampleProcess(DsExampleCtx *ctx, unsigned char *data)
DsExampleInitParams::processingHeight
int processingHeight
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:34
DsExampleOutput
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:50
DsExampleOutput::numObjects
int numObjects
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:52
MAX_LABEL_SIZE
#define MAX_LABEL_SIZE
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:21
DsExampleInitParams
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:29
DsExampleObject::height
float height
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:45
DsExampleCtxDeinit
void DsExampleCtxDeinit(DsExampleCtx *ctx)
DsExampleObject::width
float width
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:44
DsExampleInitParams::processingWidth
int processingWidth
Definition: sources/gst-plugins/gst-dsexample/dsexample_lib/dsexample_lib.h:32