NVIDIA DeepStream SDK API Reference

4.0.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
nvds_latency_meta.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2019, 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 _NvDsMetaCompLatency {
59  guint source_id;
63  guint frame_num;
67  guint pad_index;
69 
73 typedef struct
74 {
78  guint source_id;
82  guint frame_num;
92  gdouble latency;
94 
108  gchar *element_name);
109 
120 gboolean nvds_set_output_system_timestamp(GstBuffer * buffer, gchar *element_name);
121 
133 guint nvds_measure_buffer_latency(GstBuffer *buf,
134  NvDsFrameLatencyInfo *latency_info);
135 
149 #define nvds_enable_latency_measurement (nvds_get_enable_latency_measurement())
150 
151 #ifdef __cplusplus
152 }
153 #endif
154 #endif
gboolean nvds_get_enable_latency_measurement(void)
Holds information about latency of the given frame.
gchar component_name[MAX_COMPONENT_LEN]
name of the component for which latency is measured
Holds information about latency of the given component.
Holds information of user metadata that user can specify.
Definition: nvdsmeta.h:361
gboolean nvds_set_output_system_timestamp(GstBuffer *buffer, gchar *element_name)
Sets the system timestamp when the gst buffer is pushed to the downstream component.
gdouble comp_in_timestamp
system timestamp of buffer when it arrives at the input of the first component in the pipeline...
guint frame_num
current frame number for which latency is measured
guint pad_index
pad or port index of stream muxer for the frame in the batch
guint source_id
source id of the component e.g.
guint frame_num
current frame number for which latency is measured
struct _NvDsMetaCompLatency NvDsMetaCompLatency
Holds information about latency of the given component.
#define MAX_COMPONENT_LEN
NVIDIA DeepStream Metadata Structures
gdouble in_system_timestamp
system timestamp of buffer when it arrives at the input of the component
guint nvds_measure_buffer_latency(GstBuffer *buf, NvDsFrameLatencyInfo *latency_info)
Measures the latency of all the frames present in the current batch The latency will be computed till...
guint source_id
source id of the component e.g.
gdouble out_system_timestamp
system timestamp of buffer when it is sent out to the downstream component
gdouble latency
the latency of the frame in ms
NvDsUserMeta * nvds_set_input_system_timestamp(GstBuffer *buffer, gchar *element_name)
Sets the system timestamp when the gst buffer arrives at the input of the component.