Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[core] Update TSBPD base time and clock drift on sender. #2435

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

maxsharabayko
Copy link
Collaborator

Normally the TSBPD base time is updated on the receiver side based on timestamps of incoming SRT data packets.
Clock drift estimate is updated based on ACK-ACKACK packet pairs, on the receiver side.

Once an SRT connection is established, the payload can be sent bi-directionally.
However, only the receiver tracks TSBPD base time carryover and clock drift. If a sender starts receiving payload one hour (01:11:35) after a connection has been established, the base might be already different, and receiving would be problematic in the aspect of keeping the proper end-to-end latency.

SRT sender must keep track of peer's base time and clock drift based on incoming ACK packets. Sadly, an RTT sample is also not available in this case (only smoothed RTT value). Thus clock drift would not be compensated for it.
The update would happen every 10ms (Lite ACK may come more frequently), thus there would be enough drift samples to update the drift value with a good frequency.

Only Full ACK is used to do the update not more frequently than every 10 ms.

Addresses #1936.
Extracted from #2408 (expect the PR to be merged first).

TODO

  • Conduct tests.

@maxsharabayko maxsharabayko added Type: Bug Indicates an unexpected problem or unintended behavior [core] Area: Changes in SRT library core labels Aug 17, 2022
@maxsharabayko maxsharabayko added this to the Next Release milestone Aug 17, 2022
@maxsharabayko maxsharabayko modified the milestones: v1.5.1, Next release Sep 12, 2022
@maxsharabayko maxsharabayko modified the milestones: v1.5.2, Parking Lot Dec 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[core] Area: Changes in SRT library core Type: Bug Indicates an unexpected problem or unintended behavior
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant