Could not open DRM module

137 views
Skip to first unread message

Erkan Karataş

unread,
Jan 18, 2019, 10:43:54 AM1/18/19
to gstreamer-java
Hi all,

I'm trying to play video on embedded device with Java app. I have a BeagleBoard x15 card installed linux. 

Hardware accelerator works fine on command line:
 gst-launch-1.0 playbin uri=file:///home/video1.mov video-sink="kmssink name=kmssink0"


When I run java app, it fails with error: 
stMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
GstMessageStateChanged
streamsynchronizer0
STATE_CHANGED
----------
GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_VOID_PENDING;
GstMessageStateChanged
playsink
STATE_CHANGED
----------
GstMessageStateChanged, old-state=(GstState)GST_STATE_NULL, new-state=(GstState)GST_STATE_READY, pending-state=(GstState)GST_STATE_PLAYING;
GstMessageStateChanged
playbin
STATE_CHANGED
----------
GstMessageStateChanged, old-state=(GstState)GST_STATE_READY, new-state=(GstState)GST_STATE_PAUSED, pending-state=(GstState)GST_STATE_VOID_PENDING;
GstMessageStateChanged
streamsynchronizer0
STATE_CHANGED
kmssink0
7
Could not open DRM module (NULL)
----------
GstMessageError, gerror=(GError)NULL, debug=(string)"../../../gst-plugins-bad-1.12.2/sys/kms/gstkmssink.c\(610\):\ gst_kms_sink_start\ \(\):\ /GstBin:bin0/GstKMSSink:kmssink0:\012reason:\ No\ such\ file\ or\ directory\ \(2\)";
GstMessageError
kmssink0
ERROR
kmssink0
4
GStreamer error: state change failed and some element failed to post a proper error message with the reason for the failure.
----------
GstMessageError, gerror=(GError)NULL, debug=(string)"../../../../gstreamer-1.12.2/libs/gst/base/gstbasesink.c\(5264\):\ gst_base_sink_change_state\ \(\):\ /GstBin:bin0/GstKMSSink:kmssink0:\012Failed\ to\ start";
GstMessageError
kmssink0
ERROR

Java file:
Bin bin = Bin.launch("kmssink name=kmssink0 ", true);
playbin = new PlayBin("playbin");
playbin.setVideoSink(bin);

File video = new File("/home/video1.mov");
playbin.setURI(video.toURI());

bus = playbin.getBus();

bus.connect(new Bus.INFO() {
@Override
public void infoMessage(GstObject gstObject, int i, String s) {
System.out.println(gstObject.getName());
System.out.println(i);
System.out.println(s);
}
});

bus.connect(new Bus.ERROR() {
@Override
public void errorMessage(GstObject gstObject, int i, String s) {
System.out.println(gstObject.getName());
System.out.println(i);
System.out.println(s);
}
});


bus.connect(new Bus.MESSAGE() {

@Override
public void busMessage(Bus arg0, Message arg1) {
System.out.println("----------");
System.out.println(arg1.getStructure());
System.out.println(arg1.getStructure().getName());
System.out.println(arg1.getSource().getName());
System.out.println(arg1.getType());
}
});

playbin.play();


Do you have any idea or suggestion with this problem?

Neil C Smith

unread,
Jan 22, 2019, 8:13:15 AM1/22/19
to gstream...@googlegroups.com
On Fri, 18 Jan 2019 at 15:43, Erkan Karataş <ekara...@gmail.com> wrote:
> Hardware accelerator works fine on command line:
> gst-launch-1.0 playbin uri=file:///home/video1.mov video-sink="kmssink name=kmssink0"
...
> Java file:
>
> Bin bin = Bin.launch("kmssink name=kmssink0 ", true);
>
> playbin = new PlayBin("playbin");
> playbin.setVideoSink(bin);

Hi and welcome! Sorry for the late reply as I was at a conference.
Doesn't seem like anyone else has responded to you?

I would firstly try running this with Pipeline.launch() identically as
you have on the command line and see if it works. That might flag up
problems with the JDK in the mix.

Note that the code you have above is not doing the same thing - it's
putting the kmssink in a Bin, rather than at the top level. This
might be the cause of the issue - I've noticed a few elements having
problems doing that.

Ideally you want to use the ElementFactory to create the kmssink I think.

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

Erkan Karataş

unread,
Jan 22, 2019, 8:54:03 AM1/22/19
to gstreamer-java
Thank you Sir,

I have in a trouble with beagleboard x15. My goal is play video on GPU with JavaFx. I tried lots of things, images, kernels, packages. I could not install even drivers. Is really hard to play video with Java on BBX15 using hardware accelerator. I found gstreamer-java and implemented in my small project  but as you see, I have lots of problems. I'm sorry for your time wast.




22 Ocak 2019 Salı 16:13:15 UTC+3 tarihinde Neil C Smith yazdı:

Neil C Smith

unread,
Jan 22, 2019, 9:26:59 AM1/22/19
to gstream...@googlegroups.com


On Tue, 22 Jan 2019, 13:54 Erkan Karataş <ekara...@gmail.com wrote:
Thank you Sir,

I have in a trouble with beagleboard x15. My goal is play video on GPU with JavaFx. I tried lots of things, images, kernels, packages. I could not install even drivers. Is really hard to play video with Java on BBX15 using hardware accelerator. I found gstreamer-java and implemented in my small project  but as you see, I have lots of problems. I'm sorry for your time wast.

No problem! And not a time waste. Anything that works on the command line should work fine with the bindings if you replicate the pipeline correctly. However, without hacking into JavaFX internals you won't be able to connect this up. You'd have to stick with a separate output.  

Best wishes, 

Neil
Reply all
Reply to author
Forward
0 new messages