Comments (11)
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
from gst1-java-core.
my mistake, i didnt load the libraries at the begining.i got it to work after looking to
#11
from gst1-java-core.
@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.
from gst1-java-core.
@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)
from gst1-java-core.
@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.
from gst1-java-core.
@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.
from gst1-java-core.
@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.
from gst1-java-core.
@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...)
from gst1-java-core.
@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.
from gst1-java-core.
Done it using reg programme on windows, still would have expected this to happen on install...
Thanx for the reply
from gst1-java-core.
@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.
from gst1-java-core.
Related Issues (20)
- Question about multithreading with multiple pipelines. HOT 1
- Possible crash on async explicit dispose in 1.4.0 HOT 3
- How to load subtitles? Solution and example required.
- native memory still exists after Pipeline.close HOT 6
- Is it possible to have a custom thread pool to execute GstCallback (AppSink.connect) ? (question)
- How to receive each frame as its pointer(Long type) or Byte array or etc. HOT 1
- VAAPI invalid chip id or driver is being used. HOT 2
- Using GIO objects
- GType.valueOf(long) is not thead safe HOT 3
- JVM Crashes HOT 3
- What may be the reason why the pipeline cannot be created HOT 2
- Exception in thread "main" java.lang.Error: Invalid memory access HOT 2
- How to improve throughput
- WebRTCBin.createAnswer() callback not called sporadically (promise garbage collected) HOT 4
- No such Gstreamer factory: webrtcbin HOT 5
- How to get RTPSession from rtpbin
- Need to know the native pointer of a Buffer object
- Segfault in extractError function HOT 6
- gst_element_get_request_pad HOT 1
- Support for pbutils HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gst1-java-core.