javafx crashes in loop because of gstreamer state change error

109 views
Skip to first unread message

M!X

unread,
Apr 1, 2021, 5:09:54 AM4/1/21
to gstreamer-java
configuration: ubuntu, jdk15, javafx11, language level: java 8 
code example(I'm using it to simply my scenario, the error can always happen when it loop after around 100 times):
Screenshot from 2021-04-01 11-30-38.png
the origin error:
I tried to debug it, and find the original error msg is: com.sun.media.jfxmedia.MediaError:ERROR_GSTREAMER_PIPELINE_STATE_CHANGE
it is from a native method, i don't know what happens in it.

the throwed out exception msg:
Caused by: MediaException: UNKNOWN : com.sun.media.jfxmedia.MediaException: Could not create player! : com.sun.media.jfxmedia.MediaException: Could not create player! at javafx.media/javafx.scene.media.MediaException.exceptionToMediaException(MediaException.java:146) at javafx.media/javafx.scene.media.MediaPlayer.init(MediaPlayer.java:518) at javafx.media/javafx.scene.media.MediaPlayer.<init>(MediaPlayer.java:421) at org.openjfx/org.openjfx.App.main(App.java:35) ... 11 more Caused by: com.sun.media.jfxmedia.MediaException: Could not create player! at javafx.media/com.sun.media.jfxmediaimpl.NativeMediaManager.getPlayer(NativeMediaManager.java:295) at javafx.media/com.sun.media.jfxmedia.MediaManager.getPlayer(MediaManager.java:118) at javafx.media/javafx.scene.media.MediaPlayer.init(MediaPlayer.java:474) ... 13 more Exception running application org.openjfx.App

Neil C Smith

unread,
Apr 1, 2021, 5:14:35 AM4/1/21
to gstream...@googlegroups.com
On Thu, 1 Apr 2021 at 10:09, M!X <yunj...@gmail.com> wrote:
> the origin error:
> I tried to debug it, and find the original error msg is: com.sun.media.jfxmedia.MediaError:ERROR_GSTREAMER_PIPELINE_STATE_CHANGE
> it is from a native method, i don't know what happens in it.

Sorry, nothing to do with us. JavaFX has its own, very minimal,
GStreamer integration (they call it GStreamer-lite). You'll need to
take it up with them - https://github.com/openjdk/jfx

Best wishes,

Neil

--
Neil C Smith
Codelerity Ltd.
www.codelerity.com

Codelerity Ltd. is a company registered in England and Wales
Registered company number : 12063669
Registered office address : Office 4 219 Kensington High Street,
Kensington, London, England, W8 6BD
Reply all
Reply to author
Forward
0 new messages