caprica / vlcj-natives

Native bindings to LibVLC used by the vlcj project
14 stars 6 forks source link

replacement for NativeLibrary.addSearchPath #3

Closed Abu-Abdullah closed 3 years ago

Abu-Abdullah commented 3 years ago

Im trying to test vlcj 5.0.0 it seems there is no need for jna libraries anymore with this release. i'm adding vlc as part of app hence i need to specify the path to the vlc folder. currently im using: NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), ....); but this call needs jna libraries again.

is there a way to have a replacement in vlcj-natives to avoid adding those libraries.

is my undestanding correct here, that we do not need those libraries anymore

Abu-Abdullah commented 3 years ago

another point is that maven repository does not include 5.0.0 snapshot, i have downloaded it manually from github packages link

caprica commented 3 years ago

Your understanding is not correct. JNA is still required, why do you think otherwise?

The 5.0.0 snapshot is in the Maven snapshot repo, you need to change your own pom to enable the snapshot repo.

caprica commented 3 years ago

I would add, the intention is that you do NOT need to use NativeLibrary.addSearchPath yourself, in almost all cases vlcj should find the native libraries for you.

And if it doesn't, you're supposed to plugin to the vlcj discovery process (e.g. by providing a list of directories to search) rather than worrying about calling NativeLibrary.addSearchPath yourself.

In fact, with vlcj-5.x.x, there is even a plugin to the native discovery process that uses a configuration file. I would encourage you to look at the vlcj sources or Javadoc around native discovery and the native directory provider components. You have a lot of options and none of them require you to use NativeLibrary.addSearchPath - but behind the scenes JNA still is used.

Abu-Abdullah commented 3 years ago

thank you. it is just the old way im doing since the begining and it works till today. i will look into the configuration file option. i guess this will be the best option.

aside from this, i tried the new version and it is working as expected. thank you