How to extract the timestamp information from the buffer to measure latency

Have you tried the FAQ above?

For applications, measuring latency is the only correct thing to do.

For element, if you add your own track point, I have also given the answer.