NVIDIA DeepStream SDK API Reference

8.0 Release
9.0/sources/apps/apps-common/includes/deepstream_perf.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2018-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 __NVGSTDS_PERF_H__
14 #define __NVGSTDS_PERF_H__
15 
16 #include <gst/gst.h>
17 
18 #ifdef __cplusplus
19 extern "C"
20 {
21 #endif
22 
23 #include "deepstream_config.h"
24 
25 typedef struct
26 {
27  guint source_id;
28  gchar const* uri;
29  gchar const* sensor_id;
30  gchar const* sensor_name;
32 
33 typedef struct
34 {
35  guint source_id;
36  char *stream_name;
37  gchar const* sensor_id;
38  gchar const* sensor_name;
40 
41 typedef struct
42 {
43  gdouble fps[MAX_SOURCE_BINS];
44  gdouble fps_avg[MAX_SOURCE_BINS];
45  guint num_instances;
46  NvDsAppSourceDetail source_detail[MAX_SOURCE_BINS];
47  guint active_source_size;
48  gboolean stream_name_display;
49  gboolean use_nvmultiurisrcbin;
51 
52 typedef void (*perf_callback) (gpointer ctx, NvDsAppPerfStruct * str);
53 
54 typedef struct
55 {
56  guint buffer_cnt;
57  guint total_buffer_cnt;
58  struct timeval total_fps_time;
59  struct timeval start_fps_time;
60  struct timeval last_fps_time;
61  struct timeval last_sample_fps_time;
63 
64 typedef struct
65 {
66  gulong measurement_interval_ms;
67  gulong perf_measurement_timeout_id;
68  guint num_instances;
69  gboolean stop;
70  gpointer context;
71  GMutex struct_lock;
72  perf_callback callback;
73  GstPad *sink_bin_pad;
74  gulong fps_measure_probe_id;
76  guint dewarper_surfaces_per_frame;
77  GHashTable *FPSInfoHash;
78  gboolean stream_name_display;
79  gboolean use_nvmultiurisrcbin;
81 
83  GstPad *sink_bin_pad, guint num_sources, gulong interval_sec,
84  guint num_surfaces_per_frame, perf_callback callback);
85 
88 
89 #ifdef __cplusplus
90 }
91 #endif
92 
93 #endif
MAX_SOURCE_BINS
#define MAX_SOURCE_BINS
Definition: sources/apps/apps-common/includes/deepstream_config.h:86
pause_perf_measurement
void pause_perf_measurement(NvDsAppPerfStructInt *str)
NvDsInstancePerfStruct
Definition: sources/apps/apps-common/includes/deepstream_perf.h:54
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)
NvDsAppSourceDetail
Definition: sources/apps/apps-common/includes/deepstream_perf.h:33
NvDsAppPerfStructInt
Definition: sources/apps/apps-common/includes/deepstream_perf.h:64
NvDsFPSSensorInfo
Definition: sources/apps/apps-common/includes/deepstream_perf.h:25
resume_perf_measurement
void resume_perf_measurement(NvDsAppPerfStructInt *str)
perf_callback
void(* perf_callback)(gpointer ctx, NvDsAppPerfStruct *str)
Definition: 9.0/sources/apps/apps-common/includes/deepstream_perf.h:52
deepstream_config.h
NvDsAppPerfStruct
Definition: sources/apps/apps-common/includes/deepstream_perf.h:41