[vlc-devel] [RFC PATCH 0/2] Player: discontinuities or the new way to get the position

Thomas Guillem thomas at gllm.fr
Thu Sep 6 13:11:30 CEST 2018


This RFC patch set follows this discussion:
https://mailman.videolan.org/pipermail/vlc-devel/2018-September/121120.html

With the new vlc_player, I'm trying to change the way to get the current
time/position. The current system is not accurate at all, since the position is
updated only after a successful demux() call. Problem, the demux() call can
take an indefinite time, so you could end up having a media updating its
position every 2 seconds.

The new system is implemented in the PATCH 2/2 (the 1/2 is the player that I
already proposed with some modifications):

 - The VLC player won't send position/time events anymore,
 - Player users will still be able to get the current time/pos via
   vlc_player_GetTime()/vlc_player_GetPosition() functions.
 - The player will send an event when a discontinuity happens
   (pause/seek/buffering/rate change) (cf. patch comments).
 - The UI will be able to update its progress bar and time/pos values according
   to the last discontinuity event using the time, pos and rate values given in
   the event param.

One problem: there will be a gap between the monotonic clock (or any other
clocks used by the UI) and the audio clock (when it will be merged). Is this
gap big enough to disturb the users ?  Should the player send the last time/pos
every few seconds (5, 10, 30, 60?) to let the UI correct the gap ?

I'm open to any renaming requests. I don't know if discontinuity is the correct
work for that.

Thomas Guillem (2):
  core: add vlc_player_t (input manager)
  player: signal position discontinuities

 PLAYER_TODO.txt      |    4 +
 include/vlc_player.h |  779 +++++++++++++++++++++++++
 src/Makefile.am      |    2 +
 src/input/player.c   | 1314 ++++++++++++++++++++++++++++++++++++++++++
 src/libvlccore.sym   |   28 +
 5 files changed, 2127 insertions(+)
 create mode 100644 PLAYER_TODO.txt
 create mode 100644 include/vlc_player.h
 create mode 100644 src/input/player.c

-- 
2.18.0



More information about the vlc-devel mailing list