draft: [V2] player: improve seek
Supersedes !3309 (merged)
One of the main issue with the previous was that a client (a control or gui module) could bypass and modify timers updates of all others clients while seeking.
This is now fixed by passing the vlc_player_timer_id
to all seek operations.
Why a timer id ?
- It is difficult to know when the seek is processed, outside player/timer.c
- A timer id is private to a client, therefore it is easy to put a context specific to one client, no touching others
- We can block timer updates of a specific client
The navigate case.
We decided in VLC 3.0 that navigation keys would fall back to seek and volume control, to make it possible to seek with arrow keys (without ctrl/shift and co). Therefore, I also had to pass a timer_id to the vlc_player_Navigate
function. Any feedbacks are welcome. I also thought about letting every player client implementing their own navigation fallbacks.
Draft ?
- If accepted, I need to pass a timer_id to other control/gui modules.
The hotkey module issue
Even when using the Qt module, keys are managed by the hotkey module. This means that Qt and hotkeys have their own separate seek contexts. This means:
- The Qt seekbar is less reactive (like the current version)
- It is not possible to chain hotkey + qt jump requests
I will propose a solution later, but I would like to focus on the current MR for now.