NVIDIA DeepStream SDK API Reference
9.1 Release
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
;
36
}
NvDsFPSSensorInfo
;
37
38
typedef
struct
39
{
40
guint
source_id
;
41
char
*
stream_name
;
42
gchar
const
*
sensor_id
;
43
gchar
const
*
sensor_name
;
44
}
NvDsAppSourceDetail
;
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
;
55
}
NvDsAppPerfStruct
;
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;
67
}
NvDsInstancePerfStruct
;
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
;
80
NvDsInstancePerfStruct
instance_str[
MAX_SOURCE_BINS
];
81
guint
dewarper_surfaces_per_frame
;
82
GHashTable *
FPSInfoHash
;
83
gboolean
stream_name_display
;
84
gboolean
use_nvmultiurisrcbin
;
85
}
NvDsAppPerfStructInt
;
86
87
gboolean
enable_perf_measurement
(
NvDsAppPerfStructInt
*str,
88
GstPad *sink_bin_pad, guint num_sources, gulong interval_sec,
89
guint num_surfaces_per_frame,
perf_callback
callback);
90
91
void
pause_perf_measurement
(
NvDsAppPerfStructInt
*str);
92
void
resume_perf_measurement
(
NvDsAppPerfStructInt
*str);
93
94
#ifdef __cplusplus
95
}
96
#endif
97
98
#endif
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
NvDsAppPerfStructInt::struct_lock
GMutex struct_lock
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:76
NvDsAppSourceDetail
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:38
NvDsAppSourceDetail::stream_name
char * stream_name
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:41
NvDsAppPerfStructInt::callback
perf_callback callback
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:77
NvDsAppPerfStruct::use_nvmultiurisrcbin
gboolean use_nvmultiurisrcbin
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:54
NvDsAppPerfStructInt::num_instances
guint num_instances
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:73
NvDsAppPerfStructInt
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:69
NvDsAppPerfStructInt::FPSInfoHash
GHashTable * FPSInfoHash
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:82
NvDsAppPerfStructInt::context
gpointer context
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:75
NvDsAppPerfStructInt::measurement_interval_ms
gulong measurement_interval_ms
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:71
NvDsFPSSensorInfo
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:30
perf_callback
void(* perf_callback)(gpointer ctx, NvDsAppPerfStruct *str)
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:57
NvDsFPSSensorInfo::uri
gchar const * uri
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:33
NvDsAppPerfStruct::stream_name_display
gboolean stream_name_display
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:53
NvDsAppPerfStruct::num_instances
guint num_instances
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:50
NvDsAppPerfStruct::active_source_size
guint active_source_size
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:52
NvDsAppPerfStructInt::sink_bin_pad
GstPad * sink_bin_pad
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:78
deepstream_config.h
NvDsAppSourceDetail::sensor_name
gchar const * sensor_name
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:43
NvDsAppPerfStructInt::fps_measure_probe_id
gulong fps_measure_probe_id
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:79
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)
NvDsAppPerfStructInt::perf_measurement_timeout_id
gulong perf_measurement_timeout_id
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:72
pause_perf_measurement
void pause_perf_measurement(NvDsAppPerfStructInt *str)
NvDsAppPerfStructInt::dewarper_surfaces_per_frame
guint dewarper_surfaces_per_frame
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:81
NvDsAppPerfStructInt::stop
gboolean stop
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:74
NvDsInstancePerfStruct::total_buffer_cnt
guint total_buffer_cnt
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:62
resume_perf_measurement
void resume_perf_measurement(NvDsAppPerfStructInt *str)
NvDsFPSSensorInfo::sensor_id
gchar const * sensor_id
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:34
NvDsAppPerfStructInt::stream_name_display
gboolean stream_name_display
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:83
NvDsFPSSensorInfo::source_id
guint source_id
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:32
NvDsAppSourceDetail::source_id
guint source_id
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:40
NvDsInstancePerfStruct::buffer_cnt
guint buffer_cnt
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:61
NvDsFPSSensorInfo::sensor_name
gchar const * sensor_name
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:35
NvDsAppPerfStructInt::use_nvmultiurisrcbin
gboolean use_nvmultiurisrcbin
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:84
NvDsAppPerfStruct
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:46
NvDsAppSourceDetail::sensor_id
gchar const * sensor_id
Definition:
sources/apps/apps-common/includes/deepstream_perf.h:42
Privacy Policy
|
Manage My Privacy
|
Do Not Sell or Share My Data
|
Terms of Service
|
Accessibility
|
Corporate Policies
|
Product Security
|
Contact
© 2026 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
NVIDIA Confidential | Subject to Change | For test and development only.
Thu Jul 9 2026 11:48:19 | PR-09318-R32