NVIDIA DeepStream SDK API Reference

7.0 Release
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];
51 
52 typedef void (*perf_callback) (gpointer ctx, NvDsAppPerfStruct * str);
53 
54 typedef struct
55 {
56  guint 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 {
69  gboolean stop;
70  gpointer context;
71  GMutex struct_lock;
73  GstPad *sink_bin_pad;
77  GHashTable *FPSInfoHash;
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
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)
NvDsInstancePerfStruct
Definition: deepstream_perf.h:54
NvDsAppPerfStructInt::struct_lock
GMutex struct_lock
Definition: deepstream_perf.h:71
NvDsAppSourceDetail
Definition: deepstream_perf.h:33
perf_callback
void(* perf_callback)(gpointer ctx, NvDsAppPerfStruct *str)
Definition: deepstream_perf.h:52
NvDsAppPerfStructInt::callback
perf_callback callback
Definition: deepstream_perf.h:72
NvDsAppPerfStruct::use_nvmultiurisrcbin
gboolean use_nvmultiurisrcbin
Definition: deepstream_perf.h:49
NvDsAppPerfStructInt::num_instances
guint num_instances
Definition: deepstream_perf.h:68
NvDsAppPerfStructInt
Definition: deepstream_perf.h:64
NvDsAppPerfStructInt::context
gpointer context
Definition: deepstream_perf.h:70
NvDsAppPerfStructInt::measurement_interval_ms
gulong measurement_interval_ms
Definition: deepstream_perf.h:66
NvDsAppPerfStructInt::FPSInfoHash
GHashTable * FPSInfoHash
Definition: deepstream_perf.h:77
NvDsAppSourceDetail::stream_name
char * stream_name
Definition: deepstream_perf.h:36
deepstream_config.h
NvDsFPSSensorInfo
Definition: deepstream_perf.h:25
pause_perf_measurement
void pause_perf_measurement(NvDsAppPerfStructInt *str)
NvDsFPSSensorInfo::sensor_name
gchar const * sensor_name
Definition: deepstream_perf.h:30
NvDsAppPerfStruct::stream_name_display
gboolean stream_name_display
Definition: deepstream_perf.h:48
NvDsAppPerfStructInt::sink_bin_pad
GstPad * sink_bin_pad
Definition: deepstream_perf.h:73
NvDsAppPerfStruct::num_instances
guint num_instances
Definition: deepstream_perf.h:45
NvDsAppPerfStruct::active_source_size
guint active_source_size
Definition: deepstream_perf.h:47
NvDsFPSSensorInfo::sensor_id
gchar const * sensor_id
Definition: deepstream_perf.h:29
NvDsAppPerfStructInt::fps_measure_probe_id
gulong fps_measure_probe_id
Definition: deepstream_perf.h:74
NvDsAppPerfStructInt::perf_measurement_timeout_id
gulong perf_measurement_timeout_id
Definition: deepstream_perf.h:67
NvDsAppPerfStructInt::dewarper_surfaces_per_frame
guint dewarper_surfaces_per_frame
Definition: deepstream_perf.h:76
NvDsAppPerfStructInt::stop
gboolean stop
Definition: deepstream_perf.h:69
NvDsAppSourceDetail::sensor_name
gchar const * sensor_name
Definition: deepstream_perf.h:38
NvDsInstancePerfStruct::total_buffer_cnt
guint total_buffer_cnt
Definition: deepstream_perf.h:57
MAX_SOURCE_BINS
#define MAX_SOURCE_BINS
Definition: deepstream_config.h:84
NvDsAppPerfStructInt::stream_name_display
gboolean stream_name_display
Definition: deepstream_perf.h:78
resume_perf_measurement
void resume_perf_measurement(NvDsAppPerfStructInt *str)
NvDsAppSourceDetail::sensor_id
gchar const * sensor_id
Definition: deepstream_perf.h:37
NvDsFPSSensorInfo::uri
gchar const * uri
Definition: deepstream_perf.h:28
NvDsFPSSensorInfo::source_id
guint source_id
Definition: deepstream_perf.h:27
NvDsAppSourceDetail::source_id
guint source_id
Definition: deepstream_perf.h:35
NvDsInstancePerfStruct::buffer_cnt
guint buffer_cnt
Definition: deepstream_perf.h:56
NvDsAppPerfStructInt::use_nvmultiurisrcbin
gboolean use_nvmultiurisrcbin
Definition: deepstream_perf.h:79
NvDsAppPerfStruct
Definition: deepstream_perf.h:41