Fix wayland screencast pipewire buffer pts
Pipewire's buffer meta structure apparently wants the presentation timestamp
to be absolute, where absolute means clock_gettime(CLOCK_MONOTONIC, &ts)
- the number of nanoseconds since computer was started.
So subtracting the timestamp of the first buffer breaks the timestamps later on in the pipeline.
It is unfortunate, but that means that the clock()
of all sources would have to return timestamps from this mentioned clock, which adds assumptions to the API that are not representable in its signature. From looking at the code I saw that within the sources, this function is often implemented from even deeper in the system.
Though at least when I tested the patched kwin, everything seemed to work.
Issues and discussions on the pipewire side:
Edited by Markus Ebner