NVIDIA DeepStream SDK API Reference

7.0 Release
nvds_latency_meta.h
Go to the documentation of this file.
1 /*
2  * SPDX-FileCopyrightText: Copyright (c) 2019-2020 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 
27 #ifndef _NVDSMETA_LATENCY_H_
28 #define _NVDSMETA_LATENCY_H_
29 
30 #include "glib.h"
31 #include "gmodule.h"
32 #include "nvdsmeta.h"
33 
34 #define MAX_COMPONENT_LEN 64
35 
36 #ifdef __cplusplus
37 extern "C"
38 {
39 #endif
40 
44 typedef struct _NvDsMetaSubCompLatency {
54 
58 typedef struct _NvDsMetaCompLatency {
68  guint source_id;
70  guint frame_num;
73  guint pad_index;
79 
83 typedef struct
84 {
86  guint source_id;
88  guint frame_num;
94  gdouble latency;
96 
109  gchar *element_name);
110 
124 gboolean nvds_set_output_system_timestamp(GstBuffer * buffer, gchar *element_name);
125 
140  NvDsFrameLatencyInfo *latency_info);
141 
149 
165  gchar *element_name, guint frame_id);
166 
172 #define nvds_enable_latency_measurement (nvds_get_enable_latency_measurement())
173 
176 #ifdef __cplusplus
177 }
178 #endif
179 #endif
NvDsMetaSubCompLatency
struct _NvDsMetaSubCompLatency NvDsMetaSubCompLatency
Holds information about latency of the given subcomponent.
nvds_set_output_system_timestamp
gboolean nvds_set_output_system_timestamp(GstBuffer *buffer, gchar *element_name)
Sets the system timestamp when a Gst Buffer that is pushed to the downstream component.
_NvDsMetaCompLatency::frame_num
guint frame_num
Holds the current frame number for which latency is measured.
Definition: nvds_latency_meta.h:70
NvDsFrameLatencyInfo::comp_in_timestamp
gdouble comp_in_timestamp
Holds the system timestamp of the buffer when it arrives at the input of the first component in the p...
Definition: nvds_latency_meta.h:92
_NvDsMetaCompLatency::source_id
guint source_id
Holds the source ID of the component, e.g.
Definition: nvds_latency_meta.h:68
_NvDsMetaCompLatency::sub_comp_latencies
NvDsMetaSubCompLatency sub_comp_latencies[16]
Holds latency information of subcomponent in an array.
Definition: nvds_latency_meta.h:75
NvDsFrameLatencyInfo
Holds information about the latency of a given frame.
Definition: nvds_latency_meta.h:83
_NvDsMetaCompLatency::out_system_timestamp
gdouble out_system_timestamp
Holds the system timestamp of buffer when it is sent to the downstream component.
Definition: nvds_latency_meta.h:66
_NvDsMetaCompLatency::num_sub_comps
guint num_sub_comps
Holds the number of subcomponents for the given component.
Definition: nvds_latency_meta.h:77
_NvDsMetaSubCompLatency::in_system_timestamp
gdouble in_system_timestamp
Holds the system timestamp of the buffer when it arrives at the input of the component.
Definition: nvds_latency_meta.h:49
nvds_set_input_system_timestamp
NvDsUserMeta * nvds_set_input_system_timestamp(GstBuffer *buffer, gchar *element_name)
Sets the system timestamp when the Gst Buffer arrives as input at the component.
_NvDsMetaCompLatency::in_system_timestamp
gdouble in_system_timestamp
Holds the system timestamp of the buffer when it arrives at the input of the component.
Definition: nvds_latency_meta.h:63
_NvDsMetaSubCompLatency::out_system_timestamp
gdouble out_system_timestamp
Holds the system timestamp of the buffer when it leaves at the output of the component.
Definition: nvds_latency_meta.h:52
_NvDsUserMeta
Holds user metadata.
Definition: nvdsmeta.h:472
NvDsFrameLatencyInfo::frame_num
guint frame_num
Holds the current frame number for which latency is measured.
Definition: nvds_latency_meta.h:88
_NvDsMetaSubCompLatency::sub_comp_name
gchar sub_comp_name[MAX_COMPONENT_LEN]
Holds the subcomponent names.
Definition: nvds_latency_meta.h:46
_NvDsMetaSubCompLatency
Holds information about latency of the given subcomponent.
Definition: nvds_latency_meta.h:44
NvDsFrameLatencyInfo::source_id
guint source_id
Holds the source ID of the component, e.g.
Definition: nvds_latency_meta.h:86
nvds_get_enable_latency_measurement
gboolean nvds_get_enable_latency_measurement(void)
Indicates whether the environment variable NVDS_ENABLE_LATENCY_MEASUREMENT is exported.
NvDsMetaCompLatency
struct _NvDsMetaCompLatency NvDsMetaCompLatency
Holds information about latency of the given component.
GstBuffer
struct _GstBuffer GstBuffer
Definition: idatatype.h:19
_NvDsMetaCompLatency::component_name
gchar component_name[MAX_COMPONENT_LEN]
Holds the name of the component for which latency is measured.
Definition: nvds_latency_meta.h:60
MAX_COMPONENT_LEN
#define MAX_COMPONENT_LEN
Definition: nvds_latency_meta.h:34
nvdsmeta.h
_NvDsMetaCompLatency::pad_index
guint pad_index
Holds the pad or port index of the stream muxer for the frame in the batch.
Definition: nvds_latency_meta.h:73
_NvDsMetaCompLatency
Holds information about latency of the given component.
Definition: nvds_latency_meta.h:58
nvds_measure_buffer_latency
guint nvds_measure_buffer_latency(GstBuffer *buf, NvDsFrameLatencyInfo *latency_info)
Measures the latency of all frames present in the current batch.
nvds_add_reference_timestamp_meta
void nvds_add_reference_timestamp_meta(GstBuffer *buffer, gchar *element_name, guint frame_id)
Adds the reference timestamp metadata for this buffer Note: element_name == "audiodecoder" and "nvv4l...
NvDsFrameLatencyInfo::latency
gdouble latency
Holds the latency of the frame in milliseconds.
Definition: nvds_latency_meta.h:94