首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >VLCJ-Pro Java返回:-57005

VLCJ-Pro Java返回:-57005
EN

Stack Overflow用户
提问于 2017-07-11 11:43:50
回答 1查看 345关注 0票数 0

我的任务是在网格中使用链接的时间洗涤器播放多个视频,我已经让它工作了(使用VLCJ而不是VLCJ-PRO),但它非常挑剔。

所以我决定试一试VLCJ-Pro,但是我在第一行得到了一个错误。

代码语言:javascript
复制
22:25:25.614 [main] INFO  u.c.c.vlcj.discovery.NativeDiscovery - Discovery 
found libvlc at 'D:\VLC'
C:\Users\trans\AppData\Local\NetBeans\Cache\8.2\executor-
snippets\run.xml:53: Java returned: -57005
BUILD FAILED (total time: 0 seconds)

VLCJ-Pro应该可以帮助解决VLCJ的多视频问题(本地库崩溃经常发生)。所以我想看看它是否有助于稳定性,但我甚至不能让它运行。

VLCJ-Pro Download Location

下面是我用来测试库的全部代码。我使用Netbeans作为IDE,并在示例代码中添加了所有JAR库。

如果你有任何使用VLCJ-Pro的经验,我将非常感谢任何关于我的错误的反馈。

代码语言:javascript
复制
package vlcjprodemo;

import java.awt.BorderLayout;
import java.awt.Canvas;
import java.awt.Color;
import java.awt.Dimension;
import javax.swing.JFrame;
import javax.swing.WindowConstants;
import uk.co.caprica.vlcj.discovery.NativeDiscovery;
import uk.co.caprica.vlcj.version.LibVlcVersion;
import uk.co.caprica.vlcjpro.client.player.OutOfProcessMediaPlayer;
import uk.co.caprica.vlcjpro.client.player.OutOfProcessMediaPlayerComponent;
import uk.co.caprica.vlcjpro.client.player.OutOfProcessMediaPlayerComponentFactory;

public class VLCJProDemo {

/**
 * @param args the command line arguments
 */
public static void main(String[] args) {

    new NativeDiscovery().discover();
    LibVlcVersion.getVersion();

    //CRASHES HERE
    OutOfProcessMediaPlayerComponentFactory theFactory = new OutOfProcessMediaPlayerComponentFactory();
    OutOfProcessMediaPlayerComponent theComponent = theFactory.newOutOfProcessMediaPlayerComponent();

    Canvas theVideoCanvas = new Canvas();
    theVideoCanvas.setFocusable(true);
    theVideoCanvas.setSize(new Dimension(1920, 1080));
    theVideoCanvas.setLocation(0, 0);

    theComponent.setVideoSurface(theVideoCanvas);

    OutOfProcessMediaPlayer theMediaPlayer = theComponent.mediaPlayer();
    theMediaPlayer.setRepeat(true);      

    JFrame mainFrame = new JFrame();
    mainFrame.setLayout(new BorderLayout());
    mainFrame.setBackground(Color.black);
    mainFrame.setMaximumSize(new Dimension(1920, 1080));
    mainFrame.setPreferredSize(new Dimension(1920, 1080));
    mainFrame.setExtendedState(java.awt.Frame.MAXIMIZED_BOTH);
    mainFrame.setDefaultCloseOperation(WindowConstants.EXIT_ON_CLOSE);
    mainFrame.add(theVideoCanvas);
    mainFrame.pack();
    mainFrame.setVisible(true);

    theMediaPlayer.playMedia("horse.avi");
}
}
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-07-11 14:35:22

您可能正在尝试使用已过期的vlcj-pro的试用/演示版本。

如果是这样,您需要等待新的试用版本发布。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45024983

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档