JVLC - find plugin path windows xp

This forum is about all development around libVLC.
quorthon
Blank Cone
Blank Cone
Posts: 28
Joined: 22 Mar 2009 17:32

JVLC - find plugin path windows xp

Postby quorthon » 07 Apr 2009 16:36

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

quorthon
Blank Cone
Blank Cone
Posts: 28
Joined: 22 Mar 2009 17:32

Re: JVLC - find plugin path windows xp

Postby quorthon » 14 Apr 2009 08:43

*up*

Any suggestions on this?

Thanks for your help.
Peter

lagerbie
New Cone
New Cone
Posts: 1
Joined: 10 Feb 2009 08:17

Re: JVLC - find plugin path windows xp

Postby lagerbie » 25 May 2009 09:13

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


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 23 guests