Remember the original anchor information so that if the master clock become equal to it in the future, it can be restored to those exact numbers and eliminate any intervening approximations. Add some diagnostics.

This commit is contained in:
Mike Brady
2021-06-01 14:51:17 +01:00
parent 7df6ff0a55
commit c5dafbd28b
5 changed files with 103 additions and 58 deletions
+8
View File
@@ -273,10 +273,18 @@ typedef struct {
int anchor_remote_info_is_valid;
int anchor_clock_is_new;
// these can be modified if the master clock changes over time
uint64_t anchor_clock;
uint64_t anchor_time; // this is the time according to the clock
uint32_t anchor_rtptime;
// these are used to identify when the master clock becomes equal to the
// actual anchor clock information, so it can be used to avoid accumulating errors
uint64_t actual_anchor_clock;
uint64_t actual_anchor_time;
uint32_t actual_anchor_rtptime;
clock_status_t clock_status;
#ifdef CONFIG_AIRPLAY_2