NVIDIA DeepStream SDK API Reference

4.0.1 Release

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Groups
Latency Measurement API

Detailed Description

Defines an API for measuring latency in modules.

Data Structures

struct  _NvDsMetaCompLatency
 Holds information about latency of the given component. More...
 
struct  NvDsFrameLatencyInfo
 Holds information about latency of the given frame. More...
 

Macros

#define MAX_COMPONENT_LEN   64
 
#define nvds_enable_latency_measurement   (nvds_get_enable_latency_measurement())
 variable holding the return value of nvds_get_enable_latency_measurement() More...
 

Typedefs

typedef struct _NvDsMetaCompLatency NvDsMetaCompLatency
 Holds information about latency of the given component. More...
 

Functions

NvDsUserMetanvds_set_input_system_timestamp (GstBuffer *buffer, gchar *element_name)
 Sets the system timestamp when the gst buffer arrives at the input of the component. More...
 
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. More...
 
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 the point buf reaches. More...
 
gboolean nvds_get_enable_latency_measurement (void)
 

Macro Definition Documentation

#define MAX_COMPONENT_LEN   64

Definition at line 33 of file nvds_latency_meta.h.

#define nvds_enable_latency_measurement   (nvds_get_enable_latency_measurement())

variable holding the return value of nvds_get_enable_latency_measurement()

Returns
a boolean set to TRUE if environment variable NVDS_ENABLE_LATENCY_MEASUREMENT is exported

Definition at line 149 of file nvds_latency_meta.h.

Typedef Documentation

Holds information about latency of the given component.

Function Documentation

gboolean nvds_get_enable_latency_measurement ( void  )
Returns
a boolean set to TRUE if environment variable NVDS_ENABLE_LATENCY_MEASUREMENT is exported
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 the point buf reaches.

User can install the probe on the either pads of the component and call this API to measure the latency.

Parameters
[in]bufGstBuffer which has NvDsBatchMeta attched as metadata
[out]latency_infoA pointer to NvDsFrameLatencyInfo. It should be allocated as per batch-size. It will contain latency information of all the sources when the function returns.
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.

Parameters
[in]bufferGstBuffer which arrives at the input of the component
[in]element_namepointer to the name of the component for which latency is to be measured
Returns
A pointer to NvDsUserMeta structure. It holds NvDsMetaCompLatency as user_meta_data
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.

It is a corresponding call to nvds_set_input_system_timestamp()

Parameters
[in]bufferGstBuffer which is pushed to the downstream component
[in]element_nameA pointer to the name of the component for which latency is to be measured

returns TRUE if output timestamp is attached successfully, otherwise FALSE