Playlist lua modules are probed for each opened input. This can take a lot of
time, it can double the time of a local parsing where no lua module are needed.
This time is negligible when playing a file.
Playlist lua probe can take 5ms on desktop (in comparison of 5ms for parsing),
or 50ms on some android devices.
This new option can be used by VLC ports to disable lua when using VLC for
parsing.
For example, if runing script <user dir>/lua/intf/script.lua, the following paths will be added:
<user dir>/lua/modules/?.lua
<user dir>/lua/intf/modules/?.lua
<share dir>/lua/modules/?.lua
<share dir>/lua/intf/modules/?.lua
If runing script <share dir>/lua/intf/script.lua, the following paths will be added:
<share dir>/lua/modules/?.lua
<share dir>/lua/intf/modules/?.lua
pl_Hold() assumed the playlist was already created.
pl_Release() does not solve any problem. Playlist synchronization is
done with the playlist lock, while playlist deletion must anyway be done
after all interfaces, services and other threads are joined.
"filename.lua"
will check if the file name respects the following form:
"Show.Name S19E01-jde.DEf.avi"
upon success, it will fill the show name, the episode number and
season number in the meta data.
It will also set the title to "Show Name S19E01"
Remove VLC_META_ENGINE_*
Don't use VLC_META_INFO_CAT
Avoid using input_Item{Add,Get}Info
Remove disabled code in cdda
Remove "meta fetcher":
There was only 1 module (not) implementing it (musicbrainz)
Reduces complexity in playlist core
Use a more consistent naming
Factorize QT4 sorting and column display code
Remove unused members
Missing some cases that I could not test.
Also ffmpeg/chroma.c is locked, so I can but leave it broken.
Fix is for the remaining modules is obvious and the issue is easy to detect.
Two things led me to add this new type of Lua modules:
* Most interfaces duplicate code from one another (rc and telnet both deal
with sockets, rc and hotkeys duplicate VLC interfacing code)
* It's easier to code in Lua than in C (for high level stuff)
(* Users can code their own module easily, all they need is a text editor.)
Most of the changes in modules/misc/ are Lua wrappers for different C APIs
in VLC. I'd say that 90% of those wrappers won't change, the other 10% might
need small changes (mostly to simplify the C code).
The VLC Lua "interface" module will look for lua scripts in the
*share*/luaintf/ directory. Files in *share*/luaintf/modules/ are lua modules
which can be used by multiple VLC Lua modules (using require "modulename").
This commit includes 4 Lua interface modules:
* dummy.lua: the default module. Prints error messages and quits.
* rc.lua: equivalent to the legacy rc.c module. Also includes a bunch of
new features (+ multiple socket connections at a time work!). See file for
more details.
* telnet.lua: equivalent to the legacy telnet.c module. See file for more
details.
* hotkeys.lua: a rewrite of the hotkey handling module. This module is still
experimental. I'll need to change VLC core hotkeys stuff to make it work
like I want (ie: 1 hotkey triggers 1 action instead of the current 1 action
can have 1 hotkey). This version executes 3 dummy actions when keys 'q',
'w' or 'x' are pressed.
What's left to do:
* Port the http interface plugin to this framework (at least for the
macros/rpn part ... using <?vlc some lua code ?> à la PHP would be way
easier than what we currently have).
* Finish work on the hotkeys module.
* Code a real telnet/rc module with autocompletion and all the cool features
usually found in a telnet/terminal interface.
* Trash the legacy C modules.
Stuff to test (which I can't test myself):
* Win32 and Mac OS X specific changes to Makefile.am
* Console interface under Win32. I expect it not to work.
Other stuff included in this changeset are:
* Code cleanup (I'm sure that it's still possible to simplify some of the old lua bindings code).
* That's pretty much it in fact :/