Closed v4hn closed 1 year ago
I learnt a bit about gstreamer clocking now. https://gstreamer.freedesktop.org/documentation/application-development/advanced/clocks.html?gi-language=c https://gstreamer.freedesktop.org/documentation/gstreamer/gstbuffer.html?gi-language=c
base-time
: The timestamp when the the pipleline state goes into PLAYING
state (Absolute time)
pts
: The timestamp when the buffer should be presented to user (Relative time from base-time
)
So the timestamp should be base-time + pts
, and this PR calculates that.
yeah, the gstreamer documentation is excessive, but also hard to parse... Took me some time to figure out the API and I eventually found a very recent almost-correct stackoverflow post (which I fail to find again right now).
Gstreamer is made by genius and also made for genius, I think. That is why the documentation is huge but hard to learn whole part. Anyway, I will check this PR on my laptop and merge this.
@v4hn thank you for your contribution!
This implementation works well for me and does not change behavior when combined with a simulator.