Using camera within eclipse

edited February 2017 in Library Questions

Im using Camera class from video library in an eclipse project, while it works fine within that particoular project when i try to invoke camera functions from within my framework i get the warning

(javaw.exe:3840): GStreamer-WARNING **: Failed to load plugin 'C:/Users/aaa/Desktop/bbb/ccc/video/library/\windows64\plugins\libgstvorbis.dll' ecc... on 30+ plugins.

Basically i got a "view" project with all view logics and some working tests and a "root" project that instantiates the view,the controller and link them togheter.

Problem is that apparently the directory from which im running the main affects some jna related property, so if i run my application from "root" project i get the above warnings and consequent fails. To test the above sentence i made a one line main in "root" project that invokes a working test in "view" project, and run the same test directly in "view" project. the first fails the second not.

What i would like to do is to keep things as are now(all the dlls in "view" project) to keep my MVC like pattern and make it work, is that possible?


  • I'm not sure this is JNA related. GStreamer seems to have loaded, but isn't able to load its plugins (which aren't loaded through JNA). Check out the source code here -

    it mentions some GStreamer specific system properties which might help if you haven't tried them already - specifically the plugin path?

  • seems like i have to change both gstreamer.library.path and gstreamer.plugin.path to make it work but what do gstreamer.library.path needs to be? i tried the library folder but i get can't load library gio-2.0 (gio-2.0|libgio-2.0|libgio-2.0-0) with -Djna.library.path=C:\Users\aaa\Desktop\bbb\view\video\library. Last error:java.lang.UnsatisfiedLinkError: Unable to load library 'gio-2.0': Native library (win32-x86-64/gio-2.0.dll) not found in resource path ([file:/C:/Users/aaa/Desktop/bbb/dskRoot/bin/, file:/C:/Users/aaa/Desktop/bbb/dskC/bin/, file:/C:/Users/aaa/Desktop/bbb/LocalM/bin/, ecc... (on all included projects)

  • also i tried to read both properties but they are null in both cases, seems like if they arent specified the run folder will be used as some planB

  • edited February 2017 Answer ✓

    Both properties should be null unless you set them!

    IIRC the GStreamer library path should be the folder that has gio-2.0 etc. in it, which is the windows32 or windows64 folder inside library. The plugin path should be the plugin folder within that. Don't set jna.library.path.

  • i tried System.setProperty("gstreamer.library.path","C:\Users\aaa\Desktop\bbb\dskV\video\library\windows64\");


    I get the same warnings as before, launching from View works, launching from root loads GStreamer but cant load plugins

  • Is that really your code there? Try replacing all single backslashes with double backslashes if so.

    If it's not that, I'm stuck! Are you sure you're setting those properties before anything kicks off library loading? There is something weird that the error message you first posted has a mix of forward and backward slashes too. Time to get the debugger out. ;-)

  • edited February 2017

    Solved it, somehow... on top of the suggested property set i moved the view project on top of the build path, seeing that a new project with just the view project imported in its build path worked(if setting the above properties). Apparently something happens during static{ methods or maybe i had some unlucky class override... all is well what ends well

Sign In or Register to comment.