Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows: Failed to load plugin 'C:\gstreamer\1.0\x86_64\ ..... #15

Closed
Abu-Abdullah opened this issue Jun 28, 2016 · 11 comments
Closed

Windows: Failed to load plugin 'C:\gstreamer\1.0\x86_64\ ..... #15

Abu-Abdullah opened this issue Jun 28, 2016 · 11 comments

Comments

@Abu-Abdullah
Copy link

Hi,

Im trying to test gstreamer on windows using the example on:
gst1-java-examples/src/main/java/org/freedesktop/gstreamer/examples/CameraTest.java

it fails throwing:
(java.exe:7628): GStreamer-WARNING **: Failed to load plugin 'C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\libgsty4menc.dll': 'C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\libgsty4menc.dll': The specified module could not be found.
.
.
. (All plugins are the same)

I'm setting the path: -Djna.library.path=C:\gstreamer\1.0\x86_64\bin
gstreamer 1.8.2 (64bit)
java 8 (64bit)
Windows 10 64bit

Any support is appreciated.

@Abu-Abdullah
Copy link
Author

my mistake, i didnt load the libraries at the begining.i got it to work after looking to
#11

@ckovorodkin
Copy link

Hi!

I have the same problem, but at last I solved it.

I'm setting the path: -Djna.library.path=C:\gstreamer\1.0\x86_64\bin

and got errors like that

(java.exe:7628): GStreamer-WARNING **: Failed to load plugin 'C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\libgsty4menc.dll': 'C:\gstreamer\1.0\x86_64\lib\gstreamer-1.0\libgsty4menc.dll': The specified module could not be found.

But when I set PATH=%PATH%;C:\gstreamer\1.0\x86_64\bin instead of -Djna.library.path=C:\gstreamer\1.0\x86_64\bin library was loaded successfully and org.freedesktop.gstreamer.examples.PlayBinVideoPlayer is working fine.

Installer for gstreamer doesn't update environment variable PATH (but creates GSTREAMER_1_0_ROOT_X86_64=C:\gstreamer\1.0\x86_64\).

I think, that it can be useful, if that setup will be described in documentation.

PS

Windows 7 64 bit
PATH=%path%;C:\gstreamer\1.0\x86_64\bin
gstreamer-1.0-x86_64-1.12.4.msi
net.java.dev.jna:jna:4.5.1
org.freedesktop.gstreamer:gst1-java-core:0.9.2

@neilcsmith-net
Copy link
Member

@ckovorodkin Thanks, yes I agree we need something better documented. This comes up every now and again on the mailing list - are you on it?

The README mentions the need to have GStreamer in your path. That could be more explicit, but also we could provide further details in a wiki page. Feel free to start one! 😄

One reason this isn't better documented is that there are multiple ways to set up your environment / application to get GStreamer in your path. This approach may be the simplest from the perspective of getting started with development, but it's not ideal for an application.

@avasilevich
Copy link

avasilevich commented Mar 9, 2018

@ckovorodkin So much thanks for an advice!

Did as you said, GStreamer warnings disappears.
But, there are another problem at runtime, have same library versions as you and Windows 10 x64.
Have you encountered such a problem, while running gstreamer-examples?

P.S. Running with Java 9, will try Java 8 instead.

Exception in thread "AWT-EventQueue-0" java.lang.Error: Invalid memory access
	at com.sun.jna.Native.invokePointer(Native Method)
	at com.sun.jna.Function.invokePointer(Function.java:490)
	at com.sun.jna.Function.invoke(Function.java:434)
	at com.sun.jna.Function.invoke(Function.java:354)
	at com.sun.jna.Library$Handler.invoke(Library.java:244)
	at com.sun.proxy.$Proxy2.g_type_name(Unknown Source)
	at org.freedesktop.gstreamer.lowlevel.GType.getTypeName(GType.java:145)
	at org.freedesktop.gstreamer.lowlevel.GstTypes.classFor(GstTypes.java:54)
	at org.freedesktop.gstreamer.ElementFactory.elementFor(ElementFactory.java:231)
	at org.freedesktop.gstreamer.ElementFactory.make(ElementFactory.java:91)
	at org.freedesktop.gstreamer.examples.PlayBinVideoPlayer.lambda$0(PlayBinVideoPlayer.java:59)
	at java.desktop/java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEventImpl(Unknown Source)
	at java.desktop/java.awt.EventQueue.access$500(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.desktop/java.awt.EventQueue$3.run(Unknown Source)
	at java.base/java.security.AccessController.doPrivileged(Native Method)
	at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(Unknown Source)
	at java.desktop/java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.desktop/java.awt.EventDispatchThread.run(Unknown Source)

@neilcsmith-net
Copy link
Member

@avasilevich there seems to be an issue with Java 9 and Windows 10.

Please see discussions on the GStreamer-Java mailing list - https://groups.google.com/forum/#!topic/gstreamer-java/K-lQEU1CqqI

and the JNA list - https://groups.google.com/forum/#!topic/jna-users/RJjcN5sw_po

Input from you would be welcome as it's good someone else can reproduce the issue.

The workaround should be to use Java 8. Hopefully we can fix, but as far as I'm concerned a non-LTS will never be the recommended JDK to use.

@avasilevich
Copy link

@neilcsmith-net Thanks for reply! You are absolutely right. It's just an issue with Java 9. Switching to JDK and JRE 8 solved it, all examples works perfectly! Also used JNA version 4.4.0 instead of 4.5.1, idk whether it's important.

@neilcsmith-net
Copy link
Member

@avasilevich actually good to know it's broken with 4.4.0 too, and not just an issue with 4.5.x. Thanks! Glad it's working for you with 8 now.

@eitzenbe
Copy link

eitzenbe commented May 2, 2020

@neilcsmith-net as I am getting bitten by this issue as well, why is it that the PATH env var does not get updated when installing gstreamer on windows? I am implementing a JavaFX app and with the jpackage EXE installer produced there is no way to set the path before executing the javafx app.... In that case I would be "forced" to ask the users when installign the app to add somethign to their systempath (which most users dont know how to do...)

@neilcsmith-net
Copy link
Member

@eitzenbe you'd have to ask upstream why the installer doesn't do this, but it's easy to set up the path - see the readme link to PraxisCORE use of JNA Platform for one way.

@eitzenbe
Copy link

eitzenbe commented May 2, 2020

Done it using reg programme on windows, still would have expected this to happen on install...
Thanx for the reply

@neilcsmith-net
Copy link
Member

@eitzenbe fine, if you really want to do it that way, but good to make sure it's first element if you do. Far better for your app to handle it during its own execution as outlined above.

Please use mailing list rather than closed issues for support, thanks. You'll find the path question covered multiple times in the archives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants