Skip to content

test: add clock test

Thomas Guillem requested to merge tguillem/vlc:clock-test into master

Possible to run all tests (by default from the test suite):

vlc/build-linux/test $ ./test_src_clock_clock
[normal]: checking that normal update has a coeff of 1.0f
[lowprecision]: checking that low precision update has a coeff near 1.0f
[drift_72]: checking that a drift of 72ms in 2h is handled
[drift_-72]: checking that a drift of -72ms in 2h is handled
[drift_864]: checking that a drift of 864ms in 24h is handled
[drift_-864]: checking that a drift of -864ms in 24h is handled
[drift_sudden]: checking that a sudden drift is handled

Or run one test with traces:

./test_src_clock_clock lowprecision --tracer=json --json-tracer-file=foo.trace -vv

The test fake the timestamps that are sent to the default tracer to behave like a live playback.

One possible future scenario would be to feed the clock with real points taken from a real 24h live-streaming playback.

Edited by Thomas Guillem

Merge request reports