gstreamer-java / gst1-java-core

Java bindings for GStreamer 1.x
GNU Lesser General Public License v3.0
196 stars 71 forks source link

What may be the reason why the pipeline cannot be created #263

Closed BBDooooog closed 1 year ago

BBDooooog commented 1 year ago

environment

os ubuntu 22.04

openjdk version "1.8.0_362"

org.freedesktop.gstreamer gst1-java-core 1.4.0

gst

ii gir1.2-gstreamer-1.0:amd64 1.20.3-0ubuntu1 amd64 GObject introspection data for the GStreamer library ii gstreamer1.0-alsa:amd64 1.20.1-1 amd64 GStreamer plugin for ALSA ii gstreamer1.0-clutter-3.0:amd64 3.0.27-2ubuntu1 amd64 Clutter PLugin for GStreamer 1.0 ii gstreamer1.0-gl:amd64 1.20.1-1 amd64 GStreamer plugins for GL ii gstreamer1.0-gtk3:amd64 1.20.3-0ubuntu1 amd64 GStreamer plugin for GTK+3 ii gstreamer1.0-libav:amd64 1.20.3-0ubuntu1 amd64 ffmpeg plugin for GStreamer ii gstreamer1.0-packagekit 1.2.5-2ubuntu2 amd64 GStreamer plugin to install codecs using PackageKit ii gstreamer1.0-pipewire:amd64 0.3.48-1ubuntu3 amd64 GStreamer 1.0 plugin for the PipeWire multimedia server ii gstreamer1.0-plugins-bad:amd64 1.20.3-0ubuntu1 amd64 GStreamer plugins from the "bad" set ii gstreamer1.0-plugins-base:amd64 1.20.1-1 amd64 GStreamer plugins from the "base" set ii gstreamer1.0-plugins-base-apps 1.20.1-1 amd64 GStreamer helper programs from the "base" set ii gstreamer1.0-plugins-good:amd64 1.20.3-0ubuntu1 amd64 GStreamer plugins from the "good" set ii gstreamer1.0-plugins-ugly:amd64 1.20.1-1 amd64 GStreamer plugins from the "ugly" set ii gstreamer1.0-pulseaudio:amd64 1.20.3-0ubuntu1 amd64 GStreamer plugin for PulseAudio (transitional package) ii gstreamer1.0-qt5:amd64 1.20.3-0ubuntu1 amd64 GStreamer plugin for Qt5 ii gstreamer1.0-tools 1.20.3-0ubuntu1 amd64 Tools for use with GStreamer ii gstreamer1.0-x:amd64 1.20.1-1 amd64 GStreamer plugins for X11 and Pango ii libgstreamer-gl1.0-0:amd64 1.20.1-1 amd64 GStreamer GL libraries ii libgstreamer-opencv1.0-0:amd64 1.20.3-0ubuntu1 amd64 GStreamer OpenCV libraries ii libgstreamer-plugins-bad1.0-0:amd64 1.20.3-0ubuntu1 amd64 GStreamer libraries from the "bad" set ii libgstreamer-plugins-bad1.0-dev:amd64 1.20.3-0ubuntu1 amd64 GStreamer development files for libraries from the "bad" set ii libgstreamer-plugins-base1.0-0:amd64 1.20.1-1 amd64 GStreamer libraries from the "base" set ii libgstreamer-plugins-base1.0-dev:amd64 1.20.1-1 amd64 GStreamer development files for libraries from the "base" set ii libgstreamer-plugins-good1.0-0:amd64 1.20.3-0ubuntu1 amd64 GStreamer development files for libraries from the "good" set ii libgstreamer-plugins-good1.0-dev 1.20.3-0ubuntu1 amd64 GStreamer development files for libraries from the "good" set ii libgstreamer1.0-0:amd64 1.20.3-0ubuntu1 amd64 Core GStreamer libraries and elements ii libgstreamer1.0-dev:amd64 1.20.3-0ubuntu1 amd64 GStreamer core development files

code

https://github.com/gstreamer-java/gst1-java-core/blob/master/test/org/freedesktop/gstreamer/PipelineTest.java#testParseLaunch()

error

java.lang.AbstractMethodError at com.sun.jna.Structure.fieldOrder(Structure.java:952) at com.sun.jna.Structure.getFields(Structure.java:1006) at com.sun.jna.Structure.deriveLayout(Structure.java:1172) at com.sun.jna.Structure.calculateSize(Structure.java:1097) at com.sun.jna.Structure.calculateSize(Structure.java:1049) at com.sun.jna.Structure.allocateMemory(Structure.java:403) at com.sun.jna.Structure.(Structure.java:194) at com.sun.jna.Structure.(Structure.java:182) at com.sun.jna.Structure.(Structure.java:169) at com.sun.jna.Structure.(Structure.java:161) at org.freedesktop.gstreamer.lowlevel.GstMessageAPI$MessageStruct.(GstMessageAPI.java:65) at org.freedesktop.gstreamer.lowlevel.GstMessagePtr.(GstMessagePtr.java:29) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:423) at java.lang.Class.newInstance(Class.java:442) at com.sun.jna.NativeMappedConverter.defaultValue(NativeMappedConverter.java:61) at com.sun.jna.NativeMappedConverter.(NativeMappedConverter.java:55) at com.sun.jna.CallbackReference$DefaultCallbackProxy.(CallbackReference.java:479) at com.sun.jna.CallbackReference.(CallbackReference.java:227) at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:449) at com.sun.jna.CallbackReference.getFunctionPointer(CallbackReference.java:426) at com.sun.jna.Function.convertArgument(Function.java:551) at com.sun.jna.Function.invoke(Function.java:338) at com.sun.jna.Library$Handler.invoke(Library.java:244) at com.sun.proxy.$Proxy15.gst_bus_set_sync_handler(Unknown Source) at org.freedesktop.gstreamer.Bus.(Bus.java:97) at org.freedesktop.gstreamer.glib.NativeObject.objectFor(NativeObject.java:177) at org.freedesktop.gstreamer.glib.Natives.objectFor(Natives.java:166) at org.freedesktop.gstreamer.glib.Natives.callerOwnsReturn(Natives.java:140) at org.freedesktop.gstreamer.lowlevel.GTypeMapper$2.fromNative(GTypeMapper.java:113) at com.sun.jna.Function.invoke(Function.java:363) at com.sun.jna.Library$Handler.invoke(Library.java:244) at com.sun.proxy.$Proxy14.gst_pipeline_get_bus(Unknown Source) at org.freedesktop.gstreamer.Pipeline.(Pipeline.java:107) at org.freedesktop.gstreamer.Pipeline.(Pipeline.java:101) at org.freedesktop.gstreamer.glib.NativeObject.objectFor(NativeObject.java:177) at org.freedesktop.gstreamer.glib.Natives.objectFor(Natives.java:166) at org.freedesktop.gstreamer.glib.Natives.callerOwnsReturn(Natives.java:140) at org.freedesktop.gstreamer.lowlevel.GTypeMapper$2.fromNative(GTypeMapper.java:113) at com.sun.jna.Function.invoke(Function.java:363) at com.sun.jna.Library$Handler.invoke(Library.java:244) at com.sun.proxy.$Proxy10.gst_parse_launch(Unknown Source) at org.freedesktop.gstreamer.Gst.parseLaunch(Gst.java:225) at com.example.gst.test.PipelineTest.testParseLaunch(PipelineTest.java:79) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50) at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12) at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47) at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.runLeaf(ParentRunner.java:325) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:78) at org.junit.runners.BlockJUnit4ClassRunner.runChild(BlockJUnit4ClassRunner.java:57) at org.junit.runners.ParentRunner$3.run(ParentRunner.java:290) at org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71) at org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288) at org.junit.runners.ParentRunner.access$000(ParentRunner.java:58) at org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268) at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26) at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27) at org.junit.runners.ParentRunner.run(ParentRunner.java:363) at org.junit.runner.JUnitCore.run(JUnitCore.java:137) at com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:69) at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38) at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11) at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35) at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235) at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

neilcsmith-net commented 1 year ago

If you're getting an abstract method error there, then you're using a version of JNA that is too old.

BBDooooog commented 1 year ago

Thank you