rtspsrc plugin problem
chenjeff622 opened this issue · 1 comments
this is my code .
####################################################################
Element src = ElementFactory.make("rtspsrc", "src");
src.set("location", "rtsp://XXXXXXXXXXXXXXXXXXXXXXXX");
src.set("latency", 100);
Element decode = ElementFactory.make("decodebin", "decode");
Element sink = ElementFactory.make("autovideosink", "sink");
pipe.addMany(src, decode, sink);
Pipeline.linkMany(src, decode, sink);
pipe.play();
Gst.getExecutor().schedule(Gst::quit, 60, TimeUnit.SECONDS);
Gst.main();
####################################################################
it always show Exception:
(java.exe:16476): GStreamer-CRITICAL **: 19:13:22.985: gst_event_set_seqnum: assertion 'seqnum != GST_SEQNUM_INVALID' failed.
when i use commandline below. it display correct.
gst-launch-1.0.exe rtspsrc location="rtsp://XXXXXXXXXXXXXXXXXXXXXXXX" latency=100 ! decodebin ! autovideosink
You can't link a decodebin to the sink in this way. You need to listen for the pads to be added. This is handled for you if you use the CLI, or using the Gst::parseLaunch methods. Otherwise check the code at https://github.com/gstreamer-java/gst1-java-examples/blob/master/src/main/java/org/freedesktop/gstreamer/examples/AppSrcToAppSinkExample.java#L174
Please use the mailing list if you have any further questions on this, thanks.