Defines an API for measuring latency in modules.
Data Structures | |
| struct | _NvDsMetaSubCompLatency |
| Holds information about latency of the given subcomponent. More... | |
| struct | _NvDsMetaCompLatency |
| Holds information about latency of the given component. More... | |
| struct | NvDsFrameLatencyInfo |
| Holds information about the latency of a given frame. More... | |
Macros | |
| #define | MAX_COMPONENT_LEN 64 |
| #define | nvds_enable_latency_measurement (nvds_get_enable_latency_measurement()) |
| Defines a pseudo-variable whose value is the return value of nvds_get_enable_latency_measurement(). More... | |
| #define | nvds_latency_measurement_silent (nvds_get_latency_measurement_silent()) |
| Defines a pseudo-variable whose value is the return value of nvds_get_latency_measurement_silent(). More... | |
| #define | MAX_COMPONENT_LEN 64 |
| #define | nvds_enable_latency_measurement (nvds_get_enable_latency_measurement()) |
| Defines a pseudo-variable whose value is the return value of nvds_get_enable_latency_measurement(). More... | |
| #define | nvds_latency_measurement_silent (nvds_get_latency_measurement_silent()) |
| Defines a pseudo-variable whose value is the return value of nvds_get_latency_measurement_silent(). More... | |
Typedefs | |
| typedef struct _NvDsMetaSubCompLatency | NvDsMetaSubCompLatency |
| Holds information about latency of the given subcomponent. More... | |
| typedef struct _NvDsMetaCompLatency | NvDsMetaCompLatency |
| Holds information about latency of the given component. More... | |
| typedef struct _NvDsMetaSubCompLatency | NvDsMetaSubCompLatency |
| Holds information about latency of the given subcomponent. More... | |
| typedef struct _NvDsMetaCompLatency | NvDsMetaCompLatency |
| Holds information about latency of the given component. More... | |
Functions | |
| 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. More... | |
| 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. More... | |
| guint | nvds_measure_buffer_latency (GstBuffer *buf, NvDsFrameLatencyInfo *latency_info) |
| Measures the latency of all frames present in the current batch. More... | |
| gboolean | nvds_get_enable_latency_measurement (void) |
Indicates whether the environment variable NVDS_ENABLE_LATENCY_MEASUREMENT is exported. More... | |
| 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 "nvv4l2decoder" will be used for latency measurement calculations where the timestamp will be used by API: nvds_measure_buffer_latency() to calculate the latency of buffers downstream relative to the decoder. More... | |
| gboolean | nvds_get_latency_measurement_silent (void) |
| Indicates whether silent mode for latency measurement is enabled. More... | |
| #define MAX_COMPONENT_LEN 64 |
Definition at line 34 of file sources/includes/nvds_latency_meta.h.
| #define MAX_COMPONENT_LEN 64 |
Definition at line 34 of file 9.0/sources/includes/nvds_latency_meta.h.
| #define nvds_enable_latency_measurement (nvds_get_enable_latency_measurement()) |
Defines a pseudo-variable whose value is the return value of nvds_get_enable_latency_measurement().
It indicates whether latency measurement is enabled.
Definition at line 180 of file 9.0/sources/includes/nvds_latency_meta.h.
| #define nvds_enable_latency_measurement (nvds_get_enable_latency_measurement()) |
Defines a pseudo-variable whose value is the return value of nvds_get_enable_latency_measurement().
It indicates whether latency measurement is enabled.
Definition at line 180 of file sources/includes/nvds_latency_meta.h.
| #define nvds_latency_measurement_silent (nvds_get_latency_measurement_silent()) |
Defines a pseudo-variable whose value is the return value of nvds_get_latency_measurement_silent().
It indicates whether latency measurement is in silent mode (no console prints).
Definition at line 187 of file sources/includes/nvds_latency_meta.h.
| #define nvds_latency_measurement_silent (nvds_get_latency_measurement_silent()) |
Defines a pseudo-variable whose value is the return value of nvds_get_latency_measurement_silent().
It indicates whether latency measurement is in silent mode (no console prints).
Definition at line 187 of file 9.0/sources/includes/nvds_latency_meta.h.
| typedef struct _NvDsMetaCompLatency NvDsMetaCompLatency |
Holds information about latency of the given component.
| typedef struct _NvDsMetaCompLatency NvDsMetaCompLatency |
Holds information about latency of the given component.
| typedef struct _NvDsMetaSubCompLatency NvDsMetaSubCompLatency |
Holds information about latency of the given subcomponent.
| typedef struct _NvDsMetaSubCompLatency NvDsMetaSubCompLatency |
Holds information about latency of the given subcomponent.
| 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 "nvv4l2decoder" will be used for latency measurement calculations where the timestamp will be used by API: nvds_measure_buffer_latency() to calculate the latency of buffers downstream relative to the decoder.
| [in] | buffer | A pointer to the arriving Gst Buffer. |
| [in] | element_name | A pointer to the name of the component for which latency is to be measured. |
| [in] | frame_id | The id/number of this frame/buffer produced by the component that produces this buffer. |
| gboolean nvds_get_enable_latency_measurement | ( | void | ) |
Indicates whether the environment variable NVDS_ENABLE_LATENCY_MEASUREMENT is exported.
| gboolean nvds_get_latency_measurement_silent | ( | void | ) |
Indicates whether silent mode for latency measurement is enabled.
When enabled, latency measurements continue but console prints are suppressed.
| guint nvds_measure_buffer_latency | ( | GstBuffer * | buf, |
| NvDsFrameLatencyInfo * | latency_info | ||
| ) |
Measures the latency of all frames present in the current batch.
The latency is computed from decoder input up to the point this API is called. You can install the probe on either pad of the component and call this function to measure the latency.
| [in] | buf | A pointer to a Gst Buffer to which NvDsBatchMeta is attached as metadata. |
| [out] | latency_info | A pointer to an NvDsFrameLatencyInfo structure allocated for a batch of this size. The function fills it with information about all of the sources. |
| 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.
| [in] | buffer | A pointer to the arriving Gst Buffer. |
| [in] | element_name | A pointer to the name of the component for which latency is to be measured. |
| 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.
This is a corresponding function to nvds_set_input_system_timestamp().
| [in] | buffer | A pointer to a Gst Buffer to be pushed to the downstream component. |
| [in] | element_name | A pointer to the name of the component for which latency is to be measured. |