java.lang.UnsatisfiedLinkError:无法加载库gstreamer-0.10

时间:2018-07-04 19:24:28

标签: java maven gstreamer

在编译以下代码时遇到此问题。我为Windows安装了gstreamer,并将开发jar文件添加到了我的IDE中,但无法解决此问题,请帮帮我。

import org.freedesktop.gstreamer.ElementFactory;
   import org.freedesktop.gstreamer.Gst;
   import org.freedesktop.gstreamer.State;
   import org.freedesktop.gstreamer.elements.PlayBin;  
   import org.freedesktop.gstreamer.lowlevel.GstNative;

   import java.io.File;

   public class Main {

    public static void main(String[] args)
    {
        try {

            Gst.init("MyMediaPlayer", args);

            PlayBin playbin = new PlayBin("AudioPlayer");
            playbin.setVideoSink(ElementFactory.make("fakesink", "videosink"));
            playbin.setInputFile(new File("good.mp3"));

            playbin.setState(State.PLAYING);
            Gst.main();
            playbin.setState(State.NULL);
        }
        catch(UnsatisfiedLinkError t)
        {
            t.printStackTrace();
        }
    }

}

0 个答案:

没有答案