Page 1 of 1

libvlc_media_player_get_position() resolution

Posted: 30 Mar 2019 08:31
by MikOfClassX
Hello,

I am trying to implement some logic around the media position of videos.

It seems that the resolution of libvlc_MediaPlayerPositionChanged callback or libvlc_media_player_get_position() is about 250ms. This value is very high.

For confirmation, I checked the static void *vlc_demux_chained_Thread(void *data) in demux_chained.c:
next_update = vlc_tick_now() + VLC_TICK_FROM_MS(250);

It there any way (when applicable, i.e. file-based media) to get the frame-accurate current media position (or video PTS) ?

Cheers,

Mik

Re: libvlc_media_player_get_position() resolution

Posted: 01 Apr 2019 15:24
by unidan
Hi, you have to wait for VLC 4.0 and the new clock for this.

Re: libvlc_media_player_get_position() resolution

Posted: 01 Apr 2019 15:46
by MikOfClassX
Thanks! Being the first of April, I'll double check your reply ;)
I did not see any estimated release date BTW.

Re: libvlc_media_player_get_position() resolution

Posted: 01 Apr 2019 15:59
by unidan
> I did not see any estimated release date BTW.
That would be the April joke if I knew it. :)
But check there: https://www.youtube.com/watch?v=OUt9QxmomjM

Re: libvlc_media_player_get_position() resolution

Posted: 01 Apr 2019 16:04
by MikOfClassX
Cool link! Thanks