Page 1 of 1

JVLC - find plugin path windows xp

Posted: 07 Apr 2009 16:36
by quorthon
Hello

We're developing a jvlc-based java player which should be able to get and display a http-stream from a vlc-streaming-server. Because we're using this player inside sun's 3d virtual world wonderland, we cannot install the player. So we presuppose that the vlc-player is already installed on the systems of the wonderland-user. On linux all seems to work fine, the plugin-folder is found by the jvlc-player and the stream is displayed. When we use windwos xp as the client, the jvlc player doesn't find the plugin folder of the vlc installation. On xp-clients it only works when we instantiate the jvlc object the following way:
String[] args = new String[]{"-vvv","--plugin-path=PATH_TO_PLUGIN_FOLDER"};

But the problem is whenever a client has VLC installed in a different folder, we have the same problem: JVLC doesn't find the plugin folder...

Any ideas how to get rid of this issue?

Thanks for your help.
Peter

Re: JVLC - find plugin path windows xp

Posted: 14 Apr 2009 08:43
by quorthon
*up*

Any suggestions on this?

Thanks for your help.
Peter

Re: JVLC - find plugin path windows xp

Posted: 25 May 2009 09:13
by lagerbie
The Windows install create a registry key and you can interrogate this value.

The following code return the plug-in path on windows:

Code: Select all

public static String getVLCPluginPath(){ String command = "reg query HKLM\\SOFTWARE\\VideoLAN\\VLC /v InstallDir"; Runtime runtime = Runtime.getRuntime(); StringBuffer result = new StringBuffer(); try{ Process process = runtime.exec(command); byte[] data = new byte[1024]; int cnt = process.getInputStream().read(data); while(cnt > 0){ result.append(new String(data, 0, cnt)); cnt = process.getInputStream().read(data); } }catch(IOException e){ e.printStackTrace(); } String[] splitResult = result.toString().split("REG_SZ"); return splitResult[splitResult.length-1].trim() + "\\plugins"; }
I thing this can resolve your problem.

lagerbie