0

I am trying to build a simple Gstreamer java according to this tutorial and I found GStreamer cannot be used even if I have already linked both gstreamer library and jna library jar to my file. The code is simply:

import org.gstreamer.Gst;


public class PlayBack {
    public static void main(String[] args) {
         args = Gst.init("MyMediaPlayer", args);


    }
}

and I got an error saying the library is not found

Exception in thread "main" java.lang.UnsatisfiedLinkError: Error looking up function 'gst_date_get_type': dlsym(0x7fd7d9c1fa70, gst_date_get_type): symbol not found
    at com.sun.jna.Function.<init>(Function.java:208)
    at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:536)
    at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:513)
    at com.sun.jna.NativeLibrary.getFunction(NativeLibrary.java:499)
    at com.sun.jna.Library$Handler.invoke(Library.java:199)
    at com.sun.proxy.$Proxy2.gst_date_get_type(Unknown Source)
    at org.gstreamer.glib.GDate.<clinit>(GDate.java:40)
    at sun.misc.Unsafe.ensureClassInitialized(Native Method)
    at sun.reflect.UnsafeFieldAccessorFactory.newFieldAccessor(UnsafeFieldAccessorFactory.java:43)
    at sun.reflect.ReflectionFactory.newFieldAccessor(ReflectionFactory.java:140)
    at java.lang.reflect.Field.acquireFieldAccessor(Field.java:1057)
    at java.lang.reflect.Field.getFieldAccessor(Field.java:1038)
    at java.lang.reflect.Field.get(Field.java:379)
    at org.gstreamer.Gst.getField(Gst.java:447)
    at org.gstreamer.Gst.registerClass(Gst.java:460)
    at org.gstreamer.Gst.loadAllClasses(Gst.java:471)
    at org.gstreamer.Gst.init(Gst.java:338)
    at PlayBack.main(PlayBack.java:6)
flint_stone
  • 803
  • 1
  • 10
  • 19
  • funny thing is that I cannot find this function in any of my gstreamer libraries, but I do see it in source code.. what gstreamer version is this(0.10?)? I guess you already tried just simple gst-launch command to check if your gstreamer works.. – nayana Apr 28 '16 at 05:59
  • @otopolsky Thanks! I think you're right. I did some checking and found it was indeed an installation issue. – flint_stone May 05 '16 at 18:55
  • in that case you may want either close the question or answer it yourself :) – nayana May 06 '16 at 12:00

0 Answers0