NVIDIA DeepStream SDK API Reference

6.4 Release
nvds_latency_meta.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
3  *
4  * NVIDIA Corporation and its licensors retain all intellectual property
5  * and proprietary rights in and to this software, related documentation
6  * and any modifications thereto. Any use, reproduction, disclosure or
7  * distribution of this software and related documentation without an express
8  * license agreement from NVIDIA Corporation is strictly prohibited.
9  *
10  */
11 
26 #ifndef _NVDSMETA_LATENCY_H_
27 #define _NVDSMETA_LATENCY_H_
28 
29 #include "glib.h"
30 #include "gmodule.h"
31 #include "nvdsmeta.h"
32 
33 #define MAX_COMPONENT_LEN 64
34 
35 #ifdef __cplusplus
36 extern "C"
37 {
38 #endif
39 
43 typedef struct _NvDsMetaSubCompLatency {
53 
57 typedef struct _NvDsMetaCompLatency {
67  guint source_id;
69  guint frame_num;
72  guint pad_index;
78 
82 typedef struct
83 {
85  guint source_id;
87  guint frame_num;
93  gdouble latency;
95 
108  gchar *element_name);
109 
123 gboolean nvds_set_output_system_timestamp(GstBuffer * buffer, gchar *element_name);
124 
139  NvDsFrameLatencyInfo *latency_info);
140 
148 
164  gchar *element_name, guint frame_id);
165 
171 #define nvds_enable_latency_measurement (nvds_get_enable_latency_measurement())
172 
175 #ifdef __cplusplus
176 }
177 #endif
178 #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:69
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:91
_NvDsMetaCompLatency::source_id
guint source_id
Holds the source ID of the component, e.g.
Definition: nvds_latency_meta.h:67
_NvDsMetaCompLatency::sub_comp_latencies
NvDsMetaSubCompLatency sub_comp_latencies[16]
Holds latency information of subcomponent in an array.
Definition: nvds_latency_meta.h:74
NvDsFrameLatencyInfo
Holds information about the latency of a given frame.
Definition: nvds_latency_meta.h:82
_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:65
_NvDsMetaCompLatency::num_sub_comps
guint num_sub_comps
Holds the number of subcomponents for the given component.
Definition: nvds_latency_meta.h:76
_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:48
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:62
_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:51
_NvDsUserMeta
Holds user metadata.
Definition: nvdsmeta.h:471
NvDsFrameLatencyInfo::frame_num
guint frame_num
Holds the current frame number for which latency is measured.
Definition: nvds_latency_meta.h:87
_NvDsMetaSubCompLatency::sub_comp_name
gchar sub_comp_name[MAX_COMPONENT_LEN]
Holds the subcomponent names.
Definition: nvds_latency_meta.h:45
_NvDsMetaSubCompLatency
Holds information about latency of the given subcomponent.
Definition: nvds_latency_meta.h:43
NvDsFrameLatencyInfo::source_id
guint source_id
Holds the source ID of the component, e.g.
Definition: nvds_latency_meta.h:85
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:59
MAX_COMPONENT_LEN
#define MAX_COMPONENT_LEN
Definition: nvds_latency_meta.h:33
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:72
_NvDsMetaCompLatency
Holds information about latency of the given component.
Definition: nvds_latency_meta.h:57
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:93