【问题标题】:Corrupt module error when using vlcj使用 vlcj 时出现损坏的模块错误
【发布时间】:2015-10-03 20:34:20
【问题描述】:

过去两个小时我一直在尝试使用 vlcj,但我不知道如何让它工作。我一直在使用this tutorial。即使像在教程中那样编写代码后,我仍然会收到此错误

SLF4J:无法加载类“org.slf4j.impl.StaticLoggerBinder”。

SLF4J:默认为无操作 (NOP) 记录器实现

SLF4J:请参阅http://www.slf4j.org/codes.html#StaticLoggerBinder 了解更多详情。

[000000001a8ed480] 核心流错误:模块损坏:C:\VideoLAN\VLC\plugins\stream_filter\libdash_plugin.dll

[000000001a8d7a30] 核心解复用元错误:模块损坏:C:\VideoLAN\VLC\plugins\meta_engine\libtaglib_plugin.dll

[000000001a8acfb0] 核心 vout 显示错误:无法设置在顶部

这是我正在使用的代码,它与教程有点不同,因为我的程序有不同的要求。

public class AVPlayer extends JPanel{

private EmbeddedMediaPlayerComponent mediaPlayer;       
private String vlcPath, mediapath ; //iniitalized in chooseFile()

//constructor
public AVPlayer() {
    chooseFiles();
    NativeLibrary.addSearchPath(RuntimeUtil.getLibVlcLibraryName(), vlcPath);
    mediaPlayer = new EmbeddedMediaPlayerComponent();
    add(mediaPlayer);
    setSize(400,400);


}

// method to explicitly choose the VLC path and the video file I want to play    
private void chooseFiles(){
    JFileChooser ourFileSelector = new JFileChooser();
    File ourfile;

    //choose vlc path
    ourFileSelector.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
    ourFileSelector.showSaveDialog(null);
    ourfile = ourFileSelector.getSelectedFile();
    vlcPath = ourfile.getAbsolutePath();

    //choose media path
    ourFileSelector.setFileSelectionMode(JFileChooser.FILES_ONLY);
    ourFileSelector.showSaveDialog(null);
    ourfile = ourFileSelector.getSelectedFile();
    mediapath = ourfile.getAbsolutePath();
}

//called in main to play the video
public void playVideo(){
    mediaPlayer.getMediaPlayer().playMedia(mediapath); 
  }
}

这是主要的

 public static void main(String[] args) { 
    JFrame frame = new JFrame();
    AVPlayer player = new AVPlayer();
    frame.add(player);               
    frame.setVisible(true);
    frame.validate();
    player.playVideo();
}

【问题讨论】:

    标签: java vlcj


    【解决方案1】:

    这里有三种不同的东西。

    第一个只是关于 vlcj 现在使用的 SLF4J 日志记录 API 配置的警告。按照您发布的链接,这很容易“修复”。

    第二个损坏模块是 VLC 本身报告的本机错误。这里最多可以说的是 VLC 未能加载和初始化这些插件(libdash 和 libtaglib),但至于失败的确切原因很难说。如果您在 Windows 上使用 64 位 VLC,请尝试使用 32 位 VLC 和 32 位 JVM。

    第三个是“无法设置在顶部...” - 这也是 VLC 报告的本机警告,根据我的经验,可以忽略而不会产生不利影响。

    vlcj 中并没有涉及这些问题。

    【讨论】:

    • 您尝试 32 位,是否使损坏的模块问题消失了?我以前在 Windows 上使用 64 位 VLC 时遇到过类似的问题。
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-08-18
    • 2016-11-04
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多