[vlc-devel] [RFC] libvlc: support setting seek mode

Rémi Denis-Courmont remi at remlab.net
Thu Jun 14 18:14:02 CEST 2018


Le torstaina 14. kesäkuuta 2018, 18.59.32 EEST Zhao Zhili a écrit :
> > On Jun 14, 2018, at 11:01 PM, Jean-Baptiste Kempf <jb at videolan.org> wrote:
> > 
> > I kind of agree here with Rem.
> 
> OK, libvlc only need a bool type variable to set seek mode. vlc core still
> needs the enum type or another method to respect the input-fast-seek option.

I doubt anybody cares about that option.

And I hate those poorly designed non-reentrant where a property is assigned to 
an object rather than an operation on the object for no reasons.

> Change the value of input-fast-seek directly will make it more simpler, but
> I'm afraid it will break some usecase and make things confusing.
> 
> By the way, add an object variable to pass the seek mode is a little
> overkill, change "time" and "position" to VLC_VAR_ADDRESS and pass more
> data is overkill too.

You are better of ignoring "time" and "position" variables entirely. Time and 
position change continuously, so mapping them to VLC variables will never work 
properly. This was already discussed a year or so ago.

> Another choice is add more INPUT_CONTROL_*.

Uh no. INPUT_CONTROL_* is internal.

> Which way is better?

Your best is to add a new vlc_input_Seek() function. Alternatively extend 
input_Control(), but there are also no valid reasons why input_Control() 
exists instead of proper separate functions.

-- 
Rémi Denis-Courmont
http://www.remlab.net/





More information about the vlc-devel mailing list