VLCJ-Pro Java 返回:-57005
VLCJ-Pro Java returned: -57005
我的任务是在网格中使用链接的时间洗涤器播放多个视频,我已经让它工作了(使用 VLCJ 而不是 VLCJ-PRO),但它非常挑剔。
所以我决定尝试一下 VLCJ-Pro,但我在第一行遇到错误。
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.2\executor-
snippets\run.xml:53: Java returned: -57005
BUILD FAILED (total time: 0 seconds)
VLCJ-Pro 应该可以帮助解决 VLCJ 的多视频问题(本机库崩溃经常发生)。所以我想我会看看它是否有助于稳定性,但我什至无法达到 运行。
这是我用来测试库的全部代码。我使用 Netbeans 作为我的 IDE 并且我在示例代码中添加了所有 JAR 库。
如果您有任何使用 VLCJ-Pro 的经验,我将非常感谢任何关于我出错的反馈。
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");
}
}
可能您正在尝试使用已过期的 trial/demo 版本的 vlcj-pro。
如果是这样,您需要等到新的试用版发布。
我的任务是在网格中使用链接的时间洗涤器播放多个视频,我已经让它工作了(使用 VLCJ 而不是 VLCJ-PRO),但它非常挑剔。
所以我决定尝试一下 VLCJ-Pro,但我在第一行遇到错误。
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.2\executor-
snippets\run.xml:53: Java returned: -57005
BUILD FAILED (total time: 0 seconds)
VLCJ-Pro 应该可以帮助解决 VLCJ 的多视频问题(本机库崩溃经常发生)。所以我想我会看看它是否有助于稳定性,但我什至无法达到 运行。
这是我用来测试库的全部代码。我使用 Netbeans 作为我的 IDE 并且我在示例代码中添加了所有 JAR 库。
如果您有任何使用 VLCJ-Pro 的经验,我将非常感谢任何关于我出错的反馈。
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");
}
}
可能您正在尝试使用已过期的 trial/demo 版本的 vlcj-pro。
如果是这样,您需要等到新的试用版发布。