Is there a way to pre-load plugins and pre-initialize VLC?

All you've ever wanted to know about the ActiveX, Mozilla plugins, the web interface and various PHP extensions
corvusvideo
Blank Cone
Blank Cone
Posts: 29
Joined: 03 Mar 2008 16:14

Is there a way to pre-load plugins and pre-initialize VLC?

Postby corvusvideo » 14 Jul 2008 20:17

On some slower systems when a user plays the first video there is often a time where audio plays but no video, then video finally starts. After that all videos start immediately. I assume that during this time VLC is still initializing, or loading plugins.

Is there any call I can make, or any other way that I can make VLC do its initial operation while I display an appropriate "working" message so that the first video plays from the beginning?

Thanks.....

RKM

corvusvideo
Blank Cone
Blank Cone
Posts: 29
Joined: 03 Mar 2008 16:14

Re: Is there a way to pre-load plugins and pre-initialize VLC?

Postby corvusvideo » 15 Jul 2008 13:27

I found by trial and error that doing a "LoadLibrary" on all the DLLs will force them into the DLL cache and perform any virus checks your system does. Putting up a "working" message during this step seems to make for a better user experience. If anyone knows a better way, or a built-in method in libvlc I would like to hear about it. Thanks.

Code: Select all

[DllImport("kernel32")] static extern IntPtr LoadLibrary(string lpFileName); public void PreloadPlugins(String pStartupPath) { LoadLibrary(pStartupPath + @"\libvlccore.dll"); LoadLibrary(pStartupPath + @"\libvlc.dll"); string[] dlls = Directory.GetFiles(pStartupPath + @"\plugins", "*.dll"); foreach (String dll in dlls) { LoadLibrary(dll); } }

corvusvideo
Blank Cone
Blank Cone
Posts: 29
Joined: 03 Mar 2008 16:14

Maximum startup speed

Postby corvusvideo » 16 Jul 2008 18:18

OK. The preloading the DLLs trick helps a little bit but not nearly so much as using the following options:

Code: Select all

string[] args = new string[] { "-I", "dummy", "--plugins-cache", "--minimize-threads", "--no-reset-plugins-cache", "--high-priority" };
Running with these options resulted in the fastest startup and play I was able to achieve (BTW I am using 0.9.0 libvlc).

Any other ideas gratefully received.

RKM


Return to “Web and scripting”

Who is online

Users browsing this forum: No registered users and 2 guests