Page 1 of 1

libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

Posted: 23 Apr 2018 17:28
by _MO_
Situation:

The video is paused.
I'm setting time to 1000 milliseconds with libvlc_media_player_set_time().
In some time I'm getting the current time with libvlc_media_player_get_time() and it returns 998 milliseconds instead of 1000.

Next, I'm setting time to 998 milliseconds (it should be current time) and in some time, when I call to libvlc_media_player_get_time() again, I have 1011 milliseconds instead of 998.

So I always have a gap between libvlc_media_player_set_time() and libvlc_media_player_get_time().
Is there a way to have "synchronized" values?

Thank you!

Re: libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

Posted: 23 Apr 2018 18:41
by Rémi Denis-Courmont
No. Seeking accuracy, and even reported time accuracy depends on the file format, and even for the accurate ones, it is subject to race conditions anyway.

Re: libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

Posted: 24 Apr 2018 09:16
by _MO_
Thank you for the answer, Rémi