Problems with gstreamer and windows 10

446 views
Skip to first unread message

Magnus Dahlberg

unread,
Nov 16, 2018, 7:52:41 AM11/16/18
to gstreamer-java
I'm getting some strange behaviour from gstreamer, and some of it seems related to windows 10. I was wondering if you'd have any suggestions? 

The setup I'm using; 
  • GStreamer 1.14.4 (I've tried some previous versions too, mainly 1.10) 64 bit version
  • jdk 1.8.172 64-bit (tried other versions too)
  • gst1-java-core 0.93 (tried some previous versions, and built the latest snapshot)
I'm using gstreamer in a netbeans platform application. 

The setup is working when running in windows 7. Tried it on about 4 different computers. 
It's not working when running in windows 10. Tried on ~3 different computers. 

It's also only working on the win 7 computers when running the packaged application. Not when running it from netbeans (run or debug). 

The PlayBinVideoPlayer example works on the win10 computer. (But gets stuck in a deadlock if I'm using web radio in chrome...)

The exceptions I'm getting are these: 


If running on win 10 from netbeans:
java.lang.IllegalArgumentException: No such Gstreamer factory: playbin
at org.freedesktop.gstreamer.ElementFactory.makeRawElement(ElementFactory.java:221)
at org.freedesktop.gstreamer.Element.makeRawElement(Element.java:86)
at org.freedesktop.gstreamer.elements.PlayBin.<init>(PlayBin.java:133)

If running on win 10 from packaged application:
java.lang.Error: Invalid memory access
at com.sun.jna.Native.invokeInt(Native Method)
at com.sun.jna.Function.invoke(Function.java:419)
at com.sun.jna.Function.invoke(Function.java:354)
at com.sun.jna.Library$Handler.invoke(Library.java:244)
at org.freedesktop.gstreamer.lowlevel.GNative$Handler.invoke(GNative.java:195)
at com.sun.proxy.$Proxy60.gst_element_set_state(Unknown Source)
at org.freedesktop.gstreamer.Element.setState(Element.java:192)


Another curious thing is, usually Gst.init() fails with this exception the first time i call it. If I call it again it succeeds. 
java.lang.NoSuchFieldError: SIZE
at org.freedesktop.gstreamer.Gst$NativeArgs.<init>(Gst.java:87)
at org.freedesktop.gstreamer.Gst.init(Gst.java:292)
at org.freedesktop.gstreamer.Gst.init(Gst.java:262)
Any ideas or suggestions on what I should try next? 

Neil C Smith

unread,
Nov 16, 2018, 8:07:36 AM11/16/18
to gstream...@googlegroups.com
Hi,

A quick reply. Check you're not picking up JNA 5. The 0.9.3 release doesn't support JNA 5, and the current snapshot still needs further testing. 

Versions older than 0.9.3 may have a memory error on Win 10 64bit due to an incorrect mapping. 

How are you setting up paths or environment variables? It sounds like you may not be setting up the plugin path correctly on the Win 10 machine.

Best wishes, 

Neil

--
You received this message because you are subscribed to the Google Groups "gstreamer-java" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gstreamer-jav...@googlegroups.com.
To post to this group, send email to gstream...@googlegroups.com.
Visit this group at https://groups.google.com/group/gstreamer-java.
For more options, visit https://groups.google.com/d/optout.

Magnus Dahlberg

unread,
Nov 16, 2018, 8:47:26 AM11/16/18
to gstreamer-java
Hi! 

I forgot to mention JNA, I'm using 4.5.1 but I've tried with 5.0.0 also. I'll double check that no other version is getting mixed in somehow. 

I installed by running gstreamer-1.0-x86_64-1.14.1.msi, and added C:\gstreamer\1.0\x86_64\bin to the path environment variable. Is there a different approach to win 10 compared to win 7? 

Thanks for the quick reply, I'll look into the plugin path and see if there's any problem there :)

Neil C Smith

unread,
Nov 16, 2018, 10:34:17 AM11/16/18
to gstream...@googlegroups.com


On Fri, 16 Nov 2018, 13:47 Magnus Dahlberg <bja...@gmail.com wrote:

I installed by running gstreamer-1.0-x86_64-1.14.1.msi, and added C:\gstreamer\1.0\x86_64\bin to the path environment variable. Is there a different approach to win 10 compared to win 7? 

You could also check if PraxisLIVE works on that machine, or copy the use of JNA Platform in https://github.com/praxis-live/praxis/blob/master/praxis.video.gstreamer/src/org/praxislive/video/gstreamer/components/GStreamerLibrary.java

One problem I've noticed is sometimes having the library at the end of the path environment variable had issues. 

Best wishes, 

Neil

Magnus Dahlberg

unread,
Nov 20, 2018, 9:44:05 AM11/20/18
to gstreamer-java
Thanks a lot! That helped! 

When I moved gstreamer to be first on the path variable, the problems stopped. And I added something similar as was in GStreamerLibrary.java to make sure it was first. :)

Neil C Smith

unread,
Nov 20, 2018, 9:47:48 AM11/20/18
to gstream...@googlegroups.com
On Tue, 20 Nov 2018 at 14:44, Magnus Dahlberg <bja...@gmail.com> wrote:
> When I moved gstreamer to be first on the path variable, the problems stopped. And I added something similar as was in GStreamerLibrary.java to make sure it was first. :)

Great! Good to know that worked, and also that the same bug affects
you so it's not user error at this end! I'd love to know why that
breaks. Bug in Windows path handling?

Best wishes,

Neil
--
Neil C Smith
Artist & Technologist
www.neilcsmith.net

PraxisLIVE - hybrid visual live programming
for creatives, for programmers, for students, for tinkerers
www.praxislive.org
Reply all
Reply to author
Forward
Message has been deleted
0 new messages