I'm trying to reduce latency for realtime video casting from a third party device to Android.
I'm measuring latency by starting a milisecond timer on the third party device , the same timer is displayed on the android device . I click a photo of the two side by side to check the time difference in both.
The latency from receiving the encoded frame at tcp socket to it being available for rendering is only 30 ms. but the end to end latency is about 190ms.
How do I measure latency from the time we call:
AMediaCodec_releaseOutputBuffer() to the time its actually displayed?
what factors can affect the latency ? and how to improve ?