NVIDIA DeepStream SDK API Reference
6.4 Release
deepstream_perf.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2018-2019, NVIDIA CORPORATION. All rights reserved.
3
*
4
* Permission is hereby granted, free of charge, to any person obtaining a
5
* copy of this software and associated documentation files (the "Software"),
6
* to deal in the Software without restriction, including without limitation
7
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
8
* and/or sell copies of the Software, and to permit persons to whom the
9
* Software is furnished to do so, subject to the following conditions:
10
*
11
* The above copyright notice and this permission notice shall be included in
12
* all copies or substantial portions of the Software.
13
*
14
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
19
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
20
* DEALINGS IN THE SOFTWARE.
21
*/
22
23
#ifndef __NVGSTDS_PERF_H__
24
#define __NVGSTDS_PERF_H__
25
26
#include <gst/gst.h>
27
28
#ifdef __cplusplus
29
extern
"C"
30
{
31
#endif
32
33
#include "
deepstream_config.h
"
34
35
typedef
struct
36
{
37
guint
source_id
;
38
gchar
const
*
uri
;
39
gchar
const
*
sensor_id
;
40
gchar
const
*
sensor_name
;
41
}
NvDsFPSSensorInfo
;
42
43
typedef
struct
44
{
45
guint
source_id
;
46
char
*
stream_name
;
47
}
NvDsAppSourceDetail
;
48
49
typedef
struct
50
{
51
gdouble fps[
MAX_SOURCE_BINS
];
52
gdouble fps_avg[
MAX_SOURCE_BINS
];
53
guint
num_instances
;
54
NvDsAppSourceDetail
source_detail[
MAX_SOURCE_BINS
];
55
guint
active_source_size
;
56
gboolean
stream_name_display
;
57
gboolean
use_nvmultiurisrcbin
;
58
}
NvDsAppPerfStruct
;
59
60
typedef
void (*
perf_callback
) (gpointer ctx,
NvDsAppPerfStruct
* str);
61
62
typedef
struct
63
{
64
guint
buffer_cnt
;
65
guint
total_buffer_cnt
;
66
struct
timeval total_fps_time;
67
struct
timeval start_fps_time;
68
struct
timeval last_fps_time;
69
struct
timeval last_sample_fps_time;
70
}
NvDsInstancePerfStruct
;
71
72
typedef
struct
73
{
74
gulong
measurement_interval_ms
;
75
gulong
perf_measurement_timeout_id
;
76
guint
num_instances
;
77
gboolean
stop
;
78
gpointer
context
;
79
GMutex
struct_lock
;
80
perf_callback
callback
;
81
GstPad *
sink_bin_pad
;
82
gulong
fps_measure_probe_id
;
83
NvDsInstancePerfStruct
instance_str[
MAX_SOURCE_BINS
];
84
guint
dewarper_surfaces_per_frame
;
85
GHashTable *
FPSInfoHash
;
86
gboolean
stream_name_display
;
87
gboolean
use_nvmultiurisrcbin
;
88
}
NvDsAppPerfStructInt
;
89
90
gboolean
enable_perf_measurement
(
NvDsAppPerfStructInt
*str,
91
GstPad *sink_bin_pad, guint num_sources, gulong interval_sec,
92
guint num_surfaces_per_frame,
perf_callback
callback);
93
94
void
pause_perf_measurement
(
NvDsAppPerfStructInt
*str);
95
void
resume_perf_measurement
(
NvDsAppPerfStructInt
*str);
96
97
#ifdef __cplusplus
98
}
99
#endif
100
101
#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:62
NvDsAppPerfStructInt::struct_lock
GMutex struct_lock
Definition:
deepstream_perf.h:79
NvDsAppSourceDetail
Definition:
deepstream_perf.h:43
perf_callback
void(* perf_callback)(gpointer ctx, NvDsAppPerfStruct *str)
Definition:
deepstream_perf.h:60
NvDsAppPerfStructInt::callback
perf_callback callback
Definition:
deepstream_perf.h:80
NvDsAppPerfStruct::use_nvmultiurisrcbin
gboolean use_nvmultiurisrcbin
Definition:
deepstream_perf.h:57
NvDsAppPerfStructInt::num_instances
guint num_instances
Definition:
deepstream_perf.h:76
NvDsAppPerfStructInt
Definition:
deepstream_perf.h:72
NvDsAppPerfStructInt::context
gpointer context
Definition:
deepstream_perf.h:78
NvDsAppPerfStructInt::measurement_interval_ms
gulong measurement_interval_ms
Definition:
deepstream_perf.h:74
NvDsAppPerfStructInt::FPSInfoHash
GHashTable * FPSInfoHash
Definition:
deepstream_perf.h:85
NvDsAppSourceDetail::stream_name
char * stream_name
Definition:
deepstream_perf.h:46
deepstream_config.h
NvDsFPSSensorInfo
Definition:
deepstream_perf.h:35
pause_perf_measurement
void pause_perf_measurement(NvDsAppPerfStructInt *str)
NvDsFPSSensorInfo::sensor_name
gchar const * sensor_name
Definition:
deepstream_perf.h:40
NvDsAppPerfStruct::stream_name_display
gboolean stream_name_display
Definition:
deepstream_perf.h:56
NvDsAppPerfStructInt::sink_bin_pad
GstPad * sink_bin_pad
Definition:
deepstream_perf.h:81
NvDsAppPerfStruct::num_instances
guint num_instances
Definition:
deepstream_perf.h:53
NvDsAppPerfStruct::active_source_size
guint active_source_size
Definition:
deepstream_perf.h:55
NvDsFPSSensorInfo::sensor_id
gchar const * sensor_id
Definition:
deepstream_perf.h:39
NvDsAppPerfStructInt::fps_measure_probe_id
gulong fps_measure_probe_id
Definition:
deepstream_perf.h:82
NvDsAppPerfStructInt::perf_measurement_timeout_id
gulong perf_measurement_timeout_id
Definition:
deepstream_perf.h:75
NvDsAppPerfStructInt::dewarper_surfaces_per_frame
guint dewarper_surfaces_per_frame
Definition:
deepstream_perf.h:84
NvDsAppPerfStructInt::stop
gboolean stop
Definition:
deepstream_perf.h:77
NvDsInstancePerfStruct::total_buffer_cnt
guint total_buffer_cnt
Definition:
deepstream_perf.h:65
MAX_SOURCE_BINS
#define MAX_SOURCE_BINS
Definition:
deepstream_config.h:94
NvDsAppPerfStructInt::stream_name_display
gboolean stream_name_display
Definition:
deepstream_perf.h:86
resume_perf_measurement
void resume_perf_measurement(NvDsAppPerfStructInt *str)
NvDsFPSSensorInfo::uri
gchar const * uri
Definition:
deepstream_perf.h:38
NvDsFPSSensorInfo::source_id
guint source_id
Definition:
deepstream_perf.h:37
NvDsAppSourceDetail::source_id
guint source_id
Definition:
deepstream_perf.h:45
NvDsInstancePerfStruct::buffer_cnt
guint buffer_cnt
Definition:
deepstream_perf.h:64
NvDsAppPerfStructInt::use_nvmultiurisrcbin
gboolean use_nvmultiurisrcbin
Definition:
deepstream_perf.h:87
NvDsAppPerfStruct
Definition:
deepstream_perf.h:49
Advance Information | Subject to Change | Generated by NVIDIA | Mon Dec 11 2023 17:51:24 | PR-09318-R32