Hardware :- Jetson Nano
DS :- DS5.0
Im using this probe function to get the frame latency
static GstPadProbeReturn latency_measurement_buf_prob(GstPad *pad,
GstPadProbeInfo *info,
gpointer u_data) {
LatencyCtx *ctx = (LatencyCtx *)u_data;
static int batch_num = 0;
guint i = 0, num_sources_in_batch = 0;
if (nvds_enable_latency_measurement) {
GstBuffer *buf = (GstBuffer *)info->data;
NvDsFrameLatencyInfo *latency_info = NULL;
_NvDsMetaCompLatency *comp_latency = NULL;
g_mutex_lock(ctx->lock);
latency_info = (NvDsFrameLatencyInfo *)calloc(
1, ctx->num_sources * sizeof(NvDsFrameLatencyInfo));
;
g_print("\n************BATCH-NUM = %d**************\n", batch_num);
num_sources_in_batch = nvds_measure_buffer_latency(buf, latency_info);
for (i = 0; i < num_sources_in_batch; i++) {
g_print("Src id=%d Frame_no=%d Frame latency=%lf (ms) \n",
latency_info[i].source_id, latency_info[i].frame_num,
latency_info[i].latency);
std::cout << "\n\n" << std::endl;
}
g_mutex_unlock(ctx->lock);
batch_num++;
}
return GST_PAD_PROBE_OK;
}
and I’m getting this :-
************BATCH-NUM = 11**************
Comp name = nvv4l2-decoder in_system_timestamp = 1688384797240.604004 out_system_timestamp = 1688384797384.811035 component latency= 144.207031
Comp name = stream-muxer in_system_timestamp = 1688384797384.909912 out_system_timestamp = 1688384797454.275879 component latency= 69.365967
Comp name = primary-nvinference-engine in_system_timestamp = 1688384797454.298096 out_system_timestamp = 1688384797546.986084 component latency= 92.687988
Comp name = tracker in_system_timestamp = 1688384797547.008057 out_system_timestamp = 1688384797669.364014 component latency= 122.355957
************BATCH-NUM = 12**************
Comp name = nvv4l2-decoder in_system_timestamp = 1688384797312.167969 out_system_timestamp = 1688384797456.635986 component latency= 144.468018
Comp name = stream-muxer in_system_timestamp = 1688384797456.710938 out_system_timestamp = 1688384797526.450928 component latency= 69.739990
Comp name = primary-nvinference-engine in_system_timestamp = 1688384797526.474121 out_system_timestamp = 1688384797619.053955 component latency= 92.579834
Comp name = tracker in_system_timestamp = 1688384797619.077881 out_system_timestamp = 1688384797740.842041 component latency= 121.764160
in the above probe function, nvds_measure_buffer_latency()
has been called. According to documentation, this function will return NvDsFrameLatencyInfo
, and NOT _NvDsMetaCompLatency
, is this correct ?
question is, what is printing these logs ? which function exactly ? nvds_measure_buffer_latency()
?