set jna.library.path

2,533 views
Skip to first unread message

manu

unread,
Sep 30, 2009, 11:17:04 AM9/30/09
to gstreamer-java
Hi,

I have some trouble with setting the jna.library.path property
correctly.
I can not assume that the user has his native-gstreamer library in his
path so I need to set the property in my application.

So that is what I do:

System.setProperty("jna.library.path", "C:\\gstreamer\\lib\
\gstreamer-0.10;C:\\gstreamer\\bin;C:\\gstreamer\\lib\\gstreamer-0.10\
\Microsoft.VC90.CRT");

The result is an IllegalArgumentException when I try to call
ElementFactory.make()

Allthough I get this exception I think setting jna.library.path has
some effect because Gst.init() do not cause any exception.

I would like to know if there are any other possibilities to set the
path to the native gestreamer-libraries using gstreamer-java.

I am using gstreamer on Windows.

Any help is very welcome,

manu

Tal Shalif

unread,
Sep 30, 2009, 1:41:50 PM9/30/09
to gstream...@googlegroups.com
Setting jna.library.path from inside your Java applet/application should work - as long as you set it *before*  JNA is ever used. You do not need to include the gstreamer plugin path (C:\gstreamer\lib\gstreamer-0.10 is the plugin directory, I assume), because plugin DLLs are dynamically loaded by gstreamer itself - not JNA  (I found, however, that in some cases I need to use JNA to force-load 3rd party DLL dependencies for some of the plugins).

To set the plugin path you need to pass the --gst-plugin-path to Gst.init()

Also - this may be important - where did you get the gstreamer windows binaries from and what version are they?

2009/9/30 manu <kunz....@googlemail.com>
Reply all
Reply to author
Forward
0 new messages