NVIDIA DeepStream SDK API Reference

9.1 Release
9.1/sources/apps/apps-common/includes/deepstream_perf.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: 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 __NVGSTDS_PERF_H__
19 #define __NVGSTDS_PERF_H__
20 
21 #include <gst/gst.h>
22 
23 #ifdef __cplusplus
24 extern "C"
25 {
26 #endif
27 
28 #include "deepstream_config.h"
29 
30 typedef struct
31 {
32  guint source_id;
33  gchar const* uri;
34  gchar const* sensor_id;
35  gchar const* sensor_name;
37 
38 typedef struct
39 {
40  guint source_id;
41  char *stream_name;
42  gchar const* sensor_id;
43  gchar const* sensor_name;
45 
46 typedef struct
47 {
48  gdouble fps[MAX_SOURCE_BINS];
49  gdouble fps_avg[MAX_SOURCE_BINS];
50  guint num_instances;
51  NvDsAppSourceDetail source_detail[MAX_SOURCE_BINS];
52  guint active_source_size;
53  gboolean stream_name_display;
54  gboolean use_nvmultiurisrcbin;
56 
57 typedef void (*perf_callback) (gpointer ctx, NvDsAppPerfStruct * str);
58 
59 typedef struct
60 {
61  guint buffer_cnt;
62  guint total_buffer_cnt;
63  struct timeval total_fps_time;
64  struct timeval start_fps_time;
65  struct timeval last_fps_time;
66  struct timeval last_sample_fps_time;
68 
69 typedef struct
70 {
71  gulong measurement_interval_ms;
72  gulong perf_measurement_timeout_id;
73  guint num_instances;
74  gboolean stop;
75  gpointer context;
76  GMutex struct_lock;
77  perf_callback callback;
78  GstPad *sink_bin_pad;
79  gulong fps_measure_probe_id;
81  guint dewarper_surfaces_per_frame;
82  GHashTable *FPSInfoHash;
83  gboolean stream_name_display;
84  gboolean use_nvmultiurisrcbin;
86 
88  GstPad *sink_bin_pad, guint num_sources, gulong interval_sec,
89  guint num_surfaces_per_frame, perf_callback callback);
90 
93 
94 #ifdef __cplusplus
95 }
96 #endif
97 
98 #endif
pause_perf_measurement
void pause_perf_measurement(NvDsAppPerfStructInt *str)
MAX_SOURCE_BINS
#define MAX_SOURCE_BINS
Definition: sources/apps/apps-common/includes/deepstream_config.h:91
NvDsInstancePerfStruct
Definition: sources/apps/apps-common/includes/deepstream_perf.h:59
NvDsAppSourceDetail
Definition: sources/apps/apps-common/includes/deepstream_perf.h:38
NvDsAppPerfStructInt
Definition: sources/apps/apps-common/includes/deepstream_perf.h:69
NvDsFPSSensorInfo
Definition: sources/apps/apps-common/includes/deepstream_perf.h:30
deepstream_config.h
resume_perf_measurement
void resume_perf_measurement(NvDsAppPerfStructInt *str)
perf_callback
void(* perf_callback)(gpointer ctx, NvDsAppPerfStruct *str)
Definition: 9.1/sources/apps/apps-common/includes/deepstream_perf.h:57
enable_perf_measurement
gboolean enable_perf_measurement(NvDsAppPerfStructInt *str, GstPad *sink_bin_pad, guint num_sources, gulong interval_sec, guint num_surfaces_per_frame, perf_callback callback)
NvDsAppPerfStruct
Definition: sources/apps/apps-common/includes/deepstream_perf.h:46