NVIDIA DeepStream SDK API Reference

6.1.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
138 guint nvds_measure_buffer_latency(GstBuffer *buf,
139  NvDsFrameLatencyInfo *latency_info);
140 
148 
163 void nvds_add_reference_timestamp_meta(GstBuffer * buffer,
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
gboolean nvds_get_enable_latency_measurement(void)
Indicates whether the environment variable NVDS_ENABLE_LATENCY_MEASUREMENT is exported.
Holds information about the latency of a given frame.
gchar component_name[MAX_COMPONENT_LEN]
Holds the name of the component for which latency is measured.
Holds information about latency of the given subcomponent.
Holds information about latency of the given component.
Holds user metadata.
Definition: nvdsmeta.h:452
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.
gdouble in_system_timestamp
Holds the system timestamp of the buffer when it arrives at the input of the component.
gchar sub_comp_name[MAX_COMPONENT_LEN]
Holds the subcomponent names.
gdouble comp_in_timestamp
Holds the system timestamp of the buffer when it arrives at the input of the first component in the p...
gdouble out_system_timestamp
Holds the system timestamp of the buffer when it leaves at the output of the component.
guint frame_num
Holds the current frame number for which latency is measured.
guint pad_index
Holds the pad or port index of the stream muxer for the frame in the batch.
guint source_id
Holds the source ID of the component, e.g.
guint frame_num
Holds the current frame number for which latency is measured.
struct _NvDsMetaCompLatency NvDsMetaCompLatency
Holds information about latency of the given component.
#define MAX_COMPONENT_LEN
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...
Defines NVIDIA DeepStream Metadata Structures
gdouble in_system_timestamp
Holds the system timestamp of the buffer when it arrives at the input of the component.
guint num_sub_comps
Holds the number of subcomponents for the given component.
NvDsMetaSubCompLatency sub_comp_latencies[16]
Holds latency information of subcomponent in an array.
guint nvds_measure_buffer_latency(GstBuffer *buf, NvDsFrameLatencyInfo *latency_info)
Measures the latency of all frames present in the current batch.
guint source_id
Holds the source ID of the component, e.g.
gdouble out_system_timestamp
Holds the system timestamp of buffer when it is sent to the downstream component. ...
gdouble latency
Holds the latency of the frame in milliseconds.
struct _NvDsMetaSubCompLatency NvDsMetaSubCompLatency
Holds information about latency of the given subcomponent.
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.