libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

This forum is about all development around libVLC.
_MO_
New Cone
New Cone
Posts: 2
Joined: 23 Apr 2018 14:19

libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

Postby _MO_ » 23 Apr 2018 17:28

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!

Rémi Denis-Courmont
Developer
Developer
Posts: 15267
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

Postby Rémi Denis-Courmont » 23 Apr 2018 18:41

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.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

_MO_
New Cone
New Cone
Posts: 2
Joined: 23 Apr 2018 14:19

Re: libvlc_media_player_set_time() vs. libvlc_media_player_get_time()

Postby _MO_ » 24 Apr 2018 09:16

Thank you for the answer, Rémi


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 6 guests