7 | | The solution I want to go for is this: use the `queued_time` for lateness calculation, that way the seamlessness constraint is always met, and even in virtual machines or with broken drivers, things do work (although with increased latency). But then, in `BMediaEventLooper::ControlLoop`, we ''also'' calculate the lateness the old way, the way which expects timing to be accurate. We compare the two lateness values, and if there is a too high difference (say, more than 1ms), we write a message to the syslog saying e.g. `MediaKit node abc is late, timing inaccuracy xyz us`. Since we always use the `queued_time` for the late notice, the number of syslog message will be small and bounded. But if a user asks "why is my latency high", the syslog gives the answer: timing is inaccurate, we don't have to search for a bug in MediaKit, the problem is elsewhere. |
| 7 | The solution I want to go for is this: use the `queued_time` for lateness calculation, that way the seamlessness constraint is always met, and even in virtual machines or with broken drivers, things do work (although with increased latency). But then, in `BMediaEventLooper::ControlLoop`, we ''also'' calculate the lateness the old way, the way which expects timing to be accurate. We compare the two lateness values, and if there is a too high difference (say, more than 1ms), we write a message to the syslog saying e.g. `MediaKit node abc is late, timing inaccuracy xyz us`. Since we always use the `queued_time` for the late notice, the number of syslog message will be small and bounded, or we limit it to log the message only once per node instance. If a user asks "why is my latency high", the syslog gives the answer: timing is inaccurate, we don't have to search for a bug in MediaKit, the problem is elsewhere. |