NVIDIA DeepStream SDK API Reference

9.2 Release
sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2021-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 __GST_NVDSLOGGER_H__
19 #define __GST_NVDSLOGGER_H__
20 
21 
22 #include <gst/gst.h>
23 #include <gst/base/gstbasetransform.h>
24 
25 G_BEGIN_DECLS
26 
27 
28 #define GST_TYPE_NVDSLOGGER \
29  (gst_nvdslogger_get_type())
30 #define GST_NVDSLOGGER(obj) \
31  (G_TYPE_CHECK_INSTANCE_CAST((obj),GST_TYPE_NVDSLOGGER,GstNvdslogger))
32 #define GST_NVDSLOGGER_CLASS(klass) \
33  (G_TYPE_CHECK_CLASS_CAST((klass),GST_TYPE_NVDSLOGGER,GstNvdsloggerClass))
34 #define GST_IS_NVDSLOGGER(obj) \
35  (G_TYPE_CHECK_INSTANCE_TYPE((obj),GST_TYPE_NVDSLOGGER))
36 #define GST_IS_NVDSLOGGER_CLASS(klass) \
37  (G_TYPE_CHECK_CLASS_TYPE((klass),GST_TYPE_NVDSLOGGER))
38 
39 #define MAX_NUM_SOURCES 1024
40 
43 
44 typedef struct
45 {
46  gdouble curr_time;
47  gdouble time_diff;
48  gdouble fps_val;
49  guint buffer_cnt;
50  gdouble last_time;
51  gboolean is_valid;
52  gboolean eos;
53 
55 
56 typedef struct
57 {
60  GMutex struct_lock;
62  gboolean show_fps;
63 
65 
72  GstBaseTransform element;
73 
74  /*< private >*/
75  GstClockID clock_id;
76  gboolean flushing;
79  gint datarate;
80  guint sleep_time;
81  gboolean silent;
82  gboolean dump;
83  gboolean sync;
86  gboolean single_segment;
87  GstBufferFlags drop_buffer_flags;
88  GstClockTime prev_timestamp;
89  GstClockTime prev_duration;
90  guint64 prev_offset;
91  guint64 prev_offset_end;
92  gchar *last_message;
93  guint64 offset;
94  gboolean signal_handoffs;
95  GstClockTime upstream_latency;
96  GCond blocked_cond;
97  gboolean blocked;
98  GstClockTimeDiff ts_offset;
99  gboolean drop_allocation;
101  guint latency;
102  gboolean show_fps;
103  gboolean show_latency;
105  guint fnumber;
106 };
107 
109  GstBaseTransformClass parent_class;
110 
111  /* signals */
112  void (*handoff) (GstElement *element, GstBuffer *buf);
113 };
114 
115 G_GNUC_INTERNAL GType gst_nvdslogger_get_type (void);
116 
117 G_END_DECLS
118 
119 #endif /* __GST_NVDSLOGGER_H__ */
_GstNvdslogger
GstNvdslogger:
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:71
NvDsLoggerPerfStructInt::measurement_interval_ms
gulong measurement_interval_ms
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:58
NvDsLoggerPerfStruct::is_valid
gboolean is_valid
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:51
_GstNvdslogger::offset
guint64 offset
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:93
_GstNvdslogger::element
GstBaseTransform element
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:72
_GstNvdslogger::sync
gboolean sync
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:83
_GstNvdslogger::flushing
gboolean flushing
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:76
_GstNvdslogger::drop_buffer_flags
GstBufferFlags drop_buffer_flags
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:87
_GstNvdslogger::blocked
gboolean blocked
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:97
_GstNvdslogger::check_imperfect_timestamp
gboolean check_imperfect_timestamp
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:84
NvDsLoggerPerfStruct::fps_val
gdouble fps_val
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:48
_GstNvdslogger::prev_timestamp
GstClockTime prev_timestamp
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:88
_GstNvdslogger::fps_measurement_interval_sec
guint fps_measurement_interval_sec
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:100
_GstNvdslogger::prev_duration
GstClockTime prev_duration
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:89
_GstNvdslogger::last_message
gchar * last_message
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:92
_GstNvdsloggerClass::handoff
void(* handoff)(GstElement *element, GstBuffer *buf)
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:112
NvDsLoggerPerfStruct
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:44
NvDsLoggerPerfStruct::time_diff
gdouble time_diff
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:47
_GstNvdslogger::signal_handoffs
gboolean signal_handoffs
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:94
_GstNvdslogger::prev_offset_end
guint64 prev_offset_end
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:91
_GstNvdslogger::silent
gboolean silent
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:81
_GstNvdslogger::prev_offset
guint64 prev_offset
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:90
_GstNvdslogger::show_fps
gboolean show_fps
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:102
GstBuffer
struct _GstBuffer GstBuffer
Definition: includes/ds3d/common/idatatype.h:24
NvDsLoggerPerfStructInt::show_fps
gboolean show_fps
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:62
_GstNvdslogger::single_segment
gboolean single_segment
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:86
_GstNvdslogger::error_after
gint error_after
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:77
gst_nvdslogger_get_type
G_GNUC_INTERNAL GType gst_nvdslogger_get_type(void)
_GstNvdslogger::blocked_cond
GCond blocked_cond
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:96
_GstNvdslogger::datarate
gint datarate
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:79
_GstNvdslogger::str
NvDsLoggerPerfStructInt * str
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:104
NvDsLoggerPerfStruct::last_time
gdouble last_time
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:50
_GstNvdslogger::drop_allocation
gboolean drop_allocation
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:99
_GstNvdslogger::show_latency
gboolean show_latency
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:103
NvDsLoggerPerfStructInt::perf_measurement_timeout_id
gulong perf_measurement_timeout_id
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:59
_GstNvdslogger::drop_probability
gfloat drop_probability
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:78
NvDsLoggerPerfStructInt
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:56
_GstNvdslogger::ts_offset
GstClockTimeDiff ts_offset
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:98
NvDsLoggerPerfStruct::eos
gboolean eos
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:52
_GstNvdsloggerClass
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:108
NvDsLoggerPerfStruct::curr_time
gdouble curr_time
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:46
_GstNvdslogger::latency
guint latency
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:101
_GstNvdslogger::fnumber
guint fnumber
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:105
NvDsLoggerPerfStructInt::struct_lock
GMutex struct_lock
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:60
NvDsLoggerPerfStruct::buffer_cnt
guint buffer_cnt
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:49
_GstNvdslogger::sleep_time
guint sleep_time
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:80
MAX_NUM_SOURCES
#define MAX_NUM_SOURCES
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:39
_GstNvdslogger::upstream_latency
GstClockTime upstream_latency
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:95
_GstNvdslogger::clock_id
GstClockID clock_id
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:75
_GstNvdsloggerClass::parent_class
GstBaseTransformClass parent_class
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:109
_GstNvdslogger::dump
gboolean dump
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:82
_GstNvdslogger::check_imperfect_offset
gboolean check_imperfect_offset
Definition: sources/gst-plugins/gst-nvdslogger/gstnvdslogger.h:85