NVIDIA DeepStream SDK API Reference
7.1 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
;
31
}
NvDsFPSSensorInfo
;
32
33
typedef
struct
34
{
35
guint
source_id
;
36
char
*
stream_name
;
37
gchar
const
*
sensor_id
;
38
gchar
const
*
sensor_name
;
39
}
NvDsAppSourceDetail
;
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
;
50
}
NvDsAppPerfStruct
;
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;
62
}
NvDsInstancePerfStruct
;
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
;
75
NvDsInstancePerfStruct
instance_str[
MAX_SOURCE_BINS
];
76
guint
dewarper_surfaces_per_frame
;
77
GHashTable *
FPSInfoHash
;
78
gboolean
stream_name_display
;
79
gboolean
use_nvmultiurisrcbin
;
80
}
NvDsAppPerfStructInt
;
81
82
gboolean
enable_perf_measurement
(
NvDsAppPerfStructInt
*str,
83
GstPad *sink_bin_pad, guint num_sources, gulong interval_sec,
84
guint num_surfaces_per_frame,
perf_callback
callback);
85
86
void
pause_perf_measurement
(
NvDsAppPerfStructInt
*str);
87
void
resume_perf_measurement
(
NvDsAppPerfStructInt
*str);
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
Advance Information | Subject to Change | Generated by NVIDIA | Mon Oct 14 2024 13:27:43 | PR-09318-R32