Unity-Technologies / com.unity.webrtc

WebRTC package for Unity
Other
738 stars 186 forks source link

[BUG]: E2ELantency calculation #1025

Open ViGeng opened 3 months ago

ViGeng commented 3 months ago

Package version

3.0.0-pre.7

Environment

* OS:Windows11
* Unity version: 22.3LTS

Steps To Reproduce

  1. run E2ELatency
  2. see the latency value
  3. look into the code

Expected Behavior

Hello, I am a bit confusing about the calculation of latency. When we look into the code, the update method should be called frequently as defined by targetFrameRate I timestamped this method and it shows as I expected. Then as the figure below, the current latency calculation should be similar to the 1000/fps. however, the produced value is not as ecpected.

So nor of them run as I expected. I am not sure how the latency should behave.

Thanks for any information and help!

image

Anything else?

No response