[vlc-devel] Lua extension and vlc.misc

Xavion xavion.0 at gmail.com
Thu Mar 8 23:26:13 CET 2012

Hi All

Here's what I think about the disablement of "vlc.misc" for extension
scripts in VLC v2.x.  My "Media Context" (MC) extension needs the
"vlc.misc.version()" function to ensure that it isn't being run on an old
edition of VLC.

This is absolutely necessary, as anything earlier than VLC v1.1.11 was
horribly buggy.  Some lazy users might still be running VLC v1.1.10 or
earlier.  My MC extension tells them they must upgrade their VLC version

Suppose something similar happens in VLC v2.x.  There are still some pretty
major bugs in VLC's extension code that cause it to freeze.  When these
finally get fixed, I will want to force MC users to upgrade VLC then too.

MC also uses "vlc.misc" in several other ways.  It uses "vlc.misc.mwait()"
and "vlc.misc.mdate()" to wait for the new metadata to stabilise after each
track change.  Using callbacks alone can't get the job done in this case!

This is because an inconsistent number of metadata changes occur per track
change when listening to streams.  There's simply no way of predicting
which of these metadata changes will be the (final) one that MC should use.

The only way to wait for the final metadata change is to call a
"vlc.misc.mwait()" delay for a couple of seconds after the first one.
Within that timeframe, all of the metadata changes have occurred and it has
finally stabilised.

MC must wait for this final metadata change because it'd be downloading
context information - and temporarily stalling VLC - multiple times per
track change otherwise.  I hope it's now obvious why "vlc.misc.mwait()" is

MC uses "vlc.misc.cachedir()" to save downloaded image files about the
current context (e.g. artist, album, track).  Without this, MC would have
to rely on unreliable environment variables (e.g. "TEMP", "TMP", "TMPDIR").

For all of these reasons, it's absolutely necessary to have "vlc.misc" or
an equivalent in VLC v2.x.  For the benefit of my reasonably popular MC
extension, will you please enable access to "vlc.misc" via extensions again?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/vlc-devel/attachments/20120309/c0355405/attachment.html>

More information about the vlc-devel mailing list